Sunrise/sunset times stuck since Jan 22, 2021

Hi, I noticed that my lights were turning on too early in the evening and staying on too late in the morning. Turns out the sunset and sunrise times I use in my automations have been stuck at 5:51pm and 7:29am since Jan 22.

This is defeating all the automations that use sunrise/sunset time. I already tried changing my address to a different one and then setting it back.

Has anyone else experienced this? How can I fix this?

It is a known issue. Pending a fix you can mitigate it by saving affected Automations again every few days (whenever you feel the deviation from the correct timing is getting too large). I find adding a space to the end of the name works well as it allows the Automation to be saved but the space won’t be there next time you edit.

1 Like

Hi, is this just impacting ST app Automations? Seems like my Smart Lighting automations are working, and shifting a minute every day. Webcore I’m guessing does its own calculations.

1 Like

@orangebucket thanks – this was working correctly for months, are you saying this bug was introduced recently?

@glenmm in my case I am using ST app automations.

I noticed this also, ST support told me it was a known issue and to rebuild the automation. I switched to a SmartLighting routine (or whatever it’s called there now).

1 Like

Thank you. It took me forever to post this question on the forum, I’m so glad I did. I just switched my lighting automations to the smart app that you suggested, they are pretty nice actually, fingers crossed that they work without an issue.

I’d imagine Smart Lighting might use the events sent out by the Weather Station app (events at Sunrise and Sunset, and events with the next day’s times after Sunset), but if not it uses the function calls in the legacy library/API. Or both.

No, it uses the legacy library/API too, though only updates the times every few hours. Pistons do their own scheduling, so how accurate they are depends on when they last ran. At certain times of year some ‘sunrise’ pistons may be fired twice because they fire at the previous day’s sunrise time and then immediately reschedule for the current day. You’ll often see pistons written to fire during the night before it can possibly be sunrise but when the new times should be available, just to reschedule and avoid this. The same can happen with ‘sunset’ pistons too - it depends on what other times of day they run.

I mention all that just to illustrate this isn’t as trivial as it might seem.

The description I’ve seen is that Automations only used to reschedule Sunrise and Sunset timers when they’d drifted from the actual times by a certain amount. Indeed I seem to remember seeing that behaviour. I am sure they have reasons for this. I can’t think in terms of tens of thousands of users to appreciate them. Anyway this rescheduling hasn’t been happening.

My sunrise/sunset stuff is all in Smart Lighting and I’ve only really noticed reports of the problem with Automations in the last month or so. Naturally that makes me wonder if the switch to using the Rules API was a factor. I can imagine how it could be. Pure speculation though.

1 Like