My Update Blog
Wiring Closet
Main Controller
RS485 Network
Plantation Shutters
Lighting & Devices
Audio System
Climate Control
iPhone Detection
Contact Me
Custom Nodes
Multi-Purpose Node
Servo Controller Node
IR Occupancy Counting
Bed Occupancy Node
Old Townhouse
Old Macros and Events
Old Wiring and Design
Old Lighting and Devices
Old Audio Componets
Old Security System
Old iPhone Web Interface

Washington, NC Real Estate - A cool site with real estate information in Washington, Bath, and Belhaven, North Carolina.

Greenville, NC Real Estate - Another real estate site with information for Greenville and Winterville, NC.

Morehead City, NC Real Estate - Another real estate site with information for Atlantic Beach and Emerald Isle, NC.

Jacksonville, NC Real Estate - A real estate site with information for Jacksonville, NC and Richlands, NC and homes for sale.

Macros and Events

My home automation system was meant to have as little human interaction as possible. I tried to look at things I did repetitively in my everyday life and then write some code to automate them. It seems like my code is always ever-changing, but I'll do my best to keep this page updated with the latest abilities of my automation system.

Departure Events
When I leave I usually arm the alarm system on my way out using the Insteon KeypadLinc next to the front door, either of the two DSC keypads, or my iPhone web interface, which causes the house to go into shutdown mode. In the unlikely event that I forget to set the security system, the house will auto-shutdown after 10 minutes of inactivity and someone leaving out the front door last.

When the house shuts down, many events take place based on logic regarding how I left things on the way out. If there is music playing, it is paused. All lights in the house are turned off if they were on upon walking out the door. If the security system was not armed upon leaving, the main controller will arm the system in away mode if all zones are ready. If shutdown mode was initiated because I manually armed the alarm system using the KeypadLinc on the way out, the system will try and lock the front door using the electronic deadbolt three seconds after the front door has closed. This prevents me from having to use a key to lock it on the way out. The system will not lock the door if shutdown mode was initiated because the house was idle for 10 minutes. This is to prevent me from being locked out when I walk outside randomly for more than 10 minutes.

If the house detects that the front door did not lock successfully, it will try again up to three times. After the 3rd time, it will blink the front porch light using the Insteon KeypadLink for 30 seconds to let me know that I need to go back to check the front door.

Arrival Events
When the house is in shutdown mode (see above), it waits for me to return by searching for my iPhone. Upon sensing my iPhone from the car in my pocket, the house starts a 60-second window where I can enter the house. To let me know that the main controller found my iPhone, I have the main controller blink the front porch light outside on and off every two seconds using the Insteon KeypadLinc next to the front door. If the deadbolt was locked, it is immediately unlocked at the start of the grace period window. If lights were automatically turned off when I left the house originally, they are turned on to light the house upon entering.

If I do not open the front door within this 60-second window, the door re-locks, the front porch light stops blinking, and the main controller will again start to search for my iPhone. This is to prevent me from accidentally unlocking the house in the event I need to give something to someone, get something out of a car, or go to a neighbor's house after leaving.

Once the front door has been opened, several events take place. The security system is automatically disarmed for the house. If I have been gone for more than an hour, the house goes over some general announcements including how long I have been gone, how and who disarmed the security system, and the projected weather forecast for the next 16 hours. Five seconds after the announcements have finished, my music will be resumed if I left it playing when I left.

Of course if I forget my iPhone or the battery dies, I simply use the backup key for the deadbolt and disarm the security system by hand. The main controller will then launch the arrival events as if I had used my phone like normal.

Nighttime Mode
When I'm home I have the lights automatically turn on throughout the house right at sunset. MisterHouse uses the \$Time_Sunset variable to determine the current day's sunset time based off your exact latitude and longitude location. Most of the rooms in my house are motion triggered for lights, but I usually keep those dimmed down to 30% when no motion has been detected for five minutes to conserve power.

When the weather is 'cloudy' outside, I have the system turn on the lights 45 minutes prior to sunset and for 'mostly cloudy' I have them turned on 30 minutes prior. This is because the house seems to get darker much earlier on these days due to the lack of direct sunlight. I pull the current conditions every 20 minutes from the national weather service so that the system always knows the current weather outside.

As soon as $Time_Sunrise rolls around in the morning, I have all the lights turned off if they are still on and daytime mode resumes.

Late-Night Mode
Once 10:00pm rolls around and I'm home, the house goes into late-night mode. All of the lamps downstairs are dimmed down to 50% brightness. The house is switched to “mute” mode where only important and necessary announcements will be made across the speaker system.

Bedtime Mode
Upon me setting the security system to arm-stay mode using either the DSC keypad in my room or my iPhone web interface, the house starts to shutdown in preparation for sleeping mode. All lights in the house are turned completely off. If any motion is detected in a room, the lights will ramp up from off to 50% slowly so that my eyes can adjust to the light. Any music that is playing will be stopped and resumed in the morning when I wake up. The front door is automatically checked to see if it is locked using the deadbolt sensor I made, and if it is not, the main controller will try and lock it and tell me the result.

Jon Scott 2012 -- All Rights Reserved.