Turn off HVAC on fire alarm

Moderator: leecollings

Post Reply
User avatar
user4563
Posts: 108
Joined: Tuesday 19 October 2021 17:24
Target OS: Linux
Domoticz version: 2024.7
Contact:

Turn off HVAC on fire alarm

Post by user4563 »

A little dzVents script to immediately turn off the HVAC units and send a mobile notification when there is heat or fire. It could possibly save a life or buy some time as you don't want to distribute smoke around. Also if a fire starts at the HVAC unit then cutting the unit off may help as well.

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

}
ODroid H4+ / Ubuntu server
Aeotec Z-Stick Gen5+
ZWave-JS-UI
Domoticz for Android
Domoticz Scenes add-on in Kodi
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests