trying something really easy which is driving me mad.
switching a normal light on/off from a dzvents scripts works
however when i want to delay things it does not work
the light does not switch on
if domoticz.devices('Flow').flow ~= 0 then
domoticz.devices('DoucheAlarm').switchOn().afterSec(10)
end
if domoticz.devices('Flow').flow ~= 0 then
domoticz.devices('DoucheAlarm').switchOn().afterMin(1)
end
if i remove the afterSec or afterMin everything works and the light goes on/off instantly
the device is a dummy switch
.afterSec or afterMin do not work
Moderator: leecollings
-
jake
- Posts: 751
- Joined: Saturday 30 May 2015 22:40
- Target OS: Raspberry Pi / ODroid
- Domoticz version: beta
- Contact:
Re: .afterSec or afterMin do not work
Is the trigger triggered very frequently? Did it help when you add a checkfirst?
light.switchOff().checkFirst().afterMin(5)
light.switchOff().checkFirst().afterMin(5)
-
Gravityz
- Posts: 652
- Joined: Wednesday 16 December 2015 19:13
- Target OS: NAS (Synology & others)
- Domoticz version: 2025.1
- Location: Netherlands
- Contact:
Re: .afterSec or afterMin do not work
Hi Jake,
no it is not triggered frequently.
i added the checkFirst
DID NOT WORK
light.switchOff().checkFirst().afterMin(5)
DID WORK
light.switchOff().checkFirst().afterSec(5)
it looks like when the delay is high the timing gets unstable or does not work at all
i decided to write a timing section which measures the time which has passed after a routine is triggered by using domoticz.time.dDate
This is much more stable and does not use timing per switch anymore but just 2 data variables
thanks for your help
no it is not triggered frequently.
i added the checkFirst
DID NOT WORK
light.switchOff().checkFirst().afterMin(5)
DID WORK
light.switchOff().checkFirst().afterSec(5)
it looks like when the delay is high the timing gets unstable or does not work at all
i decided to write a timing section which measures the time which has passed after a routine is triggered by using domoticz.time.dDate
This is much more stable and does not use timing per switch anymore but just 2 data variables
thanks for your help
-
solarboy
- Posts: 357
- Joined: Thursday 01 November 2018 19:47
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2024.6
- Location: Portugal
- Contact:
Re: .afterSec or afterMin do not work
Also worth reading about "cancelQueuedCommands" as I beleive this can confuse dzvents.
Intel NUC with Ubuntu Server VM (Proxmox),mosquitto(docker),RFXtrx433E,zwavejsUI (docker),Zigbee2mqtt(docker),Harmony Hub plugin, Kodi plugin,Homebridge(docker)+Google Home,APC UPS,SMA Modbus,Mitsubishi MQTT, Broadlink,Dombus
-
Gravityz
- Posts: 652
- Joined: Wednesday 16 December 2015 19:13
- Target OS: NAS (Synology & others)
- Domoticz version: 2025.1
- Location: Netherlands
- Contact:
Re: .afterSec or afterMin do not work
thanks,
googled it and what do you know, found a thread started by myself about it
https://domoticz.com/forum/viewtopic.php?t=32845
i am getting old
in the old thread it seemed that the old timers were deleted once a new sequence started
not sure if this is still the case so i think it is best to always use the cancelQueuedCommands
googled it and what do you know, found a thread started by myself about it
https://domoticz.com/forum/viewtopic.php?t=32845
i am getting old
in the old thread it seemed that the old timers were deleted once a new sequence started
not sure if this is still the case so i think it is best to always use the cancelQueuedCommands
-
solarboy
- Posts: 357
- Joined: Thursday 01 November 2018 19:47
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2024.6
- Location: Portugal
- Contact:
Re: .afterSec or afterMin do not work
Intel NUC with Ubuntu Server VM (Proxmox),mosquitto(docker),RFXtrx433E,zwavejsUI (docker),Zigbee2mqtt(docker),Harmony Hub plugin, Kodi plugin,Homebridge(docker)+Google Home,APC UPS,SMA Modbus,Mitsubishi MQTT, Broadlink,Dombus
Who is online
Users browsing this forum: Bing [Bot] and 1 guest