I’ve decided it’s time to change gears here at the tech lab, a new years resolution if you will.  Now that it’s too cold outside in the great white north, I’ve decided to stay inside and try my hand at home automation.  For most people, the term “home automation” conjures up visions of refrigerators that keep track of grocery lists and sports scores – Never fear, I don’t do the grocery shopping and I couldn’t care less about televised sports.  It seems that every company is dipping their feet into the automation market, our local television provider is offering a service that allows you to set recording schedules on your DVR from your cell phone – across town the home security company now allows you to arm and disarm your alarm system from anywhere.  One of the problems with all of these systems is that they rarely work together.

In this article I’m going to provide a chronicle of how my home automation system integrates with multiple products into one great interface.

The Technology

There are many different platforms in which to base your automation system on, I am going to focus on “ZWave” – which I choose because it’s a closed proprietary system.  While many would consider closed systems a disadvantage, I am of the old school opinion that the less public access to the source code – the harder it is to compromise.  There isn’t a piece of code written by a human in the world that doesn’t have a security flaw, when it comes to controlling your home – it needs to be secure.

ZWave works by transmitting encrypted radio signals in the old 900 MHz cordless phone band either to a central controller and/or an ad-hoc infrastructure simultaneously.  The majority of ZWave products are light switches, wall outlets, door sensors, and motion detectors.  The advantage is that no extra wiring needs to be installed in your home, provided the homes wiring meets modern wiring standards of both neutral and common wires running to each device; This is a requirement due to the ZWave radio needing constant power.  The disadvantage is that your devices are limited by radio reception, ZWave overcomes this hurdle by employing a “mesh network” topology – no one device needs to communicate with the central controller directly, each device is able to relay instructions on behalf of another device.  In my example below, I’m using the capabilities of a mesh network to communicate with an outdoor electrical outlet located in the parking lot of our apartment complex.

Mesh Network

Since ZWave chips are available for purchase by both the hobby crowd and serious developers, new products are being developed every day – but the sky is the limit when you start integrating other systems into your automation plan, like infrared for example.

The Considerations

While it may seem like a great idea to install things like heating controls and flood sensors in your automation network, always consider fail safes.  For example, what if your automated network goes down?  Do you have another means of controlling your thermostat?  If your home is prone to flooding in the spring, how does your sump pump turn on in the event your automation controller goes down while you’re on vacation?  What I’m really saying is, when possible only use your automation controller to monitor and augment your homes systems.  Integrate flood detection systems that monitor the status of your flood sensor and sump pump system and provide bypass options if desired.  Setup automation systems to control the thermostat itself and not the entire heating and cooling system.  Failure to create fail safes can and will result in the HAL 9000 rocking your world.

Pump Diagram

Also consider the scale of your project – with a mesh network you can get a large distance between your controller and a wall switch, the maximum device limit is around a 200 devices.  ZWave is designed for home use and while it is a very robust system, traditional wired systems like C-BUS which are very tried and tested may be more appropriate in larger commercial and industrial applications.  With all those disclaimers in mind, let’s dive into the nuts and bolts.

The Hardware

  1. Mi Casa Verde VeraLite – ZWave central controller
  2. Evolve ZWave Duplex Wall Receptacle
  3. Evolve ZWave Wall Switch
  4. GE ZWave Outdoor Plug-In On Off Module
  5. Everspring Compact ZWave Motion Sensor
  6. Aeon Labs Aeotec ZWave Door Window Sensor
  7. Logitech Harmony Smart Control – Infrared Gateway

The Plan

Floor Plan


Entry Light -> Light turns on when door sensor detects the door has been opened.  Device is further self aware in that it only does this after sunset.  Turns off at 3 minutes.

Desk Lamp -> Fairly simple, lamp is controllable from the web interface or by a hot key on the nearby keyboard that runs a PowerShell script.

 [xml]$status = Invoke-WebRequest "http://verde:3480/data_request?id=status&output_format=xml&DeviceNum=8"
 IF ($status.root.Device_Num_8.states.state[1].value -eq 1) {
 Invoke-WebRequest "http://verde:3480/data_request?id=lu_action&DeviceNum=8&serviceId=urn:upnp-org:serviceId:SwitchPower1&action=SetTarget&newTargetValue=0" }
 Invoke-WebRequest "http://verde:3480/data_request?id=lu_action&DeviceNum=8&serviceId=urn:upnp-org:serviceId:SwitchPower1&action=SetTarget&newTargetValue=1" }

Storage Light -> Light turns on when motion is sensed in the storage room, turns off after 10 minutes.

Air Conditioners -> Physical power is switched to the unit via ZWave, the temperature setting and running mode of the air conditioners are set by the Harmony Hub via infrared.  The Vera sends commands to the Harmony Hub over the local network, in turn the Harmony sends infrared commands to the air conditioner as if someone were standing in front of it with a remote control.

AC Diagram

The Deployment

The first thing we must accomplish is getting the VeraLite running, knowledge of computer networking is an asset but not necessarily a requirement.  You will want to go online and setup an account with Mi Casa Verde.  Once your account is setup, it will detect the Vera on your local network and allow configuration of the network settings for local access.  At which point, you will have two options on how to access the automation control panel.

  1. Mi Casa Verde – Allows you to control your device when you’re outside of your homes network (requires login credentials)
  2. Locally – http://IP ADDRESS OF YOUR VERALITE/cmh  –  This allows control on your Vera while on your local network without login credentials

In my setup, I am using the following “apps” installed on my VeraLite – so if you wish to duplicate my setup, now would be a good time to install these from the “APPS” tab at the top of your control panel.

  1. Harmony Hub Control
  2. Program Logic Core
  3. Wunderground Weather Plugin

Now it’s time to install your ZWave devices and start connecting them to your Vera network, each device needs to be right next to the automation controller for pairing.  From the Vera’s main screen, select Devices -> Add Devices and follow the prompts.  The Vera Lite offers two methods for pairing, the first method is to put AA batteries in the bottom of the Vera and take the unit directly to the ZWave device (handy for wall switches and sockets); The second option is to bring the device to the Vera, however when using this option keep in mind it’s best to pair the devices where they are going to be installed so the unit can properly build its mesh network.  Once you’ve finished this process, you’ll have something which looks like this.

The Integration

For the sake of brevity, I’m only going to cover one of my automations.  Under the “Outside” tab in the picture above, you will see “Ryan’s Car Timer” – This is a “Program Logic Timer Switch” control which gathers data on outside temperature from Weather Underground (though you could deploy physicals sensor), and uses it to adjust the amount of time my cars block heater and car warmer will run each morning before I leave for work.  Here is an expanded view of what this logic switch considers.

Block Heater Plan

Logic Conditions


The “ALLOFF” logic state is what turns the block heater plug off when it’s suppose to turn off.

“COND15” SAYS: IF the temperature is below -15 AND requirements for SCHED0 OR SCHEDDAD0 have been satisfied, make state TRUE

The “COND15” logic state is what will turn the block heater plug on when the temperature drops below -15.

It takes a bit to figure out how this logic system works, however once mastered you’ll find it far more robust than the built in method without having to learn complicated scripting.

Final Thoughts

AC Controls

In one of my diagrams above, I show the logical view of how an air conditioner can be controlled from the VeraLite.  A schedule could be created, or temperature sensor monitored to turn the air conditioner on and off from the Vera when linked to your Harmony Hub.  This control is the “Harmony Hub Control” app programmed for my office air conditioner, each button will send the appropriate infrared command as if you were controlling it from the remote control.  You could use a Logic Switch to push these buttons based on environment sensors.

Leave a Reply

Your email address will not be published. Required fields are marked *