I get the same comment over and over again about my home automation system: “Why didn’t you just put an ESP8266 in it and use WiFi? You’re living in the past! Wires make it so hard!”
Not so fast, my friend. This video explains why in many situations, wires beat wireless.
Posted on October 5th, 2017
My home automation light switches have gone through a series of versions, starting with very complicated switches that all had Ethernet built in. Over time I’ve simplified the system so now the light switches themselves are electrically very simple: they’re just illuminated buttons on a breakout board with an RJ45 connector, and absolutely nothing else in them.
The switches connect to a pair of centralised light switch controllers over Cat-5 cable, so that it can detect when the buttons have been pressed and report events to MQTT.
In this episode I show some of the previous versions of my light switches, and then show how I built an Arduino based light switch controller.
Parts used in this project:
The source code for the sketch running on the controller is called “LightSwitchControllerMQTT”. You can find it on GitHub at github.com/SuperHouse/LightSwitchControllerMQTT.
There’s also a general introduction to the I/O breakout schema that I use at I/O Breakout. I’ll probably cover this in detail in a future episode because the same breakout shield will be used in other projects.
The light switches themselves are just illuminated buttons on a breakout board, mounted on a standard wall plate. The 4-button panel uses all 4 available data lines. The 3 and 2 button panels simply use fewer data lines. Click on the schematic for a larger version:
I didn’t spend much time in this episode explaining the current version of my light switches because I’m going to cover it in much more detail in the future. This episode is mostly about the controller.
After years of using cheap lino cutting mats from the $2 shop, I’ve finally put proper ESD mat down on my electronics benches.
I wanted to use a nice blue mat, but Dave Jones (@eevblog) had a bad experience with discoloration so I decided to try plain grey instead. Hopefully this won’t end up going a strange green colour like Dave’s.
I got the mat from Oritech in Sydney. Their full range is listed here:
Posted on September 21st, 2017
I’ve been lucky enough to have worked with an electrician to totally rewire my house for home automation, so it works in a very different way to a normal house. This episode traces through how power arrives at my house, is distributed to a pair of sub-switchboards, and from there goes out to loads such as lights. It also covers the important pieces of the system including MQTT and OpenHAB.
General information about MQTT is available at the official MQTT site. The site doesn’t get many updates because the protocol standard itself is fairly stable and well established, but it’s a good reference site with links to many MQTT-related projects. See mqtt.org.
There are many MQTT broker implementations available, written in various programming languages and with different features and levels of performance. I use Mosquitto, which has been around for many years and has never let me down. Note that your MQTT clients won’t care what broker you use or what language it’s written in, provided it supports the features they need. Mosquitto is written in Java, but I typically connect to it from Arduino-based devices. See mosquitto.org.
OpenHAB is currently the main rules engine that I use, which also takes care of state management and provides an app for iOS and Android. I’m still running the v1.x release series, but v2 is out now which is a major rewrite. See openhab.org.
For a general purpose rules engine that communicates using MQTT, check out Node-RED. With a drag-and-drop editor based on Node.js, you can create rules right in your browser. I don’t currently use this, but I’ll probably replace my current home-brew rules engine with Node-RED some time in the future. See nodered.org.
I listen to dozens of podcasts, and I usually have one playing while I’m working on electronics projects in my workshop. The speaker in my iPhone is ok, but I wanted to get some kind of external speaker to give it a bit more volume.
BlitzWolf kindly sent me a BW-F4 Bluetooth speaker to use in my workshop. I’m not really into music (I’d rather spend my time listening to something that teaches me new things) so I can’t give an opinion on its sound fidelity, but so far it’s been great for listening to podcasts.
The BW-F4 charges by USB and can run from battery for most of the day.
It’s available online for about US$55.
The last few months have been an emotional roller coaster as my wife and I complete the sale of a business that I began in a spare room at my mother’s house more than 20 years ago. This hasn’t left much time (or emotional capacity!) to produce SuperHouse videos.
This is a big change in my personal circumstances, so hopefully I will be able to make more progress on SuperHouse now.
While working on new SuperHouse episodes I’ve upgraded my surface mount reflow oven. Most things I design are assembled in factories, but about 8 years ago I set up a toaster oven with a temperature sensor so I could do quick reflow at home for prototypes and small production runs.
I wrote up a tutorial about DIY surface mount assembly for Freetronics: you can read it at Surface Mount Soldering With A Toaster Oven.
Some years ago I upgraded the toaster oven by fitting an Arduino based automatic temperature controller, and since then I’ve baked several thousand circuit boards in that little oven. However, the time has finally come to replace it with a proper semi-professional reflow oven.
The T-962A is currently the most common cheap desktop reflow oven, but I need something a bit bigger so that I can run a few dozen boards at a time. I decided to go for its big brother, the T-962C.
Yes, I know the camerawork is terrible! Normally I’d re-film anything that looks as bad as some parts of this vlog, but TBH I can’t be bothered for a quick update 🙂
Grass grows at different rates depending on the time of year, so sometimes it’s necessary to change the Automower schedule to suit the growing conditions. Now it’s winter here in Melbourne and my grass is growing very slowly (and even dying off in patches) so I need to reduce the mowing time.
Husqvarna have made it very easy to change the settings directly on the mower, allowing me to change it from 2 hours of mowing per day to 1 hour.
Posted on April 12th, 2017
Building a home automation system is a lot of fun, but there’s a serious issue you need to consider: what will happen when you’re gone? Will anyone else be able to figure out the system that you put together?
A couple of years ago, software developer Chris Yeoh passed away after a battle with cancer. Even with time to plan, his passing still left some systems in his house inaccessible to his wife and young daughter. His situation made me think long and hard about what would happen to my family if the same thing happened to me.
I have a couple of suggestions for ways to prepare your system for dealing with a future without you.
If you’re gone, and a random electrician is called in to figure out why the lights aren’t working, will they throw up their hands in disgust and walk away? The first thing they’ll do is open the switchboard to orient themselves, so put some obvious bootstrapping documentation right there at the switchboard.
When I first started taking electronics apart in the 1970s, it was normal for major appliances to have physical documentation inside them. If you take the back cover off an old black and white TV, it may have the complete circuit diagram glued inside for the benefit of service technicians. I’ve even opened up old TVs to find a complete factory service manual packed inside.
I keep a master document in Google Docs, and a hard copy on a clipboard hanging next to the main switchboard. Whenever I make a change to the cabling or anything else relevant, I write the changes in the hard copy. When a few changes have accumulated, I take the clipboard to my computer and edit my master copy. Then I print it out again, put it on the clipboard, and leave it with the switchboard.
My document contains:
You can see a template version in Google Docs, and either duplicate it for your own use or download it as a Word doc or other format:
When you make something for your home automation system it’s usual to test the firmware, modify it until it’s working just right, and then walk away and forget it. The source code for your project is probably sitting in some obscure location on your computer, which nobody else can access. Or if they can access it, how do they know this particular Arduino is running the sketch called “SensorShield4MQTT” instead of the other one called “SensorInputsMQTT”? Or which versions of the libraries you compiled it with?
When I finish a project, I copy the source code and associated libraries onto a cheap USB memory stick or an SD card, and then put it inside the project box or attach it with a cable tie so that it always physically stays with the project.
Later, if I ever update the firmware, I also update the memory stick so that I know 100% for sure that it always contains the exact source code that is currently running on the device.
This has saved me hours of frustration on multiple occasions, and if anyone else ever wants to fix the systems I’ve built this should put a smile on their face.
I’d love to know if you have other suggestions! Please comment below.
Finally, please consider supporting a cause such as Free To Breath and help fight cancer.
Posted on March 29th, 2017
Electric window motors allow your home automation system to open and close your windows as required. This could be useful for opening windows to allow ventilation, or to make sure all windows are automatically closed and locked when you leave home.
I recently got my hands on some AXA electric window motors that include a LIN bus interface so they can be linked to a home automation system, but I’ve never used LIN before so I needed to learn a bit about how it works. I designed my own LIN interface module that allows me to connect my laptop to LIN devices and manually send messages, and the module also allows an Arduino to control the window motors.
Simple example that provides a menu and sends commands to a single LIN interface: AXARemoteSerialLinbus
More complex example which includes MQTT, DHCP, reading a MAC address ROM, 4 LIN interfaces, a watchdog timer, and a temperature / humidity sensor: AXAWindowMQTT
More details to follow! I’ll update this after the video is ready.