Turn off air conditioning when doors are open

Spring is here, which means great weather and open doors or windows. In the past, the routine has been “Open door, close screen door, turn off air conditioning”. But with an Insteon-controlled thermostat and door/window sensors, the third part of the routine can now be automated.

door-status-thermostat

The thing is, we don’t want to turn off the A/C every time a door is opened, so we use a timer to only take action if any door is left open for more than 1 minute. And, in case we didn’t mean to leave that door open, we’ll also get a Pushover notification when the A/C goes off (and again when it’s back on).

Door Status
Here, if ANY door is open, we wait for a minute and set the state variable $doors_open. If ALL doors are closed, we kill all other instances of the program and reset the variable.

If
     Status 'Front Door' is On
  Or Status 'Kitchen Door' is On
  Or Status 'Living Room Door' is On
  Or Status 'Back Door' is On
Then
     Wait 1 minute
     $doors_open = 1
Else
     Stop program 'Door Status'
     $doors_open = 0

A/C Off
When the state variable is set, the A/C is turned off and a notification sent. When it’s un-set, the A/C goes back on.

If
     $doors_open is 1
Then
     Set 'Downstairs Thermostat' Mode Off
     Set 'Upstairs Thermostat' Mode Off
     Resource 'Pushover - Thermostat (off)'
Else
     Set 'Downstairs Thermostat' Mode Auto
     Set 'Upstairs Thermostat' Mode Auto
     Resource 'Pushover - Thermostat (on)'

air-condition-off

Posted by Matt Chiste
May 26
2 comments on “Turn off air conditioning when doors are open
  1. Andy says:

    Great article!

    How do you access this screen to write code?

    I just setup the Insteon for Hub mobile app but can’t find an IDE.

    Thanks

    • Matt Chiste says:

      Andy,

      This code uses the ISY-994i, which is a much more powerful “heart” of an Insteon system than the Insteon Hub. Most of the code examples on this site are based on the ISY994i.

 Subscribe to HomeAutomationGuru.com
    Add to Google Reader or Homepage

Enter your email address to subscribe: