Hi,
I like to split up my main LUA script to more small functional LUA scripts. More neat programming I think.
But now I have a question.
I have an ALARM.LUA that checks some stuff related to the alarm triggers.
There is a devicechangend check for DOOR
But I like to do a devicechanged check for DOOR in other script too.
(for switched lights on - in this example)
But when I have to LUA scripts (type device) and do DEVICECHANGED for the same thing in both scripts. Will this work?
same devicechanged in more LUA's
Moderator: leecollings
- Siewert308SW
- Posts: 290
- Joined: Monday 29 December 2014 15:47
- Target OS: Raspberry Pi / ODroid
- Domoticz version: Stable
- Location: The Netherlands
- Contact:
Re: same devicechanged in more LUA's
For sure it will work.
Even if you want 30 different Lua event files/scripts to be triggered on a certain devicechange
Even if you want 30 different Lua event files/scripts to be triggered on a certain devicechange
Setup:
- RPi4 - Domo Stable / Aeotec Z-stick7 / PiHole Unbound Gemini
- RPi4 - PiHole / PiVPN Unbound Gemini
- Synology DS923+ / DS218j
- P1 Gas/Power, SmartGateway watermeter
- Fibaro switches, contacts, plugs, smoke/Co2 ect
- rootfs @ USB HDD
- RPi4 - Domo Stable / Aeotec Z-stick7 / PiHole Unbound Gemini
- RPi4 - PiHole / PiVPN Unbound Gemini
- Synology DS923+ / DS218j
- P1 Gas/Power, SmartGateway watermeter
- Fibaro switches, contacts, plugs, smoke/Co2 ect
- rootfs @ USB HDD
- waaren
- Posts: 6028
- Joined: Tuesday 03 January 2017 14:18
- Target OS: Linux
- Domoticz version: Beta
- Location: Netherlands
- Contact:
Re: same devicechanged in more LUA's
Yes. Does work in Lua and also in dzVentsensingg wrote: ↑Thursday 31 January 2019 14:29 I like to split up my main LUA script to more small functional LUA scripts. More neat programming I think.
But now I have a question.
I have an ALARM.LUA that checks some stuff related to the alarm triggers.
There is a devicechangend check for DOOR
But I like to do a devicechanged check for DOOR in other script too.
(for switched lights on - in this example)
But when I have to LUA scripts (type device) and do DEVICECHANGED for the same thing in both scripts. Will this work?
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