Using 'On FOR' not working?

Moderator: leecollings

Post Reply
evansnp
Posts: 16
Joined: Tuesday 05 April 2016 17:36
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Using 'On FOR' not working?

Post 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.
jannl
Posts: 625
Joined: Thursday 02 October 2014 6:36
Target OS: Raspberry Pi / ODroid
Domoticz version: 2022.2
Location: Geleen
Contact:

Re: Using 'On FOR' not working?

Post by jannl »

The script is not executed more often, so the On FOR 10 is repeated again and again?
evansnp
Posts: 16
Joined: Tuesday 05 April 2016 17:36
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Using 'On FOR' not working?

Post 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!
paulD
Posts: 16
Joined: Wednesday 20 January 2016 14:46
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Using 'On FOR' not working?

Post by paulD »

Hi,

'on FOR' is in minutes. So, did you wait 10 minutes ?
evansnp
Posts: 16
Joined: Tuesday 05 April 2016 17:36
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Using 'On FOR' not working?

Post by evansnp »

Yep! I put a print statement before the 'on for' command, and it only gets triggered once.
niceandeasy
Posts: 102
Joined: Thursday 28 January 2016 22:25
Target OS: Raspberry Pi / ODroid
Domoticz version: 3.8153
Location: NL
Contact:

Re: Using 'On FOR' not working?

Post 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.
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest