Turn on at sunrise or sunset not working

if anyone is still paying attention . … . a slightly more germane explanation for the funny prev run time can be found a little later in the same thread linked by @smart.

from @baldeagle072: “Actually, that scheduled job has never run. Every day, you are creating a new sunrise and sunset time. When the app schedules the new job, it deletes the old job and creates a new job. If it has never run before, my guess is it returns a -1 unix time which is 1 second before Jan 1, 1970 UTC. I think if you look at a schedule that happened already and hasn’t been rescheduled, it would show the previous run time.”

This explanation really helped me (better) understand scheduling in ST.

I have been using sunset as a trigger (set up with a hello home action through the regular mobile app, not a custom smartapp). Worked fine every day for about 10’days, then failed today. I’m putting in a support ticket.

A little bird told me that if you use an offset with your sunrise and sunset events, they run a bit more reliably. This is due to them not trying to run at the same time as everyone else in your timezone. Note: this is the source of the longstanding status message at: http://status.smartthings.com

1 Like

@ben - I don’t see the offset in the standard settings for Turn on/off using a schedule.

I think this is probably true. In an app I am working on, I put an arbitrary 1 minute offset to rise and set times in case the user doesn’t opt for an offset. It’s been only a few weeks but it has been reliable except for one failure which I am trying to troubleshoot here: Dusk-to-Dawn Light Control with Lux control and Motion Dimming - RC2
. . . yea, I know, shameless cross-post :wink:

It’s there, at least in the iOS version. :blush:

Select SUNRISE/SUNSET and on the next details screen you can “optionally choose the amount of time to run before /after…”

When accessing through Lights & Switches, there is only turn of and on using a schedule…and that only has a switch for sunset or sunrise.

Where in the app are you getting the above settings?

Setting up or modifying a Hello Home Action. I have one that runs automatically around sunrise and another for sunset.

See where it says “perform the action”? That’s the HHA I’m currently setting the triggers for. Off the “perform automatically” screen.

Ah, that’s the difference. This is not under a hello home action, this is under the standard actions for things themselves.

Home Health Action triggered by sunset failed again tonight. :pensive:

I set up a new HHA to turn on a light at half an hour before sunset, and it worked fine. Still working with support.

I started having this issue randomly a couple weeks ago and I don’t have the option to offset the time to turn on lights - does smart things have any idea when they’re gonna resolve this issue of sunset turning our lights on?

Yesterday I removed the lights from the sunset HHA and then readded them. It didn’t trigger last night, but it did today. Could just be coincidence, but if you don’t have too many devices it might be worth trying. However, it may need a full 24 hour cycle before it works. I did not reboot the hub.


No custom smartapps involved. Plain vanilla Hello Home Action that turned on one light at sunset. Support had been working with me on it for 4 days.

My sunrise / sunset switches and groupings all worked reliably until a few nights ago, and now none of them work.

More interestingly, there’s a thread on these forums from folks who have rolled their own scripts to do work with API level sunrise and sunset triggers, and those have suddenly stopped working as well. That implies it’s a systemic problem.

Did someone file a ticket? I don’t want to duplicate


Please file a ticket. It’s the only way for them to get a sense for how many people are affected, and so justify spending more resources on the problem. So it’s not duplication, it’s raising the urgency level. :wink:

1 Like

I came into say that it is intermittent for me as well.

Thanks - I will file that today.

I have a few custom apps subscribing to location sunrise and sunset. One turns lights on/off and the others just set a state variable. The app that turns lights on runs pretty reliably at sunset, except for the day it is installed. The others have never run from the sunset or sunrise location trigger. The code used in each is exactly the same expect for what happens within the subscription handler.

I started a chat with support a few days ago about the issue, no progress as of yet.

I noticed that mode changing actions triggered by sunset/rise have stopped working past a few days as well. I contacted the support and they acknowledged that there is problem and they are fixing it now. It is quite frustrating to see features I rely on suddenly breaking like this.

We are rapidly approaching 3 months since the issue was officially listed on the SmartThings status page.

That’s a bit concerning for something as core and “simple” as a sunset/sunrise trigger. I’m sure I’m insulting the engineers by saying it is “simple,” but to an end user it is just a timed action. If the issue is load on the servers, why not make sunset/sunrise a window starting 5 minutes prior where accounts are randomly set to on a daily basis within that window?

Does anyone out there really care that it happens exactly at sunset? If you do, please elaborate because I would love to understand this more. The ONLY thing I can think of is that you want your lights turn on at sunset and you house is on a shoreline/mountain that faces west and you can actually see the sun set over the horizon in front of your eyes! :smile: Even then, does it matter that your lights might come on a few minutes early?