Zigbee Relay to Control Hot Water Boiler (Y Plan System)

Hi there.

I have “Y Plan” central heating and hot water system.

I have a very basic timer that allows me to turn each of the systems on/off a couple of times a day.

I leave the central heating system constantly on and control the heating with an electronic thermostat, which gives me a lot more flexibility as to when to come on.

However, the hot water is the issue - I want to have more control over this and would like to replace the timer with a relay (Zigbee), so that I can heat the watertank via HomeAssistant.

I have a few initial queries:

  1. Are there any relays with their own “failsafe” built in? I.e. that will automatically turn off if they have been on for a certain time? What I am concerned about is that if the hot water is on and my HA system crashes, I might be left with the hot water tank being constantly heated all day, when I am out.

  2. Are there any ways to somehow test the heat of the water inside the tank, so that I can have the hot water come on earlier if necessary?

At the moment, we have the hot water timer to come on at about 5.30 am, so we know that by 7am, we shall have enough water for a bath.

However, if someone used all the hot water from the night before (for example, lots of washing up and a bath before the bed), there is still not quite enough hot water and it could have done with coming on at 5.00 am instead.

I would say that I recently bought one of these:

ZigBee Mini Smart Switch,SONOFF ZBMINI 2 Way Light Switch, Compatible with Alexa, SmartThings Hub, Google Home and SONOFF ZBBridge, ZigBee 3.0 Gateway Hub Required, 10A/2200W : Amazon.co.uk: DIY & Tools

to control my extractor fan.

It is working brilliantly but I am hesitant to use it with my hot water because of the lack of redundancy.

Any pointers/advice would be very much appreciated.

I would go for an ESPHome solution instead.
ESPHome modules can be programmed to work autonomous, but can also be linked to HA.

And as bonus, you could connect both a relay and a temperature sensor to it.

1 Like

Thanks very much for that.

I had heard of ESPHome but never really explored it until you sent me the links for it.

For the time being, I think I am going to add smart control to my hot water tank controller only.

This being the case, therefore, am I correct in thinking that I need the following parts:

  • ESP32
  • 240v Relay
  • Temperature probe
  • LEDs (to tell whether the hot water is on or not)

What I am hoping to do is have HA ensure that by 7am each morning, there is enough hot water.

As a general rule, an hour seems roughly enough for this when little washing up is done the night before and no baths.

I am therefore hoping that the temperature probe can help work out how much hot water there already is and set the boiler to come on that much earlier if needed.

Furthermore, as per the above, I am worried that my server going down when the hot water is on and it being stuck on all day. Is it therefore possible to program the ESP itself to never be on for more than, say, 2 hours?

One other quick thing - how do I connect the ESP to the 240v spur like all the other equipment in my Y Plan system?

ESP’s normally work on 3.3v, but f.e a nodemcu has a level shifter onboard, so can operate on 4.5-9v. A good usb charger will de the job.

Since a nodemcu has plenty IO, it is no problem to use one (or more) relays, led’s for status indication as well as a temperature sensor :wink:

I would suggest something like this 4 Relay Board. I use this to switch my boiler on for hot water and central heating. Can be powered from the mains for ease of wiring and can be flashed with ESPHome as described here

~B

Only problem with the esp12-f is it doesn’t have any free gpio port, which makes it difficult to connect the temp sensor🤔

Also using relays to control some LED’s is a bit overkill…

If you are looking for something pre-made, i think the Olimex EVB is something to look into.
It has 2 relays, and all gpIO available on a header socket,(so it is possible to hook a temp sensor, as well as controlling some led’s

As can be seen from the ESPHome code referenced 4 gpio pins - gpio12(D6), gpio13(D7), gpio14(D5) and gpio16(D0) are used to drive the 3.3V 10A relays leaving D1, D2, D3 and D4 available for IO.
I literally have this board running my boiler and am using the other IO ports to drive LEDs and read inputs from opto-isolators.

If you have another option that’s excellent but esp12-f is not a limitation here.

~B

1 Like

This project may be of interest