A Tour of My Home Automation System

It’s always around this time of year that I really start appreciating my home automation system. You see, we’re big on decorating for Christmas. Each year, we have loads of lights strung up both outside and inside. Before I had a home automation system, I would have to walk through the house each night before bed to unplug all those strands of lights. And of course, they had to be plugged back in to turn them on the next day. But with my home automation system, I can just press a single button to toggle them all on or off.

The main control panel used in my home

In this article, I’m going to give you a tour of my home automation system. I’ll take you through the solution I use, show you some of the hardware, and give you a peek into some of the automation jobs that I have running.

Automation Goals

It’s always fun to tinker with technology for its own sake is. But it’s even better when there’s some useful outcome from that tinkering. My home automation system is something that evolved over several years, but I’ve always had a couple of scenarios that drove my decisions as I pieced it together.

💡 Before jumping in and building a system, it’s important to take some time to think through what exactly you want to achieve with it. Your desired outcomes may influence the hardware and software decisions you make for your system.

Personally, my main goal was to have single-button lighting control. I wanted to be able to push a single button (physical or virtual) and toggle all the lights in a specific area of the house and the entire house as well. This was desirable not only for energy and cost savings, but also for the convenience of not having to go around from room to room to turn off lights and lamps that people left on.

Single-button lighting was primarily what I wanted from my system

I also had a few secondary goals, which were slightly less important, but things that I wanted, nonetheless. One of those was the ability to schedule lighting. Turning on the outdoor lights at dusk, for example, or making sure the lights on the first floor are all off in the middle of the night. I also wanted to be able to remotely control some specific receptacles. There have been many nights when I’ve laid in bed not being able to shake the terrifying thought that I’ve left a soldering iron on. It would be greatly convenient to turn off the receptacle while lying in bed.

As you can see, my scenarios are pretty basic, but they don’t need to be. I’ve seen systems with much more complex logic built in, such as using whether conditions, device proximity, and various sensors to automate physical surroundings. If you select the right system, a world of possibilities is opened up, and some interesting use cases emerge.

Control Software

Before I take you through the hardware, sensors, switches, receptacles, and all that other fun stuff, we first need to take a look at the brain of a home automation system – the control software. The software that you select here is what’s used for managing the system as a whole, performing all the automation, and (to some degree) determining which devices are compatible with your system.

Many Choices

My Old Vera 3 System

There’s quite a bit of home automation control software on the market, and it’s difficult to know which is better than others. Some of the more familiar products are Vera, SmartThings, and Home Assistant. These aren’t necessarily better or more stable than others; selecting the right product for you really depends on what you want out of it. For example, if you want something simple that’s very user friendly, then you might take a look at SmartThings. On the other hand, if you want something ultra-flexible you might look at Vera.

Why I Chose OpenHAB

For my own system, I chose to use an open-source project called OpenHAB (Open Home Automation Bus). Before becoming a long-term OpenHAB user, I did try out a couple of other products. My first system was based on the Vera 3. I loved the flexibility of it, but it wasn’t very stable. Sometimes I’d trigger a scene, and it would be 30 seconds before the lights would turn on. I also had a brief stint with SmartThings but ended up returning it because I couldn’t use it for some of the more complex automation scenarios I was thinking of.

Administration UI in OpenHAB

OpenHAB is truly a home automation system for makers. It’s vendor agnostic, so it works with many types of nodes. And as you’ll see when I talk about the hardware, the software is designed to run on a variety of devices such as old laptops, Raspberry Pi, and others. It’s also quite extensible; there’s a massive user community with hundreds of extensions that take the hard work out of integrating with various other systems. These are all great, but the primary reasons I chose OpenHAB were its the stability and responsiveness. I rarely have to reboot the system, and the system responds instantaneously, which is really important for a good user experience.

The Downsides of OpenHAB

There are some downsides to OpenHAB, as well. The big one is the learning curve due to its complexity. One of the things that is most confusing is OpenHAB’s object model. If you’re a new user, you’ll surely need to spend quite a lot of time reading through the docs and the tutorial before you start understanding how to simply toggle a light.

The approach used by OpenHAB is both a blessing and a curse. It leads to great extensibility, but at the cost of user-friendliness. I know for certain that my wife isn’t going to want to maintain this setup when I die, so I’ve actually written an instruction manual for her on how to remove it and go back to standard lighting, just in case.

A diagram that illustrates the relationship of concepts within OpenHAB’s semantic model

Primary Controller Hardware

After selecting the control software, the next step is to find some hardware to run it on. Some home automation software will come with its own controller hardware. For example, you can buy a SmartThings Hub, and it just works as a standalone system. But the major downside is that you’re locked into whatever home automation protocol is supported by that hardware.

Home Automation Protocols

When your controller wants to control a device, it needs to ‘talk’ to the device in a language that the device understands. This is where the various home automation protocols come into the picture. Protocols such as X10, Insteon, Zigbee, and Z-Wave have become popular over the years. Unfortunately, the home automation space hasn’t seen a single protocol standard emerge, so when shopping for a device to automate, you need to make sure it uses a protocol that’s compatible with your controller hardware.

Personally, I bought into Z-Wave years ago, simply because its security and peer-to-peer capabilities seemed superior to the other protocols at the time. Back then, I knew full well that Z-Wave isn’t open source, so it was a bit of a gamble to spend the money on all the Z-Wave devices I purchased. Fast forward several years, and you can see that adoption of Z-Wave really took off. Multiple protocols still exist, but Z-Wave seems to be the dominant one that’s emerged in the market, and many home automation controllers have native Z-Wave compatibility now.

RPi-Based OpenHAB Controller

Unlike products like SmartThings, OpenHAB doesn’t have a dedicated hardware controller device. Instead, it’s meant to be installed on a Windows, Mac, or Linux computer. If you happen to have an old laptop lying around, running OpenHAB on it would be a great way to repurpose it. The only thing you need to purchase is a USB device that supports the protocols you want to use. My recommendation is to go with Z-Wave, and use an Aoetec Z-stick, which costs around $50.

Aeotec Gen5+ Z-Stick

For my own controller, I use a Raspberry Pi 3 with a Gen 5+ Aeotec Z-Stick. To make it all tidy, I designed and printed a custom housing with a 3.5″ LCD integrated. At the moment, I just have it configured to show me a rolling log by using the multitail utility in Linux, but I do have the option of customizing the display to give other information about the system as well.

Custom OpenHAB Controller Enclosure

Setting up a pi-based controller is very easy with OpenHAB. The community has built a simple and easy-to-use SDCard image for the Raspberry Pi called OpenHABian. Installing it is as easy as downloading the image and flashing it to the SDCard you use in your Pi.

Popping the hood on my custom OpenHABian enclosure, you’ll notice the Pi 3 and the Aeotec Z-stick that I’ve crammed in there. The LCD display is wired into the GPIO pins of the pi directly. You’ll also notice that I added an external USB port in the rear. This is so I can plug in a USB keyboard in case I need to do any troubleshooting directly on the device. It is, however, on my network, so I typically just SSH into it from my PC when I need to run an update or take a look at something.

Lately, I’ve been thinking about a redesign of my enclosure. I’ll confess that I’m not a huge fan of its aesthetics. I’d also like a larger screen with touch capability so I can trigger scenes directly from the device.

Under the hood of my hardware controller

Secondary Controllers

The OpenHAB iOS App

These days, because of smart phones, a single home automation controller may be the only thing you need. Just about every system offers an Android or iOS app, so you always have a light switch handy, regardless of where you are in your home. OpenHAB is no exception; the smart phone app is decent and works as you would expect. But if you don’t want to rely on having your smart phone within reach, you can opt for one or more secondary controllers.

Secondary controllers give you the ability to trigger home automation events from a physical device. They come in many forms – a handheld remote control, a wall mounted button array, or even a big red button that you can use to execute the most nefarious of home automation scenes.

The main thing to understand about secondary controllers is they can be used to issue commands to your devices, but they can’t have nodes paired directly to them. So, you would normally have a single primary controller that has all your nodes paired with it, and then perhaps multiple secondary controllers in convenient locations throughout your home.

Currently, I have five secondary controllers in various rooms of my home, and I’m going to be adding a 6th soon as we wrap up some remodeling in my basement. Of all my controllers, there’s one in particular that gets used the most – a wall-mounted touch controller.

My Wall Mounted Touch Controller

My Simple Control Panel on the Q896S

The device I use is the Sibo 7-inch Q896S, which I purchased from Alibaba back in mid-2019 for $180. This Android device is mounted into the wall at a central location in my home. It uses Power over Ethernet (PoE), so there’s a single network cable running from my server closet straight into the device to both power it and give it network connectivity. This makes for a very clean setup.

On the software side, it’s running a vanilla Android 6 build, with only one app installed – Fully Kiosk. Upon startup, the kiosk app takes over the device and makes sure the OpenHAB web interface is displayed. I can exit kiosk mode to perform system maintenance (after entering a passcode), but I rarely have to do anything with the device. My family interacts with it multiple times every day, and it remains rock solid.

I have a very simple set of lighting controls on the main screen – we just touch each button to toggle lights in that particular zone. This doesn’t need to be the case, however. I could choose to display a weather forecast, data from sensors, or even a live feed from some of my security cameras. Designing a richer display panel layout has been on my to-do list for a while; something I’ll surely get around to one of these days.

Endpoint Nodes

GE In-Wall Switches

All this great home automation software and controller hardware is useless without something to actually automate. At the moment, my system has 33 devices. These are mainly light switches, but there are some receptacles, lamp dimmers, and motion sensors, as well. As the remodeling on my basement gets wrapped up, I’ll be adding another 20 or so devices, which will bring my total up to over 50 nodes.

Most of my light switches are in-wall dimmer or toggle switches. Although branded as GE devices, they’re really Jasco switches. These dimmers are mediocre. I’ve had issues with a couple of them going bad after a year or two and have also had some compatibility challenges with some dimmable LED lights.

For my basement, I departed from the Jasco/GE switches and went with Leviton Decora DZ6HD-1BZ dimmer switches instead. They function well with my recessed LED lighting, and the buttons feel nicer and more tactile than the Jasco/GE switches. I’m going to give these switches a longer test period, and if they hold up, then I may replace the Jasco/GE switches throughout the home with these.

The Leviton switches that I’ll be using in my basement

As I mentioned at the beginning of this article, the Christmas season always makes me thankful for my system. At that time of year, I add an additional dozen or so pluggable switches, specifically for controlling indoor and outdoor Christmas light strands. For the indoor lights, I use Leviton Decora DZPD3-2BW dimmers. They work fine with most of my light strands, but there is an occasional LED strand that won’t shut completely off with these dimmers.

For my outdoor lights, I have two of these Jasco/GE outdoor switches. I’ve been using them since 2017, and they’ve survived the winter weather conditions well.

Automation Logic

As I wrap up, I want to share with you some of the automation logic that I’ve implemented with OpenHAB. As I mentioned earlier, I’m not doing anything very complicated, but I do have a couple of interesting scenarios.

Toggling Lighting Zones

Before jumping in, I need to mention that I use “virtual switches” in OpenHAB as proxy devices for the rooms of my house. Virtual switches don’t physically exist in my home, but they do have a stateful object in OpenHAB. When a virtual switch is toggled, it doesn’t physically toggle a light. However, I have an OpenHAB rule that gets triggered when the state of a virtual switch changes. That rule, then in turn modifies the state of the physical devices in that room.

This is how I toggle the lights in each room of my home. When someone presses the “Kitchen Lights” button, the state of a virtual switch (Proxy_Kitchen) is toggled. Then, the TOGGLE_KITCHEN_PROXY rule detects the state change and toggles the state of each light in the kitchen accordingly. Here’s what this rule looks like in OpenHAB. As you can see, when the virtual switch is turned off, the OFF command is sent to each of the physical switches. This makes controlling specific zones or groups of devices very easy.

rule "TOGGLE_KITCHEN_PROXY"
when
    Item Proxy_Kitchen changed
then
    if (Proxy_Kitchen.state == OFF)
    {
        WallSwitchKitchenOverhead_Switch.sendCommand(OFF)
	WallSwitchKitchenTable_Switch.sendCommand(OFF)
	WallSwitchKitchenSink_Switch.sendCommand(OFF)
    } else {
	WallSwitchKitchenOverhead_Switch.sendCommand(ON)
	WallSwitchKitchenTable_Switch.sendCommand(ON)
	WallSwitchKitchenSink_Switch.sendCommand(ON)
    }
end

Super Simple Garage Light AI

Another bit of interesting automation logic that I use is in my garage. Before implementing this logic, the lights in the garage stayed on pretty much all the time. We’d often forget to turn off the light, or we’d keep it on so we’re not in the dark when coming home. To solve this problem, I did two things. First, I put a Z-Wave motion sensor in the garage. For this, I used the Ecolink PIRZWAVE2-ECO-2, which I purchased back in 2016. It works fine most of the time, but occasionally has challenges sensing motion. I’m not sure that I’d recommend it; there are likely better Z-Wave motion devices on the market today.

Using the motion sensor in conjunction with a Jasco/GE Z-Wave light switch in the garage, I wrote an OpenHAB rule that turns the garage light on when the sensor picks up movement. If there’s sustained movement detected by the sensor, then the light stays on. When movement stops for 5 minutes, however, a rule is triggered to turn off the light switch. This works great when a car is entering the garage; the light turns on as the car is pulling in, and turns off automatically after 5 minutes when we go inside.

Walking into the garage from indoors, however, is a different story. I don’t want to wait until I’m in the garage for the motion sensor to detect my movement before turning on – I would be walking in the dark for a couple of seconds before the lights come on.

So, to combat this, I installed another motion sensor at the door that leads from my home and into the garage. When that indoor motion sensor is triggered, I have an OpenHAB rule that turns on the light in the garage for 15 seconds. After the 15 seconds is up, the rule then checks to see if the motion sensor in the garage has detected any movement. If so, it keeps the garage lights on. Otherwise, it turns the lights off. By using an OpenHAB rule in this way, I’m preempting the lights in case my intent is to enter the garage. In the worst-case scenario, the garage lights are on for only 15 seconds. Here’s what this rule looks like in OpenHAB; it’s actually simpler than you might think:

rule "PRE_TURN_ON_GARAGE"
when
    Item sensor_laundryroom changed to ON
then
    dimmer_garage_light.sendCommand(ON)
    Thread::sleep(15000)

    if (sensor_garage.state == OFF) {
	dimmer_garage_light.sendCommand(OFF)
    }
end

Automated Night Light

The last rule I’ll share is a simple time-based automation rule. My son will sometimes fall asleep with some of the lights on in his bedroom. If I tip-toe in at night to turn them off, then I risk waking him up. There are also times when I go to sleep before him, and his lights will stay on all night.

To solve this problem, I simply installed Z-Wave switches in his bedroom, and created a time-based rule in OpenHAB. OpenHAB uses cron formatting for these rules, so if you’re used to using cron for scheduling jobs in unix-like operating systems, then you’ll be right at home. Here’s the rule I use to turn off his lights at 11:59pm every night.

rule "TURN_OFF_LINCS_LIGHTS"
when
    Time cron "0 59 23 * * ?"
then
    Proxy_LincsRoom.sendCommand(OFF)
end

Conclusion

That wraps up the tour of my personal home automation system. I hope this article demonstrated the value of leveraging home automation and sparked some ideas that you can use. If you have any interesting scenarios that you’ve solved with a home automation solution, please comment on this article and share it!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s