Hi,
Suppose I have 10 scripts all triggered by the same motion sensor... one of which actually turns the light on and the rest of which are less urgent. How can I ensure the one that turns the light on runs first? If I cant is there to call a dzvents script at the end of another script (so main script is called by the motion sensor, other script called at the end) Ideally in this case the other script needs to be dzvents as it will have other triggers.. cant be a generic lua function easily I dont think.
Cheers,
Dan
Script Processing Order
Moderator: leecollings
-
- Posts: 536
- Joined: Friday 23 December 2016 16:40
- Target OS: Raspberry Pi / ODroid
- Domoticz version: Stable
- Location: Netherlands Purmerend
- Contact:
Re: Script Processing Order
eeehhhhhh make 1 script instead of 10 ? or ?
- waaren
- Posts: 6028
- Joined: Tuesday 03 January 2017 14:18
- Target OS: Linux
- Domoticz version: Beta
- Location: Netherlands
- Contact:
Re: Script Processing Order
You can influence the running order by using the desired order in the scriptnames. Script 1xxxx will be processed before 2xxxxDanM wrote: ↑Friday 31 August 2018 10:32 Suppose I have 10 scripts all triggered by the same motion sensor... one of which actually turns the light on and the rest of which are less urgent. How can I ensure the one that turns the light on runs first? If I cant is there to call a dzvents script at the end of another script (so main script is called by the motion sensor, other script called at the end) Ideally in this case the other script needs to be dzvents as it will have other triggers.. cant be a generic lua function easily I dont think.
Because the domoticz event system (and therewith dzVents) is single threaded script 2xxxx will not start before 1xxxx has finished.
Debian buster, bullseye on RPI-4, Intel NUC.
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
Who is online
Users browsing this forum: No registered users and 1 guest