Turn on at sunrise or sunset not working


(Jody) #1

The option to turn lights on or off at sunrise/sunset is not working. If I set a specific time, the lights function perfectly.


Sunset stopped working recently - confirmed issue
(Ben Edwards) #2

Not sure what is going on there. @bflorian is looking at this over the weekend. May have something to report next week.


(Norm) #3

Could not get this to work correctly either. Resorted to using IFTTT integration with SmartThings to turn on / off lights at sunset / sunrise. This works great btw. But it is a shame we can’t do this programmatically.

N


(Jeff DeWolfe) #4

Mine also did not work yesterday. Tonight they worked though.


(Bob Florian) #5

There was system issue that caused sunset events to fail on Friday night and sunrise events on Saturday morning. It has been corrected and these events should work properly now and in the future.


(Bob Cronin) #6

FYI, I had a turn-on-lights 15 minutes before sunset event fail tonight (Sunday, 21 Sep) using the “Mode Magic” app), so things may not be 100% fixed yet …

bc


(Leo Polak III) #7

I came across this thread via Google search… this same thing has started to happen with one of my smart outlets, cropped up last week. On the same outlet, I have it set to turn on at sunset, and off at a specific time. It shuts off each night appropriately, but will not turn on. I have tried uninstalling the app and reinstalling. I’ve restarted my hub. Checked the hub status, everything seems up-to-date. Otherwise, communication between the hub and outlet seems good. I can manually turn it off/on without delay; I also tested adjusting the indicator light, communication good.

Based on the comments above, I am testing switching the sunset timing off and using a specific time for on tomorrow. I’ll post back with results. As this thread has been inactive for a month, please let me know if anyone came up with any other solutions. Thanks!


(Leo Polak III) #8

So, gave it a two-week test. Turning on at a specific time has worked consistently.


(Ron S) #9

@the_ringleader just take a chance to loose another day. Set one action to trigger 2 minutes after sunset and one 10 minutes before sunset and see if the actions trigger! Use offset! And use basic ST scheduling.

If it doesn’t happen will owe you couple of beers!


(Ben Edwards) #10

Are you suggesting that using offsets “fixes” problems with sunrise and sunset schedules firing? Really want to know.


(Ron S) #11

For me never failed unless there is a known outage!

@ben: I don’t have any explanation for this. May be too many people set it at sunrise and sunset exact and somewhere along the way, they get queued up and there is a delay. I always check in the IDE, when the next runtime is My Locations -> SmartApps(6th Column) -> Click on the scheduled event (not hover) and it tells me when the next runtime is. It pretty much is triggered at that time. But at times I have seen it disappear mysteriously which indicates there is something wrong and I reschedule it and it fires.


(Steve) #12

This has never worked for me - I’ve just tried adding the offset to see if that helps.

From the IDE - does the “Prev Run time” seem suspicious here? This never works for me - I want it to set the mode to “Day” at sunrise and “Night” and sunset to control a motion sensor…

Scheduled Jobs
Handler Next Run Time Prev Run Time Status Schedule
sunriseHandler 2015-02-07 6:59:00 AM EST 1969-12-31 6:59:59 PM EST WAITING 0 59 6 ? * * America/New_York
sunsetHandler 2015-02-06 5:22:00 PM EST 1969-12-31 6:59:59 PM EST WAITING 0 22 17 ? * * America/New_York

Settings List Events
Name Type Value
phoneNumber phone ""
sendPushMessage enum No
sunriseMode mode Day
sunriseOff capability.switch ""
sunriseOffsetDir enum Before
sunriseOffsetValue text 00:02
sunriseOn capability.switch ""
sunsetMode mode Night


(Ron S) #13

@stephensuarez Boss, its a known issue about the Prev. Run time. and for an explanation why 1969…


(Steve) #14

Thanks Ron - so that prev run time isn’t causing the problems (but makes trouble shooting more difficult). Still, the morning mode is never being triggered. We’ll see what happens tomorrow now that I’ve added the offset.


(Aaron) #15

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.


#16

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.


(Ben Edwards) #17

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


List of Community Known Issues
(Brian Smith) #18

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


(Aaron) #19

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:


#20

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…”


Minutes before/after Sunrise/Sunset Control