Home Automation with Zwave and the HomeTroller Zee (Part 3)

In the previous posts, I gave an introduction to Zwave, described the overall system architecture, and demonstrated the installation of the HomeTroller Zee.  In this post, I will describe the installation of the GE Zwave lightswitch and its connection to the Zwave network.  The GE switch is made by a company called Jasco – which claims to be a privately owned company that “develops cutting-edge consumer products” for GE.

First, the lightswitch box.  It contains well written instructions in three languages and the switch.  The picture below shows two switches (so that I can show the front and the back of the switch in the same picture).

 

switch

The next step, and the most important thing for me to do today is fervently avoid getting shocked while doing the installation.  You would think that an electrical engineer would have enough sense not to install the switch without first turning off the breaker, but I always figure that I can get away without doing it HOT, a plan that invariably misfires.  So, today I will start by turning of the breaker – something that I recommend you do as well.

In my barn there is a group of three light switches on the “narrow” form factor.  For my installation I will replace all three switches as I could only find (at Lowes) a cover plate with 3 wide holes.  The switch on the left will be the barn lights (the one that gets left on my by son all the time).  The other two I will replace (for now) with dumb switches that cost $2.

aone

The next step is to install the Zwave switch.  The original light switch has three connections, one bare copper ground, one “hot” wire from the line, and one wire going to the lights. The Zwave switch has four terminals, three of them are the same as the original switch and one is the added “neutral”.  In order for the switch to operate it requires power and neutral to run the Zwave microcontroller – hence the need for the neutral.  I created the new neutral connection wire by wire-nutting a new wire to the inside of the box attached to the pre-existing neutrals.  I used a multi meter (with the power still on) to find the “hot” line side of the light switch.  This was confusing as you can see from the picture the switch was installed upside down (your can faintly see the “off” label in the wrong place).

atwo

Once you have the switch wired, reassemble your box and turn the breaker back on.  You should see the status LED glowing blue.

athree-1

The next step is to pair the Zstick with the light switch.  There is a battery in the Zstick that needs to be charged in order for this step to work.  After I unboxed the HomeTroller, I plugged the ZStick into a USB port for about an hour to charge the battery.  In order to launch the pairing process, start by pressing the button on the Zstick (it will then start blinking at about 1 Hz).  Then press the top of the light switch (like you are turning it on).  The light on the Zstick will then blink rapidly for about 3 seconds, then go back to blinking at 1 Hz.  The rapid blinking indicates a successful pairing.  Once you have them paired, press the Zstick button once to end pairing mode.  If you had multiple devices (for instance if you were an installer)  you could do more pairing before going out of pairing mode.

foura

The next post will describe the process of reading the information from the Zstick into the HomeTroller.

Commentary on Zwave

This whole home automation space is crazy.  It is fractured into many many different and incompatible “standards”.  I have heard (though not verified myself) that many of the Zigbee radios used for home automation are not compatible and there are cases where the central hub has multiple radios to deal with the differences in the networking stacks.  Other physical standards, like WiFi, have standard physical layers (802.11) and standard network layers (TCP/IP) but lack standardization higher up in the application layer.

So, Zwave.  There are literally hundreds of compatible devices. And, as best I can tell, it can handle most anything that you would want or need to do home automation.  I personally think that it is really cool that I can buy Zwave devices at Lowe’s in Georgetown, Kentucky.  You can also buy them at Amazon, Staples and many other online places.  That is pretty awesome.   Zwave also seems to be one of the least expensive radio standards; you can buy modules in low quantities from Digikey for $5.  The least expensive WiFi modules are something like $15 in low volume.

But it is really annoying that Sigma tries to squash the low volume market by raping their would-be customers for development kits and software licenses.

On the hub/host side of Zwave there is OpenZwave, an open source project to provide host side control of Zwave networks.  The groups seems to be pretty active and I think that I will try out some of their stuff.

IOT Cloud Tools

I am aware of the following organizations that provide IOT Cloud tools:

As time goes on, I’ll try them out and write about them.

If I missed one, or you are interested in a particular one, leave a comment on this post.

Home Automation with Zwave and the HomeTroller Zee (Part 2)

Like any good engineer, the first thing I did after unboxing the HomeTroller was to take it apart.  In this case, I had two motives. First, I wanted to make a backup of the SD Card that runs the Raspberry Pi.  Second, I am always interested in what can be learned by looking inside.  In this case, you have  fairly normal Rasberry Pi with a nicely executed case.  The case was held together with 4 screws on the back.  It included a cover for the SD card (in the lower left of the photo).  The interesting thing – to me anyway – was the clear plastic LED guides.  You can see them in the upper right.  Their function is to redirect the light of the LEDs to come through the top of the case so as to be visible on the outside.

rpi

 

Included in the case is an 8 GB SD Card which holds Linux + the Hometroller software.  I checked on the Homeseer web site on the Support->downloads->current downloads page and was not able to find the HomeTroller Raspberry Pi image. I found it curious that there is also a Support->downloads->older downloads which contained current software – specifically drivers.

All that being said, it is good to make a backup of the SD Card before you start.  For this task (on my Windows 8.1 PC) I used the Win32 Disk Imager, which can be downloaded from their Sourceforge website. If you have a Mac or a Linux computer, you can find the instructions for this process on the Raspberry Pi website.  The process is straight forward. First, insert the SD Card and figure out which drive letter it was assigned using the Windows explorer. Then enter the destination file (in my case hometroller.img on the desktop), select the “copy” check box, then press read. A few minutes later, you will have a binary image file of the card which can be restored to your SD card (or another one) using the reverse process.

diskimage

After you have completed the backup process, reassemble the whole thing and plug in the power and an ethernet cable.  The RPi will then boot and join your network using DHCP to get  its IP address. After a couple of minutes, you will be able to access the webserver running on the RPi.  To find your HomeTroller, go website http://find.homeseer.com and it will search your network.  In this case, you can see that I have two of them plugged in.

find

Click on IP address and your browser will open up a web page on the HomeTroller to setup the accounts and passwords.

setup

The next step is to setup your HomeTroller.  To do this, go to Tools->setup. Then:

1. Enter your license information (your ID and Password is on the back of the RPi)

2. Setup the physical location and timezone.

license1

 

3. If you are going to use WiFi, click on the network (1) tab and configure the SSID etc (2). In my case, I am using a USB WiPi Wifi dongle.  I plugged in the dongle while the RPi was alive (specifically while I was typing this tutorial) and the RPi immediately went offline.  After the system rebooted, I went to the tools->setup page, clicked the network tab, then entered my WiFi networking parameters (SSID, Security type and network key).  Then I shutdown the RPi using Tools->System->shutdown. Once the RPi was shutdown, I removed the ethernet cable and then unplugged/replugged the power. After two more minutes, the RPi came back online  attached to Wifi.  However, just to make things interesting, it had a new IP address – because it had a new mac address, so the DHCP server assigned it a new address, so you will need to go to the find website again.

The last thing that I did after configuring my HomeTroller was clean out the bogus example devices.  You can do this by going to view->device management.

viewdevices Lastly, click “Test Device 2 (can be deleted) and then delete it.

deletedevices

In the next post, I will describe the process of installing and attaching the light switch to the network.

Home Automation with Zwave and the HomeTroller Zee (Part 1)

I live out in the country near Lexington, Kentucky.  A few years ago my wife told me that I either needed to build a barn to store bicycles, or get a divorce.  So, I built a barn – well, actually, I had a barn built.  The barn has been great, except for one major pain in the neck.  Invariably I look out the window at bed time and find that my son has left the damn lights on.  It is incredibly annoying to go outside in the dead of winter, or even summer, in your pajamas to turn out the lights.

photo (8)
The barn from my window… in the dark with the lights on

After rejecting the Adrian Peterson method (wake up the kid, beat him, and then send him outside to turn off the lights), I settled on the another answer: connecting the barn lights to the Internet.  I considered a number of different alternatives, but after talking with a friend of mine, Eric Ryherd at Express Controls, he convinced me to implement a Zwave home automation system.

Zwave is a proprietary 900ish MHz radio system (radio, protocol, etc), low bandwidth (100kb/s) that was designed for home automation.  The “ish” is a result of the 900 MHz band not being regulated the same way in all countries.  As a result, there are three different radios configurations to cover the world.  Zwave has a number of attributes which make it excellent for home automation including:

  • Long battery life (>6 months)
  • Low latency
  • A true, simple mesh network
  • A single dictatorial company (Sigma Designs) controlling the protocol and certification (resulting in strong standardization)
  • Range in excess of 100 feet
  • Easy client-to-server binding

The flip side is that:

  • A single dictatorial company controls the standard and the silicon (resulting in insanely expensive development kits, restrictive license agreements etc)
  • Multiple radios required to work around the world

The other interesting thing about Zwave is that Lowe’s has made Zwave part of their Iris home automation system.  This means that you can purchase some Zwave stuff at almost any of their locations – including Georgetown, Kentucky.

You can read more about Zwave at:

For the initial implementation I bought:

The HomeTroller Zee is a Raspberry Pi based system.  The Raspberry Pi comes pre-installed with Linux, the ZStick device drivers, and the Zwave management webserver.

Included in the package is:

homeseerbox

In order to bridge between the Zwave world and the Internet world the kit includes an Aeotec Zstick 2.  This device has two functions:

  1. It is a battery powered installation device.  You can walk around with the device, press the button to start the pairing process, press the target device pairing button, which will result in the target and the stick being paired i.e. the target device is now part of the Zwave network.  Then, when you plug the Zstick into the Raspberry Pi USB port, you can then upload all of the paired devices into your Zwave network configuration.
  2. It is a USB dongle that provides the Raspberry Pi with a Zwave radio interface.

For my implementation, the overall system architecture looks like this:

systemarchitecture2

 

The barn lights are connected to the GE switch (via normal 120v house wiring).  The GE Switch communicates to the ZStick via Zwave  radio.  The Zstick communicates to the RPi via a USB->Uart connection.  The RPi talks to the internet via Wifi (routers etc.)

In the next post I will describe the HomeTroller Zee installation.