Building a Home Automation System (For Fun)

Matt Tucker, Senior Engineer

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

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 automation system 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.
shutterstock_94857262
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.

Cardinal Peak
Learn more about our Audio & Video capabilities.

Dive deeper into our IoT portfolio

Take a look at the clients we have helped.

We’re always looking for top talent, check out our current openings. 

Contact Us

Please fill out the contact form below and our engineering services team will be in touch soon.

We rely on Cardinal Peak for their ability to bolster our patent licensing efforts with in-depth technical guidance. They have deep expertise and they’re easy to work with.
Diego deGarrido Sr. Manager, LSI
Cardinal Peak has a strong technology portfolio that has complemented our own expertise well. They are communicative, drive toward results quickly, and understand the appropriate level of documentation it takes to effectively convey their work. In…
Jason Damori Director of Engineering, Biamp Systems
We asked Cardinal Peak to take ownership for an important subsystem, and they completed a very high quality deliverable on time.
Matt Cowan Chief Scientific Officer, RealD
Cardinal Peak’s personnel worked side-by-side with our own engineers and engineers from other companies on several of our key projects. The Cardinal Peak staff has consistently provided a level of professionalism and technical expertise that we…
Sherisse Hawkins VP Software Development, Time Warner Cable
Cardinal Peak was a natural choice for us. They were able to develop a high-quality product, based in part on open source, and in part on intellectual property they had already developed, all for a very effective price.
Bruce Webber VP Engineering, VBrick
We completely trust Cardinal Peak to advise us on technology strategy, as well as to implement it. They are a dependable partner that ultimately makes us more competitive in the marketplace.
Brian Brown President and CEO, Decatur Electronics
The Cardinal Peak team started quickly and delivered high-quality results, and they worked really well with our own engineering team.
Charles Corbalis VP Engineering, RGB Networks
We found Cardinal Peak’s team to be very knowledgeable about embedded video delivery systems. Their ability to deliver working solutions on time—combined with excellent project management skills—helped bring success not only to the product…
Ralph Schmitt VP, Product Marketing and Engineering, Kustom Signals
Cardinal Peak has provided deep technical insights, and they’ve allowed us to complete some really hard projects quickly. We are big fans of their team.
Scott Garlington VP Engineering, xG Technology
We’ve used Cardinal Peak on several projects. They have a very capable engineering team. They’re a great resource.
Greg Read Senior Program Manager, Symmetricom
Cardinal Peak has proven to be a trusted and flexible partner who has helped Harmonic to deliver reliably on our commitments to our own customers. The team at Cardinal Peak was responsive to our needs and delivered high quality results.
Alex Derecho VP Professional Services, Harmonic
Yonder Music was an excellent collaboration with Cardinal Peak. Combining our experience with the music industry and target music market, with Cardinal Peak’s technical expertise, the product has made the mobile experience of Yonder as powerful as…
Adam Kidron founder and CEO, Yonder Music
The Cardinal Peak team played an invaluable role in helping us get our first Internet of Things product to market quickly. They were up to speed in no time and provided all of the technical expertise we lacked. They interfaced seamlessly with our i…
Kevin Leadford Vice President of Innovation, Acuity Brands Lighting
We asked Cardinal Peak to help us address a number of open items related to programming our systems in production. Their engineers have a wealth of experience in IoT and embedded fields, and they helped us quickly and diligently. I’d definitely…
Ryan Margoles Founder and CTO, notion