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.

01.If
02.     Status 'Front Door' is On
03.  Or Status 'Kitchen Door' is On
04.  Or Status 'Living Room Door' is On
05.  Or Status 'Back Door' is On
06.Then
07.     Wait 1 minute
08.     $doors_open = 1
09.Else
10.     Stop program 'Door Status'
11.     $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.

01.If
02.     $doors_open is 1
03.Then
04.     Set 'Downstairs Thermostat' Mode Off
05.     Set 'Upstairs Thermostat' Mode Off
06.     Resource 'Pushover - Thermostat (off)'
07.Else
08.     Set 'Downstairs Thermostat' Mode Auto
09.     Set 'Upstairs Thermostat' Mode Auto
10.     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: