Does anyone have any code I can cut and paste into a scene to get sunset to sunrise timing?
I want my lights to come on after sunset when the schlage lock is unlocked.
I tried but I’m certainly no programmer.
Thank you.
Does anyone have any code I can cut and paste into a scene to get sunset to sunrise timing?
I want my lights to come on after sunset when the schlage lock is unlocked.
I tried but I’m certainly no programmer.
Thank you.
What firmware version do you have? The latest version (979) has sunset and sunrise timers built in, so no Lua code is required for that part. Just click the “Events” button on your scene, and you should see “Sunrise” and “Sunset” events in the list. Once you select one of those, you can enter other options such as running your scene a X number of minutes before or after sunrise/sunset.
You’ll still need some Lua to check whether your schlage is unlocked, but that’s a simple call to luup.variable_get. For example, something like this:
local lock_status = luup.variable_get("<< service name >>", "<< variable name >>", << device id >>);
if (lock_status == 1) then
return false
end
I’m running 1.1.213 and I will try the code you have supplied.
Thank you for that.
actually I think it’s not an “event” - but a “timer”
then select “day of the week”
then from the dropdown pick sunrise, sunset, or offsets of the same.
http://forum.micasaverde.com/index.php?topic=2355.0
Also, the topic is being moved to appropriate category - Luup and Development
Best Home Automation shopping experience. Shop at Ezlo!
© 2024 Ezlo Innovation, All Rights Reserved. Terms of Use | Privacy Policy | Forum Rules