Lua script running every 5 - 10 seconds
Posted: Monday 11 February 2019 21:35
Hey Guys,
I'm new with Domoticz, and trying to make a LUA script for splitting my DHT11 temp/hum sensor.
this is the code, i found it online and changed it for my needs.
The problem is that my log-file is full of status triggers for this script. How can i add a line to it, so the value is the same, it does not update the dummy switch?
so.. when the temp or hum changes, it wil trigger the LUA script?
Thanx for the help all...
I'm new with Domoticz, and trying to make a LUA script for splitting my DHT11 temp/hum sensor.
this is the code, i found it online and changed it for my needs.
The problem is that my log-file is full of status triggers for this script. How can i add a line to it, so the value is the same, it does not update the dummy switch?
so.. when the temp or hum changes, it wil trigger the LUA script?
Thanx for the help all...

Code: Select all
commandArray = {}
sensorTemperature, sensorHumidity, sensorHumidityStatus = otherdevices_svalues['Schuur temp']:match("([^;]+);([^;]+);([^;]+)")
table.insert (commandArray, { ['UpdateDevice'] = string.format("%d|0|%.2f", otherdevices_idx['schuur temperatuur'], tonumber(sensorTemperature)) })
table.insert (commandArray, { ['UpdateDevice'] = string.format("%d|%d|%d", otherdevices_idx['schuur vochtigheid'], sensorHumidity, sensorHumidityStatus) })
return commandArray