After becomming a home owner in 2015, it only took about 2 years before I started to have the desire for some basic remote access. To, for example, set the thermostat from "away" to "heat" before I arrive, or never forget to turn a light off after I have left. I have a long history of connecting up household physical objects to computer control. In high school, my room was controlled with a combination of a parallel port interface, board of relays, and 8-bit ISA I/O board all run by a desktop computer and my own GWBASIC, then QBasic, then Visual Basic software. It was primarily remote control via the computer, with some basic automation built in. Oh yeah, you better believe that impressed the chicks!
Fast forward over 20 years, and while remenants of that system still exist at my parent's house (like the relays installed behind light switches, and all the CAT5 cable along the baseboards running up the walls), we now live in a world of low cost network capable microcontrollers like Arduino, ESP8266, etc. And indeed, it only took a few minutes of Googling to bring up thousands of examples of home and device control using Arduinos w/Ethernet shields, ESP8266 WiFi MCUs, commercial products with hacked firmware like SONOFF and all sorts of esoteric solutions. During that searching it wasn't long before I stumbled accross the MQTT messaging protocol and finally open source home automation platforms like openHAB, Domoticz and Home Assistant.
Yep, the world of DIY home automation had changed a lot in 20+ years. And I guess I'm going to go all in on it.
My Philosophy Of Home Automation
From the beginning I knew if I was going to do this, I want to build a system that would be reliable, permanent and not an enormous blackhole of time. Realizing that in fact yes, it may be an enormous blackhole of time during implimentation however one can consider that hsort term pain for long term gain.
- Remote Control? We've always had that...it's called a light switch!
- Everyone has that friend who proudly shows you they can control their "smart" light bulbs with an app on their phone. How incredible! Just think that they can remote control a light bulb from anywhere in the house. Except, we've had that for about as long as we've had electric lighting (and frankly, gas lighting). It's called a "light switch".
- WiFi Is Temporary
- WiFi is a great convenience, but as a long term solution it is a poor choice. 50 years from now, are 802.11b/g/n devices (or even 802.11ac, 802.11ax) going to still function? The answer quite frankly is "no". And a house, ideally, lasts longer than 50 years. We are already seeing deprecation of 802.11b on newer APs, so installing a bunch of WiFi reliant devices (such as light switches, light bulbs, sensors) is a temporary setup at best. It's a bit silly to replace every light switch in a house knowing that in 15 years, they might not function. Additionally, fixed location devices connected to a wireless network adds unreliability to the system. All permanent installations should be wired, which in this case means primarily Ethernet. Ethernet was standardized in 1980 and will be around forever. Even in 2023, 43 years later, I have not seen a single Ethernet device that can't negotiate back down to 10MB half duplex.
- "Cloud" Is Stupid and Temporary
- "Cloud" just means "someone else's computer" and is how the majority of consumer level smart home devices work. They maintain constant connections open to the manufacturer's infrastructure to which the app or other controlling software speaks, which then relays back to the device, which then performs the action. As you can see, the potential areas for failure are many. The device will not work or have limited functionality without Internet access. The manufacturer may stop the service at any time. Which has already happened with iHome, Logitech Harmony Link, Staples Connect, Insignia, IFTTT, Insteon, Iris by Lowe's, Revolv and thousands of other devices and services from other manufacturers. And let's not forget the real reason these devices and services exist: to collect data from their users. No home infrastructure should ever rely on a 3rd party service for functionality, nor require an active Internet connection to function.
- Everything Must Work Normally
- I was at a home show many years ago where a manufacturer was demonstrating one of the firswt WiFi RGB "smart bulbs". They were proud that a user could just screw the bulb into a socket, connect it to a WiFi network, then control via an app or voice assistant. I asked them about switches. Pointing out that the first thing anyone does when entering a room is toggle the light switch. They suggested taping the switch "on", or installing a blanking plate. This is stupid. Our brains expect things to work a specific way. It is instinctual at this point to hit a light switch when walking into a dark room (forget for a moment that automation should mean one never walks into a dark room!). Thus it is critical that things like light switches should work as anyone expects them to.
- Permanent and Reliable
- A house is a durable good with a lifespan measured in centuries, not years like many consumer products. What this means is that critical infrastructure must be designed to operate over the long haul. The reliability of a light switch is about as close to 100% as one can expect. Home automation and the associated equipment should match that. Obviously some teething pains can be expected as the system is developed and installed, however once implemented, there should be little to no ongoing maintenance.
- Based On Open Standards
- A long lived system must be built upon documented, available, open standards. Full stop on this. One cannot rely on proprietary technology, protocols, or software when designing for a 100+ year lifespan. The unfortunate part about staying open is that it eliminates more commercially produced devices either outright or without modification. Even if open standards cease to be, well, standard and are abandoned after a decade, it's not as though the libraries, specifications and implementations suddenly disappear.
- Automation Means Smart, Not Remote Control
- "Smart" seems to be an industry term for "remote control". "Smart" should mean "automated", which means the system thinks for the user. This means that over time, automations can build up such that manual tasks become automatic. Walk from the shop to the house at night, and the house lights a the entrance and adjoining room should already be on.
With those basic tenants in place I had a framework in which to design and build my system.
- Home Assistant
- It wasn't long in my searching before I started coming across the various open source home automation systems. And open source was an absolute requirement as one cannot rely long term on any closed source software because support could end at any point. Even if open source support ends, the product and code remains allowing continuing use and future modifications. After evaluating the various options, I decided to base my system around Home Assistant. MORE...
- Hosting Hardware
- I had a bit of a journey of hosting hardware that seems to bite a lot of Home Assistant users in the beginning. Partially because the Home Assistant Getting Started will tell you that a Raspberry Pi is a good affordable starting point for your home automation journey. This is far from the truth. MORE...
- Protocols And Standards
- The home automation world is full of thousands of standards. And I'm automatically discounting nearly all of them because they are not industry standard, widely used and open protocols. Which unfortunately is yet another reason why most commercial "smart" products are not usable for me (with some exceptions). I have thus standardized on only a few protocols, trying to limit all my devices to those. They are MORE...
- I/O Control
- The business end of home automation are inputs like a switch toggle, and outputs such as a relay to turn on a light. There are a lot of ways to accomplish this, some very consumer friendly. However the last thing I want are eleventy billion WiFi switches, "smart bulbs" and "smart outlets" at every wall. That's a recipe for disaster and unreliability. MORE...
- DIY Power Bars and Outlets
- Some of my first automation related hardware projects were a DIY "smart" power bar, and a set of DIY "smart" outlets. The power bar was based on an Arduino Nano, ENC28J60 Ethernet shield and 2 relay modules. The outlets were based on ESP8266 ESP-01S relay modules which are commonly available on eBay, Aliexpress and other marketplaces. MORE...
- Commercial Power Bars and Outlets
- I don't use a lot of commercially manufactured products primarily because these products almost always rely on the manufacturer's servers (cloud) and thus violate my "no 3rd party" rule. However, there are a range of products out there based on well known microcontrollers like the ESP8266 which an enterprising user can reprogram with custom firmware. MORE...
- Any home automation relies a large part on sensors which provide inputs to the system to allow decision making, display or to simply record data. Perhaps the most common example are temperature and humidity sensors which can be used to control climate control systems. Door and window sensors tell then system the position of those openings, and light sensors can provide luminosity and spectrum information. There are an extraordinary variety of types of physical sensors. There are also an infinite variety of virtual sensors. MORE...
- There are a lot of commercially produced HVAC "smart" thermostats capable of integrating with automation products out there. Examples include the Nest, ecobee, Honeywell, Radio Thermostat and many others. And they all suck! Why do they suck? Say it with me now..."WiFi!". Nothing dumber in the thermostat world to take a device hard wired permanently into a system and force it to connect to the network wirelessly. Guaranteed unreliability, guaranteed obsolescence. And it also occurred to me that with a home automation system, no one actually needs a thermostat. MORE...
- Voice Control
- I don't consider voice control to be a necessity, simply a convenience. After all, a smart home isn't very smart if all one has done is substitute a voice controlled switch for a finger controlled switch. Yet there are times when it can be helpful to bark out the order "Turn on the basement lights!". Because humans are a little unpredictable, sometimes an automation doesn't cover the fact you've run clear past the motion sensor without triggering it somehow with your entire torso covered in the contents of an exploded paint can, heading for the laundry sink downstairs. Theoretically. Voice control is really the one area where I break my "No Wireless, No Cloud" rule because...MORE...
- Architecture and Application
- As I have alluded to, the architecture of my system for the most part follows a controller-node-device paradigm. Home Assistant serves as the central controller to which all information is fed, and from which all commands are issued. Each node is a room or logical area of the house which may consist of one or more controllers. Devices (which translate to Home Assistant "entities") are then within those nodes and may be controlled by a controller or function as their own controller (ie. a standalone sensor). MORE...
- Automations, or more properly the ability to create and use automations, are somewhat the entire point of all this effort. My ultimate goal is to have to manually interact with the house as little as possible, whenever possible. As my system is still in development and will be for the foreseeable future I can't yet reach that nirvana but I have developed a fair number of automations I find extremely useful and convenient. I'll share those below as I'm sure others will find utility in them...MORE...
- Lessons Learned
- There are always mistakes along the way one makes when developing a system. In my journey towards a robust, reliable and long term home automation system I've learned some lessons along the way. Some of these have been the result of a minor inconvenience such as device control failing. Others have resulted in the need to completely recover the system...MORE...
Back To Projects Page | Mail
Me | Search