How do I combined the two commands above with a 3 minute delay? Any help most appreciated.
The end plan is that when a person activates the motion sensor in the bathroom the Rako lights come on for 3 minutes. I plan to use the triggers to activate the scene.
so you have separate scenes for turning the light on and off, if you want to stick to your design youd have to have a 3rd scene that runs both these scenes so something like
luup.inet.wget(“http://192.168.1.71/rako.cgi?room=6&ch=0&com=5”, 5) – turn light on
luup.call_delay( ‘switch_off_light’, 180) – Call the switch off function after a delay of 180 seconds
I personally would however use only one scene to do both tasks. So something like:
function switch_off_light()
luup.call_action(“urn:upnp-org:serviceId:Dimming1”, “SetLoadLevelTarget”, {newLoadlevelTarget = “0”}, 50)
end
luup.call_action(“urn:upnp-org:serviceId:Dimming1”, “SetLoadLevelTarget”, {newLoadlevelTarget = “100”}, 50)
luup.call_delay( ‘switch_off_light’, 180) – Call the switch off function after a delay of 180 seconds
Best Home Automation shopping experience. Shop at Ezlo!