HomeGenie Forum

Automation Program Plugins and Wizard Scripting => Help => Topic started by: billy_hannant on August 29, 2016, 04:42:05 PM

Title: Sunrise and sunset condition
Post by: billy_hannant on August 29, 2016, 04:42:05 PM
Hi All

Hope someone can help. I used to use the Sun.Event on the weather underground program with the ping at home program to switch on the lights when we arrived home. Since that has stop working I can find a set variable for when the sun has set.

I know about the new SolarTimes variable but that only seems to trigger the once and not again if the time is not at sunset when we arrive home.

All I'm looking for is a variable that is set at sunset and sunrise. Hope someone can help.

Many thanks
Title: Re: Sunrise and sunset condition
Post by: bkenobi on August 29, 2016, 05:19:48 PM
Are you trying to use a motion sensor and a time of day to determine if lights should turn on?  If so, check out the Advanced Smart Lights code.  It uses jkUtils Solar Altitude rather than WU or a luminescence sensor to determine sunrise/sunset.  You can either use that script or modify your code based on how it works.