Building a Home Automation System (For Fun)

You’ll find that a lot of engineers like to tinker. In addition to the projects we work on for clients or employers, a lot of us like to put our skills to the test when it comes to our own homes, too. In my case, I wanted to try my hand at creating a home automation system. Because resources available to an individual are limited relative to what we have access to here in the Cardinal Peak hardware and software labs, I thought it would be a great way to hone my hardware skills and get back to the basics of engineering. Plus, with the proliferation of wireless technologies, mobile devices, and powerful microcontrollers, and the exponential growth of the Internet of Things, it’s now relatively easy and inexpensive to build powerful home automation systems providing improved convenience, security, and energy efficiency. If you’re interested in building your own home automation system but you aren’t sure where to begin, you could visit somewhere like Crestron London to get some inspiring ideas for your home.

More Than Just Turning On the Lights

lit up house at night pic

At an abstract level, there are two main solutions that an automation system provides: control and monitoring. For the concept of “control,” a home automation system allows you to control devices remotely, coordinate devices (i.e., grouping), and schedule devices to react to events automatically, like turning a light on at sunset. For “monitoring,” an automationsystem can monitor energy usage, provide logging, and provide the inputs for the event handling described earlier. For example, the data from home sensors can be set up to notify the owner of specific events, such as a window opening. This is all fairly obvious, but it’s important to understand why one would consider a new home automation system, especially since traditional home controls already work well.

My primary motivation for building a home automation system was that I wanted to automate an outside string of lights that are not on a switch. I also wanted to build a development platform to experiment with new technologies, such as beacons, voice recognition, and indoor positioning systems. I’ve been looking into security systems also, I’ve noticed an ai security camera while I was doing some research into systems online since I’ve been a bit curious about it. I commute to work on my bike on a regular basis, and it’s nice to have a well-lit entryway when I arrive home on dark winter nights. My end goal was to create a system that would detect when I was near and automatically turn on the lights. Granted, I could have just added a motion sensor to the lights, and that certainly would have been a fine solution. But as an engineer, I wanted finer control of the system and had a desire to research new technologies. With that in mind, I started looking for a low-cost, DIY solution.

Platform Overview

To begin, I wanted a system that was low cost, low energy, always on, and able to interface online. The system also needed to add and run home-automation radio devices such as Z-Wave and Zigbee. The ultimate choice was a Beaglebone Black Rev. C coupled with an Aeon Labs Z-Wave Z-stick.

The Beaglebone, a board often used by hobbyists, is a credit card-sized board running the Debian operating system. It has a 1GHz ARM® Processor, 4GB of onboard flash, and USB and Ethernet connectivity. These features make the Beaglebone an awesome development platform, and with all the I/O, the board has a lot of potential for additional hardware experimentation.

Why Z-Wave?

For Z-Wave connectivity, I chose the Aeon Labs Z-Wave Z-stick. Z-Wave is a low data-rate wireless network that can control a wide variety of Z-Wave enabled devices out in the market. It works in the sub-GHz frequency range (908MHz in the US and 860MHz in Europe), and thus does not interfere with Wi-Fi and Bluetooth networks. It is a proprietary protocol owned by Sigma Designs, but this is not such a bad thing as it provides better consistency between device vendors. Z-Wave consists of a mesh network (max of 232 nodes) where each node is a source and a repeater. In terms of range, a single node has a range of 100m in “open-air” conditions, but in practice, the range is typically much less (around 100 feet).

Installation

View the installation instructions I created here.

Software Overview

One of the main goals of this project was to experiment with different software technologies, algorithms, and automation ideas, so I knew I wanted to build most of the control software myself. For creating a server for this project the first decision was to choose a framework/language. There are two main winners here: Node.js/javascript and Flask/Python due to the extensive open-source libraries available for the two environments. I chose the former due its amazing build tools and since I knew I wanted to use Javascript for my home automation scripting. That said, Python is without a doubt one of the best languages for prototyping systems and would have been an excellent choice as well. (In fact for comparison, I also provide instructions for setting up the Beaglebone with Home Assistant here.)

Conclusion

In building a home automation system, I found that the current technology we have in our home is already quite good in terms of design simplicity and robustness. The simple light switch and door lock are fundamental pieces of technology that set the bar that home automation devices need to meet in terms of ease of use and breadth of function.

Did I meet my goal of being able to turn on my outdoor lights when I ride up to my house after a long day at the office? No, not yet. However, I now have a good base to work from. The next steps will be to determine presence via WiFi detection or a beacon. Good thing winter is a ways off.

For the tech enthusiasts among us or for anyone who is looking to make a saving, my friend recently changed his broadband provider through Usave. They have a great range of quotes, why not compare broadband quotes? There are plenty of savings to be had (see another great resource for comparing broadband).

Previous
Next