QueuedCommand on selector switch not executing  [Solved]

Easy to use, 100% Lua-based event scripting framework.

Moderator: leecollings

Post Reply
James83
Posts: 16
Joined: Thursday 28 November 2019 0:35
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: Belgium
Contact:

QueuedCommand on selector switch not executing

Post 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!
RPI4, Philips Hue, Tradfri, Sonoff, MQTT, Zigbee2Mqtt, RFXCom 433, Octoprint,...
User avatar
waaren
Posts: 6028
Joined: Tuesday 03 January 2017 14:18
Target OS: Linux
Domoticz version: Beta
Location: Netherlands
Contact:

Re: QueuedCommand on selector switch not executing  [Solved]

Post 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)
Debian buster, bullseye on RPI-4, Intel NUC.
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest