2.2.8 Update - Time Variable Not Working

I'm sorry. I will look into it. I live in Arizona where there is no DST, so I don't usually see these things. Perhaps there is something subtle in the time setting code that messes with it. I'm setting up another hub with DST to see what you're talking about, and investigate what is actually going on...

2 Likes

I am envious of your state's decision to maintain sanity year round.

3 Likes

Except the rest of the world can't figure out what time it is here. Right now, we're on West Coast time, and in the winter on Denver time.

3 Likes

Ha! This is SO painful. Browsers know what time it is, so fooling the hub into being in MDT doesn't work as I'd expect, since my browser is still in MST. Argh...

3 Likes

Not sure where to post this...
I am switching all my rules to RM 5.0 and can’t get a simple rule to work that uses Hub Variables.
In RM 4, I had two variables with connectors and set one to sunrise time and one to sunset time. I then use this time on the dashboard for display only. I created hub variables and datetime connectors and duplicated the same rule. The rule updates the variable fine but the connectors don’t update. 2.2.8.156. Any suggestions?
Screen Shot 2021-08-25 at 8.27.40 PM

I ran into this too. The workaround for me was to setup 2 local rule variables and assign those to sunrise/sunset; then assign the hub variables to the local variables. Crazy...

Thanks for tip. Your workaround appears to work but it sure doesn't seem right. I would expect if the variable updated the connector would to.
@bravenel , Is there a reason the connector won't update with the hub variable?

How are you determining that the Connector value has not been updated?

Try some trouble shooting steps:
Open the device page for the Connector in one tab, and Hub Variables in another. Change the Hub Variable value on the Hub Variables page, and then check the State of the Connector on the right side of the Connector device page. Was it changed to whatever value you put in the Hub Variables page?

That does works fine. If you update the Hub Variable value on the Hub Variables page the connector does update, But if you update the Hub Variable via RM 5 the variable updates but the connector doesn't. I deleted everything and started over. I set the new variable to 4:00AM. The connector updated. Here is the result after the rule ran. All pages refreshed.
Screen Shot 2021-08-26 at 9.37.07 PM
Screen Shot 2021-08-26 at 9.39.09 PM


Thanks

I sent a couple of emails with screenshots about this issue to support - possibly request (23229) ?? As far as I can tell, it's limited only to when you assignment a hub variables to sunrise/sunset - then there's a disconnect with the connectors. Assigning hub variables to other values works fine.

Support doesn't handle things like this. Here is the place to get support for Hub Variables and Rules. So, please start over with relevant screenshots. Also, are you running 2.2.8.156?

I assume you're aware that the only place a DateTime Connector shows its value on its device page is in the State:

Try changing a time in Hub Variables, and then checking the Connector device page.

Unless I am missing something, this is where I’m showing that it doesn’t match the variable. If you look at my previous screenshots, it shows the current state is different than the variable. This only happens if you are setting the variable with RM. The current state of the connector is correct if you update the variable from the Hub Variable screen.

You never showed a screenshot of Hub Variables. It’s difficult for me to know what’s going on since I can’t see your hub, and how you are doing this. So I have to ask for some specific evidence. I personally push DateTime variables through their paces quite a bit and have never seen what you are reporting. Also, both Hub Variables (the Settings page) and Rule 5.0 use exactly the same methods to set a Hub Variable, so it doesn’t ring true that one works and the other not. I’m not saying there couldn’t be a bug, just that strong and conclusive evidence needs to be shown, and that hasn’t happened yet.

Turn on Action Logging for the rule that sets the Hub Variable, and post a screenshot of those logs when you have the failure. Show that rule. Show Hub Variables page before and after. Show the Connector state before and after. Show the Connector Events log.

Thanks Bruce, I did attach screenshots of the rule, hub variables and connector state on post 48 of this thread, I will turn on logging tonight and test.

Be sure to refresh the Hub Variables page to see current values -- it is not a dynamic page. The only dynamic text is the State on the device page.

Ok, to be clear. If I set the Hub Variable on the Hub Variable screen the connector is correctly updated. I updated the Hub Variable manually on the Hub Variable screen to 1:00 AM, The Problem is when the Rule set the variable. All screenshots are after a refresh.

Hub Variable before rule run.
HV before Rule -Screen Shot 2021-08-27 at 6.51.26 PM
Connector before rule run. (Correct Current States)


Connector Events before rule run.

RM Rule.
Rule -Screen Shot 2021-08-27 at 6.50.17 PM
Hub Variable after rule run and refreshed.
HV after Rule Run Screen Shot 2021-08-27 at 7.02.47 PM
Connector after Rule run and refreshed. (Noticed the Current States has not changed)

Connector Events after Rule Run and refreshed. (Notice no change in events)

Log file with all options on the Suntimes Rule.

Let me know if I can provide you any other information.

1 Like

Well, this is interesting. I can't reproduce it. But, it's possible that is because I'm on a slightly later build than you are on.

Later, I'll try it on 2.2.8.156 to see if it fails. I do see one difference, which is on my hub after setting the variable to 'sunrise time', it doesn't show the date for the Hub Variable:

The Connector:

I was able to confirm that this doesn't work in 2.2.8.156. Not sure why yet, but will track that down. Meanwhile, it does appear that the bug has been fixed since that release.

I found where it was fixed, and now understand why it failed for you. The dateTime string generated for 'sunrise' and 'sunset' was in the wrong format.

1 Like

Glad you found it. I was pulling my hair out. Thanks Bruce