Hub Global DateTime Variable Error

I don't know which app is at fault here, but since setting up a selection of Hub Global DateTime variables, into which I am only storing a Time, I'm seeing errors like the following intermittently in the Hub logs:

app:7022023-03-24 18:10:43.777errordatetime parse of hub variable failed java.text.ParseException: Unparseable date: "2023-03-24T06:30:00.000.043Z"
app:7022023-03-24 18:10:43.769errordatetime parse of hub variable failed java.text.ParseException: Unparseable date: "2023-03-24T22:00:00.000.043Z"
app:7022023-03-24 18:10:43.765errordatetime parse of hub variable failed java.text.ParseException: Unparseable date: "2023-03-24T06:25:00.000.043Z"
app:7022023-03-24 18:10:41.034errordatetime parse of hub variable failed java.text.ParseException: Unparseable date: "2023-03-24T22:00:00.000.041Z"
app:7022023-03-24 18:10:41.030errordatetime parse of hub variable failed java.text.ParseException: Unparseable date: "2023-03-24T06:30:00.000.041Z"
app:7022023-03-24 18:10:41.026errordatetime parse of hub variable failed java.text.ParseException: Unparseable date: "2023-03-24T23:00:00.000.041Z"
app:7022023-03-24 18:10:41.021errordatetime parse of hub variable failed java.text.ParseException: Unparseable date: "2023-03-24T06:30:00.000.041Z"
app:7022023-03-24 18:10:41.016errordatetime parse of hub variable failed java.text.ParseException: Unparseable date: "2023-03-24T22:00:00.000.041Z"
app:7022023-03-24 18:10:41.010errordatetime parse of hub variable failed java.text.ParseException: Unparseable date: "2023-03-24T06:25:00.000.040Z"

App 702 is WebCore.

There were hundreds of these errors yesterday evening when I first set the variables up (there are 6 of them). Since then a RM rule has updated them with new times (it runs daily to set start/end times for motion sensors to be active).

Is this something I should be concerned about?

Thanks.

The piston using it is probably failing every time it runs...

Also the format looks wrong yyyy-dd-MM'T'hh:mm:ss.SSS'Z' is the closest that I see yours has an extra decimal and 3 digits.

@nh.schottfam

I agree, that the definition of hub variables is very specific on what is allowed.

That's the thing, I'm not using it in any pistons - but by monitoring the Hubitat logs I can see the errors show whenever a piston is active.

The initial value each variable was set initial when they were created, with a Time value of HH:MM and no date.

The RM5.1 rule which subsequently sets them is doing the same thing, specifying just a time with no date.

It looks like the final period and 3 digits should be where the prior period and 3 zeros are.

It's not causing any issues in the Room Lighting app, appears to be picking up the time component correctly.

@bobbyD does this look like a defect in the value being acquired by Webcore? Or have I caused this myself in the way I'm assigning just a time to the DateTime global variables?

When this is done, the variable has a value that starts with "9999-99-99", for what would be "yyyy-MM-dd" in the date formatted string. This will cause a problem for any app that doesn't know how to handle such a value. I don't know if webCoRE knows how to deal with this or not. The full date string is formatted

"yyyy-MM-dd'T'HH:mm:ss.SSSX"

A valid example of this is: 9999-99-99T11:23:00.000-0700, which is just the time 11:23 AM, with no date. Time values have resolution to milliseconds, hence the 00.000 at the end, and -0700 is the time zone GMT offset.

1 Like

Just to clarify, as an example, this is what I see in the Hub Variables page

Screenshot 2023-03-24 21.17.50

This is what I see in WebCore

Screenshot 2023-03-24 21.19.40

And this is what I see in the Hubitat logs when a piston is active

Something is trashing that date time value: ending with ".046Z" is not a valid time zone value.

You can see the value of the Hub Variable if you want. But, it's easy to see that some intermediary is changing the value by putting a date on it and changing the time zone portion of the string.

In Hub Variables, create a connector for one of those time variables. That will create a virtual device, and you can look at by clicking on the created link. This virtual device will reveal your variable details, like this:

Yours would be similar, only with your time and time zone. So what app is grabbing that value and changing it? webCoRE?? I'm not familiar with how webCoRE works for these DateTime variables.

webCoRE will only read/write hub variables per the link above on how to.

ie it uses the 9999- or -9999 stuff.

Yes, that's absolutely what it looks like

The only automations I have that are setting these variables is a RM rule to set based on the day of week, and Room Lighting which utilise them for disable/enable times (which works with no issue).