Turn on at sunrise or sunset not working

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?


Perhaps make this an option within the configuration of the iOS or Android app itself, at the account level. By default, all users are set to the 5 minute window. You have to opt out of it if you want to have exact sunset/sunrise times.

Then, the offset times can still work off this. For example, if you live in a valley, your sunset is earlier because you are in the shadow, so I can see you wanting your lights to come on earlier - aka the offset. That can still happen in the scenario I am proposing.

I definitely agree that this “known issue” has been unresolved for too long, particularly since it affects a very common and expected use case (i.e., turning on/off lights at sunset/sunrise!).

I fear that the issue is that even 5 minutes may not resolve the problem (and I think – just guessing) that this is tied into the long execution times of “unschedule()”:

The behavior of runIn() and all (?) related scheduling is defined with rules that seem too tight for the abilities of the execution environment. Jobs are not allowed to execute if their scheduled time has past. Maybe this is resolved with a queuing mechanism that takes a “tolerance” argument (i.e., a sunset job can live in the queue as long as 30 minutes, rather than being dropped altogether).

1 Like

Agreed. Shouldn’t matter. I did add a hard-coded 1 minute offset to sunrise and sunset times in my dusk-to-dawn app. Maybe some improvement . . .hard to say. I have had 2 failures in the last 3 weeks or so of rise or set actions.

1 Like

I got the impression from support that they’re just waiting for the new hub to come out to relieve the stress on the backend rather than put forth the effort to fix it.

I have a HHA set to trigger 30 minutes before sunset. Recently it’s been triggering TWO WHOLE HOURS (and that’s approximate, which is even more frustrating) before sunset.

I’ve been supportive of ST and the challenges they’ve been facing, but I’m starting to think it’s time to search for a new alternative. It’s getting ridiculous.

I got fed up with the sunrise/sunset and replaced it with an outdoor luminescence sensor. It is sort of my personal sunrise/sunset as it is actually measuring the amount of sunlight outside my house. It has been pretty close to 100% paired with the smartapp “Light Up the Night”.

My sunset trigger failed again tonight after about 3 weeks of working fine. I haven’t changed anything. I did report it to ST, but it’s still frustrating.

Which sensor are you using?

Aeon Labs Multi Sensor. It has a lot of flaws, but it can live outdoors and seems to be able to tell the difference between night and day lightwise even near some outdoor lights.

Hi, Kenny.

For the life of me I can not figure out how to get the Aeon Labs mulit sensor to act as a daylight switch. I see how it can detect daylight and then use that as a parameter to control motion sensing… in other words, “if it’s night time, use the motion sensor to turn on a light.” I simply want it to say “it’s dark enough, turn on the light” and the opposite. I live in the Pacific Northwest and it would be nice to have the porch light come on when its a rainy day.

Can you help?

I’m sure there are other ways but you can use my app: Dusk-to-Dawn Light Control with Lux control and Motion Dimming - RC2

If you don’t chose a motion sensor, it will just be a dusk-to-dawn light. You can also chose a light meter and set a ‘dark’ criteria.

AaronZon’s app looks like it does exactly what you need Steven.

  • Kenny


Now to look like a total NOOB - How do I install it? Does it run in Smart Things?


Have you checked the list of officially supported Smart Setup smartapps that are included in the ST mobile app? Those are the easiest to set up. There are a couple that might do what you want.

Community-member-created unofficial apps are still pretty easy, but you do have to copy the code, open the Integrated Development Environment in a web browser, paste it in, and then publish it to yourself, which is more steps.

My lights came on 2hrs after Sunset tonight?

But for the last few weeks they have been rock solid…

@mluder , under “Convenience”, in the out of the box apps ‘More’ screen, you want the “Light Up the Night” app. Just tell it which lights you want to come on and which lumosity meter you want to use, and it will turn them on when it gets dark and off when it gets lighter. Been working like a charm for me for months.