Sunrise & Sunset Times Not Updating

Double-check the hub location hasn't changed for some reason, confirming it is still operating in the correct time zone.

You may also want to mention for support (and others) what platform version you are running and when you updated over the last short while, just in case that has any bearing.

I suspect that syncing of time is not an issue, but does the hub have access to the Internet?

Location is correct and hasn't changed. The times are correct, just don't update at midnight as they should so reflect the prior days' time.

Currently 2.3.1.137 and have taken each of the recent updates within a day of them being released. That said, this issue has happened on and off for at least the last year when I was running ~2.2.6.

The hub does have access to the internet. I have it send me a notification before the reboot triggers.

Have you come in or out of daylight savings recently?

You have $sunrise and $nextSunsrise, $sunset and $nextSunset, etc.

Could the $next…. be the one you’re looking for?

The timing and structure of the logs appears to be consistent, just not the content, that seems to have changed

That's weird. Can you PM me your hub's id, and I'll take a look at the engineering logs on the hub?

1 Like

PM'd, thanks.

We did have DST about a month ago, but I don't think that's related since it happened before and after this.

My understanding is that the various sunset and sunrise variables should update at midnight with a system job (that I don't see in the scheduled jobs list), so $sunset and $sunrise should always reflect the current calendar day's times (e.g. the values at 11:59PM will be different than at 12:01AM a few minutes later). In my use cases, I'm not looking to use $nextsunrise, etc., since I'm looking for the current days' values (note these don't update at midnight reliably either).

Following -
I noticed the exterior lights NOT turning off at sunrise. When checking my logs, everything looks normal. As there was a recent upgrade, I did check and confirm my location and time zones did not change. So far, that is all I have done. Not enough time really investigate it.

If you check in Logs > Locations events tab you would be able to see where it is updating the values. For me it looks like immediately after the sunrise or sunset event it then updates that value to be the next one so it is always ready to go.

@jake9

There is another way to check if the Hubitat has the right sunset/sunrise times "built in". This is a new feature, so you have to have updated to the latest.
You can make a new RM rule, with a trigger being "certain time". Use sunrise/sunset (your choice), and click on the button "use date". Put in a date in the future (when you know the proper sunsrise/sunset).
If the rule has been marked as showing current values, you will see what Hubitat has calculated for that date for sunrise/sunset.
This enables you to see (for any date in the future), the Hubitat sunrise/sunset.
P.S. I have used this type of rule, and all the sunset times that I have checked (via Google) have been correct.

1 Like

Thanks - I disabled my reboot script so I can do some investigation when it happens (last night was fine). The engineering logs apparently show the midnight triggers and then schedules jobs at sunrise and sunset. I'm not fully clear the exact times the values are updated, but from what I can tell, it happens during the midnight job.

Rule Machine and Hub Details only show the time (doesn't include the date), so have to infer. I was digging into the webcore code and since it effectively caches the output of app.getSunriseAndSunset() that might be an issue. I added some logging so I can verify and will also do a groovy app to dump the structure.

Yes, the approach that I suggested previously shows the sunrise/sunset time for the date that is specified. That date that is specified can be ANY date.

I would like to add that since the latest update, my rules based on Sunrise+XX minutes are not running. I don't know why. Anyone else?

Just as another data point, I have a rule (current RM version) that opens blinds in the AM, closes them in the PM, based on sunrise/sunset, and it's been running fine on .138.

image

Of note, my rule is older, written with RM 4.0. Here's the rule that hasn't fired in days.

And, yes I know that now the weather is partly cloudy. But earlier it was Clear and didn't get triggered.

1 Like

My mode manager that was setting the mode to dawn at sunrise -30 also stopped working.

@bobbyD Thought you'd want to know about these reports.
Thanks,
Jay W

I am watching. I am not seeing any issues in my environments with sunrise/sunset, and my Mode Manager as well as Rule Machine rules are working as expected. So, unfortunately, we will need your help to narrow down where these problems originate. Posting app settings, Logs (past Logs), location settings, etc would help us isolate the problem.

Any new results from your investigation, @jake9?

@gopher.ny - Victor - see anything in the engineering logs?