Page 1 of 1

QueuedCommand on selector switch not executing

Posted: Thursday 03 December 2020 22:21
by James83
Hello,

I noticed a strange behavior since beta 12501 and still exists in latest beta 12709 but i believe it worked fine in 12497
I have 2 scripts. First triggered script contains these lines:

Code: Select all

if checkmks then dz.devices('Alarm').switchSelector('Check MKs').afterSec(1) end -- check MK's uitvoeren
if alarmschakelen then dz.devices('Alarm').switchSelector(alarmmodus).afterSec(5) end -- Alarm inschakelen
The result of the first line triggers another script "Check MKs" which contains the line:

Code: Select all

dz.devices('Alarm').switchSelector(0).afterSec(1).silent()
So far, so good
Then the second line of the first script should change the state of the selector switch again after 5 sec but it doesn't. No errors, just not switching.
It looks like the queud command 'afterSec(5)' is forgotten by DzVents
But if i disable the line of the second script, then the second line of the first script does switch the selectorswitch after 5sec.

Also tried without the "afterSec" and "silent" but didn't help.
I could not find any related changes in the latest beta's.

What could cause this behavior?
Thanks!

Re: QueuedCommand on selector switch not executing  [Solved]

Posted: Thursday 03 December 2020 23:27
by waaren
James83 wrote: Thursday 03 December 2020 22:21 The result of the first line triggers another script "Check MKs" which contains the line:

Code: Select all

dz.devices('Alarm').switchSelector(0).afterSec(1).silent()
If this code is send to domoticz it will cancel all outstanding switchSelector commands for this device send by earlier scripts.

If it worked before then the scripts involved were processed in the same batch of dzVents scripts and returned to domoticz in one and the same commandArray (and therefore all switchSelector().afterSec() are scheduled and not canceled)