webCoRE for Hubitat Updates

what ecobee dh are you using? It would be good to see the command definition in that device handler

If you select the type of Parameter, it then gives you the option of Value, Expression, etc?

image

Yes! That's it. Thank you. I knew it would be something obvious. I thought I had tried all the various parameter options, but apparently not. Thanks again.

The driver could define the arguments better. If you let me know the driver, I can give you something to try in that.

This is a custom Ecobee driver created by a developer who I purchased some code from on SmartThings and has now ported his drivers and app over to Hubitat. It exposes much more of the Ecobee API than the native Hubitat app.

Hi, for the ecobee, not the Nest, here is the correct link

Ah, yes, sorry for pasting the wrong link. And thank you for making such a great app/driver for Ecobee.

1 Like

New release out today.

Resolves several reported issues, adds further optimizations. Note 1 in this thread has more details

HPM has updates available.

9 Likes

Thanks for this. Beautiful piece of software.

Any chance of anything in this update that might affect a POST Request? I had a POST request for a refresh token in a piston that's been humming along nicely for a while that started responding with a 400 Bad Request error as soon as I installed this update. I tested the POST request in RESTer, and it's still working normally there.

The update seems like an unlikely culprit, but is there an easy way to go back to the previous version just for testing purposes?

If you have a backup you can restore back to the previous version.

In a private message if you want to share logs, I can look into this. I can also offer ways to get more logs from webcore if we need them beyond full.

What am I doing wrong here? Trying to parse the response from an HTTP GET request. This used to work fine; at some point it stopped.

Relevant part of pistons;

image

$response.obs is the data returned by the HTTP Get request.

Here's the debug log entriess;

$response.obj.precip is correct. However $reponse.obj.precip.length is 1 and it should be 8. Apparently number() and double() are only looking at the first character which is '0' and converting it to a zero value.

Again, this used to work; not sure when it stopped.

You may need to use $response.obs[0].precip
The value is still in brackets [0.006634], using obs[0] should pull it out so that you can process the raw value.

I believe length is in reference to array values so 1 represents one value not numbers of characters.

Well, these work fine without [0]...

Shouldn't they fail as well? They work as expected.

Well...yeah, i would expect issues..should be all or not...must be some automatic formatting happening in the background for those and not precip

Any ideas? @eibyer @nh.schottfam

@nh.schottfam I'm having trouble with datetime(). The following work:

(expression) datetime("2022-09-28") »»» (datetime) 1664337600000
(expression) datetime("13:00:00") »»» (datetime) 1664402400000

The following do not work:

(expression) datetime("2022-09-28 01:00:00 PM") »»» (datetime) 0
(expression) datetime("2022-09-28 01:00:00") »»» (datetime) 0
(expression) datetime("2022-09-28 13:00:00") »»» (datetime) 0

It seems like it stops working as soon as I include both a date and a time in the string to be parsed...

EDIT: I'm on version 1.0.61.

Hubitat in general is using ISO8601 time strings

So your last 3 are not valid strings.

In general there are no spaces in the strings.

If you have join things together you can use

date+/-time. or datetime+/-time expressions, if you don't want to bother to form a new time string.

There are date and time functions in webcore also:

https://wiki.webcore.co/Functions#Date_and_time_functions

As well as built in system variables for $sunrise, $sunset, $noon $midnight

webcore handles daylight saving time changes, when using the time functions to do time math.

I'm trying to use those invalidly formatted strings that come from a different device in time calculations. Looks like I'll have to massage them a bit first. Thanks

Can you add a parseDateTime() function that can take the same format string as formatDateTime() so any text can be converted to a datetime using a specified expected format?

the latest version has this new function

HPM repair to get it.