Lua Event File system based scripts can be fast aswell.
But the conventional way as we know now with a bunch of lua files in one folder can make the system decrease in speed.
It's caused by all the commandArray {} and return commandArray
On my RPi3 i have one single file which controls that.
Major advantage is file based event system is faster more responsive and the memory footprint aswell as the cpu usage is much better.
Below a part of my log file.
Show the reaction time between a 433mhz sensor and time it took to switch the light.
Reaction time from Motion Sensor -> Domoticz -> switching light is 0.030 seconds
Code: Select all
2017-05-18 17:20:37.322 (RFXtrx433e) Lighting 2 (W.C Motion)
2017-05-18 17:20:37.356 (RFXtrx433e) Lighting 2 (W.C Lamp)
2017-05-18 17:20:37.357 LUA: ========================= EVENT LOG =========================
2017-05-18 17:20:37.357 LUA:
2017-05-18 17:20:37.357 LUA: Message:
2017-05-18 17:20:37.358 LUA: "W.C Motion" sensor detected motion
2017-05-18 17:20:37.358 LUA: .............................................................
2017-05-18 17:20:37.358 LUA:
2017-05-18 17:20:37.358 LUA: Executing:
2017-05-18 17:20:37.358 LUA: > "W.C Lamp" set: On REPEAT 2 INTERVAL 1
2017-05-18 17:20:37.358 LUA: > "W.C Standby" set: On
2017-05-18 17:20:37.358 LUA:
2017-05-18 17:20:37.358 LUA: =============================================================
Setup:
- DS923+ Docker
Domoticz Latest Stable
Mosquitto / ZwaveJSUI @ Aeotec Z-Stick Gen5+ / PiHole Unbound
P1 USB Gas/Power, HW watermeter
- A lot of Zwave switches, contacts, plugs, smoke/Co2 ect
- DiY 7.5kWh Solar Storage @
GitHuB