'On For x' doesn't work?!!

Moderator: leecollings

Post Reply
User avatar
abdolhamednik
Posts: 39
Joined: Sunday 27 September 2020 7:33
Target OS: Raspberry Pi / ODroid
Domoticz version: 4.9700
Contact:

'On For x' doesn't work?!!

Post by abdolhamednik »

hello everyone
;)

i have problem with the command:
commandArray['deviceA'] = 'On For x' ... it doesn't work. deviceA maintains on for all times!
does anyone have seen this problem?
User avatar
jvdz
Posts: 2441
Joined: Tuesday 30 December 2014 19:25
Target OS: Raspberry Pi / ODroid
Domoticz version: 4.107
Location: Netherlands
Contact:

Re: 'On For x' doesn't work?!!

Post by jvdz »

This should work fine and switch it on for 1 minute:

Code: Select all

commandArray['deviceA ']='On FOR 1'
What type of switch is deviceA and what is the exact statement you use?

Jos
User avatar
waaren
Posts: 6028
Joined: Tuesday 03 January 2017 14:18
Target OS: Linux
Domoticz version: Beta
Location: Netherlands
Contact:

Re: 'On For x' doesn't work?!!

Post by waaren »

abdolhamednik wrote: Tuesday 29 September 2020 10:25 i have problem with the command:
commandArray['deviceA'] = 'On For x' ... it doesn't work. deviceA maintains on for all times!
This does happen if deviceA was already On.

I think it is safer to use

Code: Select all

commandArray[#commandArray + 1] = { ['deviceA' ] = 'On' }
commandArray[#commandArray + 1] = { ['deviceA' ] = 'Off AFTER ' .. x }
Debian buster, bullseye on RPI-4, Intel NUC.
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
User avatar
abdolhamednik
Posts: 39
Joined: Sunday 27 September 2020 7:33
Target OS: Raspberry Pi / ODroid
Domoticz version: 4.9700
Contact:

Re: 'On For x' doesn't work?!!

Post by abdolhamednik »

thanks to waaren... it worked

thanks to jvdz. it is a light switch/on-off
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest