In my case I have a separate DSC alarm panel with smoke detectors and rate-of-rise heat detectors but Domoticz controls my 3 Z-Wave thermostats. I used an Aeotec ZWA012 door/window sensor external inputs tied to a relay which triggers off of an output on the alarm panel which triggers on a fire alarm.
Code: Select all
return {
on = {
devices = {'Fire alarm'}
},
execute = function(domoticz, item)
--Aeotec switch - Closed (off) / Open (on)
if domoticz.devices('Fire alarm').state == 'On' then
--turn all thermostats off
--Media room:
domoticz.executeShellCommand('curl --insecure --url "https://127.0.0.1/json.htm?type=setused&idx=38&name=Media%20room%20Mode&description=&tmode=0&protected=false&used=true"')
--1st floor:
domoticz.executeShellCommand('curl --insecure --url "https://127.0.0.1/json.htm?type=setused&idx=119&name=1st%20floor%20Mode&description=&tmode=0&protected=false&used=true"')
--2nd floor:
domoticz.executeShellCommand('curl --insecure --url "https://127.0.0.1/json.htm?type=setused&idx=27&name=2nd%20floor%20Mode&description=&tmode=0&protected=false&used=true"')
domoticz.log('FIRE ALARM - ALL THERMOSTAT MODES SET TO OFF',domoticz.LOG_ERROR)
domoticz.notify('FIRE ALARM','ALL THERMOSTAT MODES SET TO OFF', domoticz.PRIORITY_HIGH, '', 'midx_1', domoticz.NSS_FIREBASE)
domoticz.notify('FIRE ALARM','ALL THERMOSTAT MODES SET TO OFF', domoticz.PRIORITY_HIGH, '', 'midx_2', domoticz.NSS_FIREBASE)
end
end
}