i have 1 scene (doing nothing much serious)
its triggered by deviceID77 turned on(which is a physical switch used to shut down things before leave or sleeping)
it happens in 4 out of 10 times that the switch (id 77) does stay on … no clue why that may is.
anyone have some idea ?
maybe timing ?
the scene is supposed to turn off the switch on the end (with a delay).
the status of the switch is used later for other things (like arming the house) … but if its never get back off … this turns out to be some sort of “problem”
I’ve read before that luup.sleep prevents all other luup-code from running (while sleeping), even code from other scenes. Maybe it’s not causing your problems, but it’s just best not to use the sleep function at all I guess…
I too have read somewhere in the wikki that sleep command causes issues so I too have avoided it however I am interested now to know if the luup.call_delay also delays all other lua scripts while it is ‘delaying’ - as if so this makes sense as to why I may be suffering issues:
I am interested now to know if the luup.call_delay also delays all other lua scripts while it is 'delaying'
No … it’s like a fire and forget missile … This starts a delay … and at some point in the future the code will run. The existing LUA code continues immediately to the next line after the call to luup.call_delay. Call it twice … and it’s like launching two missiles.