Hi All,
Im have now read posts here in the forum (and other forums as well) and I cant understad how to make a simple scen… I know newbie…
This is what I try to do:
when motion is trigged by my aeotec 4 in1 sensor I would like to switch on a lamp but only after sunset (and stop when its sunrise).
I tried PLEG but all guids i find using UI5 ind it looks very different.
I tried to add luup code
I cant get it to work …
I have a veralite UI7 (1.7.855)
installed pleg 8.11 and PLC 8.19
Thanks akboober,
I tried to use “return luup.is_night()” in my scene but it didnt work.
I add it to my working scene (working day and nigh) under “Also, execute the following Luup code:”
That should work, assuming the scene does what you want when you trigger it manually (ie. the action to turn on the light) and that your trigger from the Aeotec is set up correctly in the first place.
When you said:
I tried to add luup code
I cant get it to work …
what exactly happened (or not) ?
One thing you could add to your Lua code before the return statement is
The scens works “perfect” when motion is triggerd the lamp is switched on (turns off after 5 min, as I want)
When I added the return luup.is_night() in option execute the following Luup code: , and trigger the scene manual it runs and switch on my lamp (did this when it was not night :))
I will look in to the log file.
Thank you for quick response!