Posted on 8 Comments

#24: Home automation system architecture

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.

Resources

Posted on Leave a comment

Micro Review: BlitzWolf BW-F4 Bluetooth speaker

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.

Posted on 2 Comments

SuperHouse Vlog #56: Internet Vision Technologies is no more

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.

Posted on 9 Comments

SuperHouse Vlog #55: The T-962C surface mount reflow oven

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 🙂

Posted on Leave a comment

SuperHouse Vlog #54: Husqvarna Automower scheduling

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 4 Comments

#23: Preparing your home automation system for death

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.

Bootstrapping documentation

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:

  • Name and phone numbers of myself and my wife.
  • Name and phone number of our electrician.
  • WiFi SSID and password.
  • Name of my ISP, account ID, password, tech support phone number, and fault history.
  • Name of my cable TV provider, account ID, password, and fault history.
  • A plan of my house, with important locations (such as all switchboard locations) marked.
  • A definition of the labelling scheme for network connections.
  • A list of Ethernet ports and their uses.
  • A definition of the labelling scheme for power cables.
  • A list of relay outputs controlling loads in the house.

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:

https://docs.google.com/document/d/1B9N5zjWe61BWN3E9MIRnA-a-sEtzdo1qJcFtI-x61R8/edit?usp=sharing

Storing source code

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.

Other ideas?

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 7 Comments

#22: AXA Electric Window Motors Controlled By LIN Bus And Arduino

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.

Parts used

Source code

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

Instructions and explanation

More details to follow! I’ll update this after the video is ready.

Posted on 2 Comments

SuperHouse Vlog #53: Help! The Internet killed my toaster!

A major outage at Amazon Web Services this morning left millions of people with broken home automation devices: door locks, heating, lights, ovens, even doorbells.

Don’t let your home automation system be dependent on external services!

I always keep two principles (or rules) in mind when building my own systems.

Rule #1: No external dependencies.

Rule #2: Mechanical overrides.

Posted on Leave a comment

SuperHouse Vlog #52: Automower grass quality

The main sales pitch for robot lawnmowers like the Husqvarna Automower is that you don’t have to mow your grass, ever again. It always looks neat. But there’s a second claim: that trimming the grass just a tiny amount each day also results in healthier grass. Time for a direct comparison of the main lawn area maintained by the Automower, versus a patch of grass that I have been mowing manually.