Robware Software by Rob

DIY Home Automation: Update

It's been nearly a year since my last post. I had no idea it'd been that long!

When I last posted I was trying to get some control over the boiler in my home. This sort of worked for a while until the relay in the receiver unit seized. It was replaced with a new unit that's totally different. It uses the 868MHz frequency instead of 433MHz. I did get a transceiver, going by the catchy name of nRF905, to attempt to communicate with the new receiver unit, but failed to get it working with the RPi. I have not had another attempt at it for a while.

The code for the thermostat Pi has not gone unloved, however. See here for the code as it currently stands. The main change is that it can now publish to MQTT, and that I've massively sped up reading from the sensor.

Further towards the home automation goal I've found these Sonoff units. They use an ESP8266 chip which can run Arduino code and they also expose the headers to load new code up on to the chip, which makes them excellent for hacking. I've cooked up my own code for these that uses MQTT for communication. MQTT is excellent for this, and I've made the firmware so it's easily controllable from any source, and will keep its status up to date. I currently use MQTT Dash on my phone and Home Assistant on a Pi to control things. I'm not massively satisfied by Home Assistant however so, being me, I might make my own alternative. Currently I have 3 Sonoff in-line switches wired in to 3 lamps, and 2 wall socket switches.

My PC hangs off one of the wall socket switches which has some extra code to prevent it from turning off if the PC is on, and automatically turn it off when the PC is off. That way all of the extra bits (speakers, monitors, etc) which go with the PC are also turned off. Because of this new socket my power metre is currently showing a cost of £17 a year less, and that's only over the month it's been active. Who knows what the cost will be once the year is up.

I want to be able to control wall switches as well, but options are minimal for UK households because the wiring to the switch often only has the live wire. Remote wall switch units require a complete circuit (both live and neutral) in order to operate. The only viable solution to this to rewire the house. I've thought about a short term solution of battery powered units, but that seems too impractical.

Getting the boiler working under my control is still of high desirability to me, so I'll be taking another crack at getting the nRF905 working at some point. Documentation for Arduino seems to be better than that for the RPi so I might use one of them instead.

Posted on Saturday the 28th of January 2017