Sonoff Heating Control

I’ve wanted to have my central heating controlled from MQTT for a while now to save me hunting around for the remote wireless thermostat timer.

The unit I currently use is a Honeywell CM67. It is pretty good and allows 7 day programming of the CH with up to 8 temperature setups per day. It remotely controls the boiler unit, shown below, which is hard wired to the mains and the boiler contact terminal for the CH demand.

All the boiler needs is for two contacts to be closed to activate the CH. This is normally bridged when using an internal timer or onboard switch. The bridged is removed for remote timers, thermostats or frost protection to be connected.


In my case I have modified my Sonoff to be just the contact switch I need without bridging mains to this input.

I removed a corner of the Sonoff to remove the tracks connecting the neutral bar and the live to the relay. This then leaves the input only connected to the onboard power regulator which feeds the ESP8266 and the low power side of the relay.

I then only needed to solder a bridge from the live input of the relay to the remaining neutral bar.

I have made a crude diagram of this below.

I could have easily done the same with a Sonoff SV and an external PSU but this will be a lot neater install.

Pics of the modified board will be up soon along with installed pics next to boiler.

This now will enable me to control the boiler CH demand state with a simple MQTT topic ­čÖé Excellent.

Now initially the only functionality I would lose would be to be able to have the CH come on or off dependant on temperature as the digital thermostat timer would no longer control the boiler CH demand. But I could still run timers (more accurate and complex if need be) and have manual control over it.

I will be adding temperature sensors to my Home Automation at some point in the future to each room. This would give far more control over the heating of multiple rooms and corridors rather than just the room the thermostat is in.

My Venture into Home Automation

I have been working on home automation bits and pieces for a little while now and I’m finally getting a few things done.

I started off with a USB Energenie ( which has six sockets, 4 of which are controllable via USB. There is also an ethernet version which I don’t have sadly. I had originally controlled it with a Linux software called SIS-PM which provides a simple WebUI or control from the command line.

As I had started to get more into it I decided to go down the MQTT route for comms between devices and front ends. So I setup Mosquitto. I found a bridge for the Energenie which subscribes to an MQTT topic and then allows control of the 4 sockets via MQTT messages. Great!

Well my latest thing now is a small device called a Sonoff. These devices have an ESP8266 controller, which is Arduino compatible, connects over wifi and controls a relay all in one neat little package.

They come with their own software on them which is cloud based but you can upload Sketches via the Ardino software just like you would with an Arduino. So I have a sketch written by Jonathan Oxer who runs the Youtube Channel SuperHouse and also Director at Freetronics.

I now have more control over home stuff and can go about wiring up items with these devices.