Page 1 of 1

Using 'On FOR' not working?

Posted: Monday 13 June 2016 15:58
by evansnp
I've just started experimenting with LUA scripts, and have come across something that doesn't seem to be working correctly. If I use

Code: Select all

commandArray['Lounge Dimmer'] = "On FOR 10"
, the lamp comes on, but stays on. I've tried different values, thinking that there may be a minimum value, to no avail. Any help gratefully recieved.

Re: Using 'On FOR' not working?

Posted: Monday 13 June 2016 16:04
by jannl
The script is not executed more often, so the On FOR 10 is repeated again and again?

Re: Using 'On FOR' not working?

Posted: Monday 13 June 2016 18:37
by evansnp
It's being fired by a motion detector, but even if there are no more triggers it still stays on. I've seen other reports of this, and it seems to be only when linked to a motion sensor. weird!

Re: Using 'On FOR' not working?

Posted: Monday 13 June 2016 22:25
by paulD
Hi,

'on FOR' is in minutes. So, did you wait 10 minutes ?

Re: Using 'On FOR' not working?

Posted: Monday 13 June 2016 22:54
by evansnp
Yep! I put a print statement before the 'on for' command, and it only gets triggered once.

Re: Using 'On FOR' not working?

Posted: Monday 13 June 2016 23:21
by niceandeasy
In the newest beta it works. I'm using this in LUA with 'On FOR 7' on a KAKU switch, using an RFXCOM tranceiver.
I remember, there were problems with 'On FOR x' in past versions but I don't remember the details.