Background
I was looking to upgrade my dated central heating and hot water controller/programmer (a circa 1980’s Switchmaster 9000 ) to something smarter for integrating with Home Assistant.
This is for a Y-Plan heating system with a hot water cylinder, common in older houses in the UK. Whilst on the face of it, it’s quite complex, it’s fundamentally controlled by two relays; one for central heating (CH), and one for hot water (HW) on/off on normally open/closed.
I did look at options such as Nest, Hive, etc. but thought it’d be a lot more fun (and cheaper) to create something myself, as it is just a couple of relays after all
Hardware
I didn’t need any new sensors or the existing heating/room thermostat, as I could use my temperature sensors and thermostat card of Home Assistant. The cylinder thermostat is still required, and whilst I could use something smarter for measuring the cylinder temperature, the trusty mechanical thermostat is fine for now, and is a nice safety feature.
One issue with Y-Plan heating system, is when everything is “off”, a permanent live feeds the motor of the mid position valve from ‘HW Off’. This can wear the motor out over time as it sits in one position getting fairly hot (I’ve previously had to replace the motor). Therefore, I decided to use 3 relays so I could truly turn everything off when not using heating and hot water. I found a ESP-12f based 4 relay board on AliExpress, which could be powered direct from 240V AC, with extra GPIO pins exposed on headers
I don’t have a 3D printer to make my own box, but I was able to find a pre-made project box, at 125x100x52mm, which looked just large enough for the relay board and extra space/depth for wiring. The manufacturer mounting points didn’t quite line up with PCB mount points, so I simply countersunk some bolts flush through the back of the box.
I also wanted local control, that if my router or Home Assistant went offline, that I could manually operate the heating and hot water. A couple of LED momentary switches were ideal, to be wired to the extra GPIO headers.
Overall cost of parts was around 22 GBP (~30 USD) with delivery/VAT.
Now to control it all, this was super simple, as ESPHome is excellent at making projects like this easy. I configured the Thermostat Climate Controller component for the heating, using a temperature sensor from Home Assistant, and then just a switch component for the hot water relay. This was flashed onto the relay before starting the build.
Build
So after safely isolating power ( 230V AC) I began replacing old controller.
So the relay board fitted perfectly inside the case . I used a Wago 221 connector to join the common live feeds (I did move this higher up, seen in later pictures, to give more space for other connectors).
Cables enter the box via rubber grommeted holes I made (note one T&E cable for the pump is missing in this picture), and switches soldered with wires with DuPont connectors.
Final connections before closing lid: I used seven Wago 221 connectors in all to connect everything (obscured from view in lid…sorry for bad picture: difficult to get camera angle once switches connected)
Final complete construction (pending labels and some cable clips), showing hot water enabled by solid yellow light on 2nd switch (which also toggles hot water when pressed). 1st switch pulses LED when heating on but not actively heating, solid light when actively heating. Again switch toggles heating on/off, and I plan to add a double or long press option, which to enable heating, ignoring the thermostat (backup in case of loss of connection to Home Assistant or temperature sensor fails).
Home Assistant Setup
With ESPHome integration, the thermostat and hot water switch appeared straight away in Home Assistant without any hassle, making that step super simple!
In terms of setting up timings for hot water and heating, I’ve used the excellent Scheduler integration and card, using person entities to detect when I’m working from home:
This card offers a much more family friendly interface than automations to set up timers. Imagine I’ll be playing around with schedules, etc. some more, but probably have to wait until winter when I’m using the heating to experiment