DIY Heating and Hot Water Controller

Hi @kwirk,

Thanks for this really detailed sharing.
For my need, i no need thermostat. I just need temperature setting point.
I tried to break the “Generic Thermostat” to answer my needs but it appears that I failed.
in here my post on my needs: Generic Temperature setting point · home-assistant/frontend · Discussion #17028 · GitHub
On thing I don’t like is that Generic Thermostat doesn’t have persistent data on hvac_mode and the temperature setting point. I even don’t know if it’s a feature in HA.
It means that on HA restart, your setpoint and your hvac mode is back to initial values in your config file.

1 Like

Sorry to ressurect this thread but I am so glad that I have stumbled accross as it seems to cover exactly what I am looking to do.

I currently have a Y Plan system.

The heating is set to constantly on and this is connected to a digital thermostat in my hallway. All the scheduling is done via the thermostat.

The hot water is set to come on once in the morning and once in the evening but we find it really difficult to find a schedule that constantly works - we always seem to be running out of water.

My main goal is to somehow add a temperature sensor to the hot water tank and then have HA turn on the water earlier than its usual schedule if it senses that it has less hot water in it than usual.

One other thing I would say is that I am looking to move house in the next 18 months or so, so I am wary that I should be able to replace the timer and thermostat easily when needed.

Any advice on where to start would be much appreciated - I note that the SONOFF CH4 PRO seems to be a good place to start.

This is similar to what I currently have.

A Nest thermostat for controlling/scheduleing the heating and then a Shelly 1PM with temperature probe to measure the temperature on the hot water tank. The hot water is turned on/off via an automation when it goes below or above a set temperature via a SONOFF 4CHPROR3.

If and when I get time I would like to replace the Nest with more complex automations with room temperature sensors (I currently have Z-wave TVRs in the rooms); plus replace the Shelly with the temperature probe directly with the SONOFF 4CHPROR3.

1 Like

I have done lots more research (including watching LOADS of Youtube videos) to really get my head round how the Y-Plan heating system works.

However, the separate HW ON and HW Off relay update is still a bit confusing. I would love just to replicate everything above (I will be using an ESP32, rather than an ESP8626) but I prefer to fully understand everything before I implement it.

You can have “HW ON” and “HW OFF” on the normally open and normally closed respectively, for a SPDT relay.
The problem is however, that with some, and certainly my heating system, is when “HW OFF” is set, it holds the 3-way value in place ready for when only central heating is required. Whilst it doesn’t use much power but it does make the valve motor hot and causes more frequent failures.
So using extra logic of when I know “CH ON” isn’t active, it’s safe to turn “HW OFF” off, to extend life of the 3-way valve.

1 Like

Thanks Steven - I have re-read everything, again, and I think I am starting to get everything. Really very clever, what you have done.

I think that “interlock”, in the code, threw me a bit but I think I see why this is necessary, now.

As you appear to have an identical system to me, I am tempted to just completely copy what you have done and see how I get on.

Out of interest, have you made any changes since your original posts?

I’ve posted Gist here: heating-controller.yaml · GitHub

I posted code per my original post, then edited to my current config file, so in revisions tab you can see diff of changes. Basically, just the startup stuff if only change.

I’ll caveat that my controller is using 2022.12.1 version of ESPHome, so some stuff may have changed. I should probably update it. I’ll post 3rd revision on that Gist if I change anything.

This sounds great Andy. Looking at the sonoff.tech website, I believe its SONOFF 4CHR3/PROR3 - 4 gang 433Mhz RF remote WiFi smart switch that would be used.

Are you placing this after the existing traditional timer (ie tapping into the 4 output lines 1,2,3 & 4 of the timer)

Would you be able to provide a basic wiring schematic for your Y plan setup?

I’ve attached a diagram of how I think the Sonoff 4CHPRO should be wired to the existing NL1234 terminals for my Y plan, using both NO and NC on R1 for HW off & on.

I’d appreciate it if anyone has any feedback?

It’s hard to say for sure without more information on your exact setup…but usually you’d be switching the live, not the neutral.

I’ve attached a cop of the wiring diagram for the rest of the circuit and modified my own drawing (below):
image

Yeah, that looks the same as my set up here :+1:

1 Like

Nice one! I’ll have a go at wiring it up and if you hear a big bang you’ll know it went wrong!