SmartThings Community

Sunset/Sunrise Issue (Feb 2019)


(D Keating) #1

Hi all,

I have had a number of automations set up in the new app and running for months without issue. However for a few weeks now they have not been working. If i change them to a fixed time they start working again. I have checked IDE and the sunset and sunrise times are correct and the bridge is running automation that trigger on sunset and sunrise but not if the automation is from sunset to sunrise.

For example, i have an automation that turns on a hue light at sunset and then another automation that tuns off this at sunrise. This is working fine. However another automation that runs another light on when motion is detected between sunset and sunrise and this does not trigger. The motion sensor is picking up the motion but not turning on the light.

I am stumped as to what the issue is??


(MrPresident) #2

I had a problem with the sunset API returning a day in Feb 2018. Print your values to the log and check this at runtime. There are more than one API to get the Sunrise/sunset so I switched and viola!
It wasn’t specific to one ST hub either. I have multiple properties that used this same routine to turn on outdoor lights in various conditions. Both of my places exhibited issues around this API.

If you need more info, search this form for a few posts I made in Dec 2018. I posted my fixed code.


(D Keating) #3

Many thanks for the reply but that is way above my head to be honest…i am a new user and not that up on coding and such like. I can get onto the IDE and check that and thats about it for me.


(Tyler Durden) #4

My smart lighting app failed to execute a command at sunrise today.


(Shawn Bashir) #5

Can you elaborate on how to do this?