hmm, that's too basic example!
I've decided to write a new script that detects fire by checking the rooms temperature:
* read a
configuration file with the list of room name, temperature sensor name, deltaT to trigger the alarm
* stores in a variable, json encoded, the list of average temperature for each room
* when in one or more rooms the
Temperature > Average_temperature + deltaT => send notification by Telegram
* works with both simple temperature and temperature+humidity(+barometric) sensors.
You can find the fire detector scripts in https://github.com/CreasolTech/domoticz_lua_scripts : they have to be placed into Domoticz
scripts/lua directory:
* script_time_fireAlarm.lua => lua script triggered every minute
* config_fireAlarm.lua => configuration file
* globalvariables.lua => another configuration file with telegram API information and something else
* globalfunctions.lua => some functions that are used from my scripts
I'm just checking the script now... if you have any suggestions, please let me know!
I hope this script can be helpful even for you!!