Multi-zone heating automation

My situation:

  • I have WiFi Thermostat (OpenTherm) in the living room.
  • The living room thermostat is connected to the boiler and controls the demand for hot water the complete central heating network.
  • I have radiators in several rooms with TRV’s, which are normally turned off / closed.
  • The radiators in the living room are always open and controlled by the thermostat.
  • If I want to have heating in these rooms, I need to open a TRV and make sure the living room has a demand too.
  • Recently I bought a couple of ‘smart’ TRVs, hoping I could create a scheduled heating for individual rooms (e.g. warm up the bathroom in the morning).

Now I am looking for the best way to couple these TRV’s with the Wifi Thermostat through automations.

What I would like to achieve is that the TRV’s can be operated more or less independently of the living room thermostat.
Which means that, regardless of the temperature + setpoint of the living room thermostat, a demand for heat by any TRV cause the boiler to supply warm water.

Obviously, my setup doesn’t allow for complete decoupling of the TRVs and the thermostat.
If I want to warm up a room, I will need to allow the living room to warm up as well.
Hopefully, warming up the living room takes much longer than the smaller rooms, and thus the thermostat can be turned off by the TRVs when they are settled.

I am looking for advise on how to make this thing work in a reliable/comfortable way.
My first thought was to use the TRV’s as on/off (binary) only, and keep track of temperature through automation (creating an on/off control loop in SW).
The same automation would also ‘override’ the thermostat setting while there is a demand, to ensure heat flow regardless of the living room temperature.
Ofcourse I would need some safeguards to prevent overheating.

Does anyone here have any ideas or accomplished something similar?

1 Like

I’d think you can make all radiators work independently and have an automation that gets triggered with every radiator that turns on or off. If one thermostat turns on, the thermostat in the living room goes into heat mode set at e.g. 30°C so it always heats unless it gets way too hot.
If a radiator turns off, it triggers an automation checking if any radiator is still on. If all radiators are off, the thermostat in the living room turns to preset “away” which in this case will actually be used as the normal mode keeping the temperature at e.g. 20°C.

Not sure how well such a completely independent system will work because each radiator also heats the living room.
I’d add a calendar component or a schedule to turn all heaters to preset “away” at e.g. 18°C during the night, so all of them start in the morning at the same time because you don’t want 3 rooms to start heating after each other until you have 26°C in your living room.

Maybe I forgot something, your setup is rather complex and I’m not quite familiar with all the components used.

Although somewhat inelegant I would put the opentherm thermostat on a virtual zone and fake a sensor temperature (if it will support that). Then all of your zones are not restricted in demand by the living room asking for heat. Currently if the living room did become satisfied you couldn’t heat any other zone, or the living room could get excessively hot.

On/off control of rooms causes temperature cycling… if you have modulating valves try and use that capability. In your current implementation It will indirectly cause undesirable cycling of the living room temp too with possibly multiple external zones compounding this. One zone reaching heat just as another zone then decides it needs heat raising the living room even more in temperature.

Thanks for your ideas!

I have started an experiment using 2 MQTT climates (1 thermostat and 1 zone), with an appdaemon script to mimick actual heating and cooldown behaviour.

I got something simple running now, which ‘overrules’ the thermostat setpoint when the zone has a demand for heat.
Currently I calculate the temperature delta (setpoint - current temperature) of the zone, and add that number to the current temperature of the thermostat as new setpoint.
So when a zone needs to heat up by +2C, the automation triggers the thermostat to heat up by +2.

When the zone has no heat demand anymore (temperature has settled), I set back the thermostat setpoint to the value before overruling it.

It works quite well due to the fact that smaller room warms up more quickly. I think this approach is more subtle compared to setting the thermostat to very high setpoint (like +30C).
However, I’m not sure what the OpenTherm modulation % will do (perhaps this does not result in fastest performance).

There is still cycling going on, because after settling, the zones will cool down again, and at some point turn the heat back on. I am assuming there is some hysteresis in the control loop that will make sure that cycles don’t occur too frequently.

I will keep testing, at some point try it on the actual hardware.

Still wondering whether my setup is really that unique. I was guessing quite some people are buying these retro-fit smart TRVs, while keeping their central thermostat as is.
Feels a bit like re-inventing the wheel here :sweat_smile:

I am trying to achieve exactly this and I’d love to see your yaml

I used AppDaemon to create an automation, not yaml.

Hi, old thread, but I’d like to share my thermostat that I just made. It can be used to handle multiple rooms/zones

1 Like

I took a quick look at your component, it looks very promising!
I would like to understand a bit more about how you combine the sensor readings (and their target values) to come to a setpoint for the heater.
Usually this creates a problem, since some sensors are higher than the target value, others are below.
I’m curious how you solved this problem, maybe this something you could add in the documentation?

Hi, I updated readme with description:


How multizone works: Lets assume we have the zones in the picture below. You can see that each zone/room has different target temperatures set and in config you can see that threshold is set to 0.5 degrees C. In each zone I have a temperature sensor, and there is just one central heating switch.

  • The heat will be turned on when at least one of the zones will have its current temperature under the lower threshold limit, and heater will maintain that zone active until the temperature in that area is bigger than the upper threshold limit. In this time, the termostat doesn’t care about the other zones, because it tries to heat up this zone which becomes the active-locked one.
  • When the temperature in this zne passes the upper threshold limit:
    • a) if there is no other zone that has its current temperature under the lower limit threshold, the heating will be turned off;
    • b) if there is any other zone that has its current temperature under the lower threshold limit, then the heating will still be maintained as on until condition a) is met

When the heating is off, the component will automatically select as active the zone that has the lowest current temperature compared to its target limit. For example you can see in the picture that “dining” zone has a temperature of 19.2 and its limit is 19.5, and is the active zone whic means that this is the zone with lowest temperature relative to its limit, and is most probably the fist zone that will trigger the heating.

I use this multizone_generic_thermostat in combination with the automations to set different temperatures or presets based on time. Durin night I maintain a confortable temperature in the bedrooms and the rest of the rooms are set to minimum, during day I set confortable temperature in the dinign room and gaming room and lower in the bedrooms as noone will use them during day.

So, acordingly to the picture below, the heater will start as soon as temperature in the dining zone probably will pass below 19.0 (lower threshold = target is 19.5 minus 0.5 threshold), and will stop when temperature in that room will pass over 20 (upper threshold = target is 19.5 plus 0.5 threshold)


Great job, work nice and well!
I’m using it together with an opentherm thermostat on an ESP8266 with an opentherm adapter.
I have 6 TRVs and a Remeha boiler.

Thank you for the great custom component.

I’m glad it helps. Here’s how I use it:
I created my own thermostat using an NodeMcu+RF Rx/Tx on 868Mhz. My thermostat communictes on MQTT with Homeassistant and with the boiler on RF868 using the old thermostat protocol I had (I just spied the protocol of the old thermostat using an usb SDR and I implemented in my thermostat the same protocol so that they can be interchandes easily).

On HomeAssistant I have defined the Input numbers U can see in the picture above, one for each room. In each room I have a themperature sensor did by myself with Esp-01.

The automation sets the heating on low in the bedrooms during day (because no one sleeps then), and in the living & dining room to 22 deg.
During night, the bedrooms gets 21 degrees and livingroom and dining room get set to low (17 degrees).
In gaming room I have a smart power plug and I can see when my son has the PC/Ps4 open (by checking the power consumption) and only if there is power usage I set the temperature to 22, otherwise is set to 17 degrees to not heat the room if not needed.

I am considering now to buy also some smart TVR to optimize it even more, but since winter is over, probably will happen in the next cold season :D.

If U have any other suggestions for improvement, fell free to share ideas.

Hello Angelo,

I also have Remeha Tzerra, TRVs and some knowledge about ESP. At the moment I set higher temperature on the main thermostat and it always requests heat. So I can control separate radiators with TRVs. Currently I’m trying to replace my simple thermostat with ESP8266 Thermostat Shield - DIYLESS Electronics but it doesn’t connect to the boiler for some reason.
Can you please describe your set up?

Hi Alex,

I got an Avanta boiler and I’m using both the modules master and slave, this way I still can use the exiting thermostat (celcia 20) as back-up and to see the status of DHW and CHW on the thermostat display even when using HA as thermostat.
I would check the opentherm connection (the boiler as different pins for on/off switch and opentherm) and off course your ESP code.
I started from the example on the DIYLESS website (the thermostat one) and then I implemented the gateway mode from the opentherm library examples and addes some more sensor on HA (flame and DHW status).
I also added an TCPIP connection to send the opentherm traffic over WIFI and use the opentherm monitor ( OpenTherm Monitor ).


Hello Angelo,

How old is your Avanta? Mine was installed this year and I have only r-bus and it doesn’t look like OT. I read that remeha has some weird interpretation of OT.

My boiler is quite old, not sure about the date because I found it installed when I bought the house.

As per the Remeha website, the R-Bus should automatically detect which kind of thermostat is connected (including OpenTherm).

Hi @tpacri,
this looks very good and I am planning to use this integration once I have switched to TRVs and here comes my question: what kind of hardware setup are you using?



Hi. I spied on my real thermostat messages using a SDR, then I created my own transmitter that communicates with my heating system using same on/off messages as the ral one, using a nodeMcu attached to a rf433 receiver/transmitter. My home assistant listens to temperature sensors in each room and senda on/off commands to my nodemcu transmitter through mqtt, which transmits through rf433 to my heating system. In this way, my heating system doesn’t need any modifications. I just turn of the real thermostat and use my HA setup to control the heating. I ise it for more than a year and works fine.
Then, on top of this i use automation to set target temperatures to each room based on my schedule: during night 20 C in bedrooms and 17C in rest of the house as we all are supposed to be at sleep, and during day, leaving and dining warmer and bedrooms colder as noone aleeps there. Ok, the script is more comex as its adjusted to my kids schedule (school, etc)

Thanks for the exhaustive reply. One information I was hoping for is missing. Which TRVs are you using? I still have to decide between homematic, tado… x???

Thanks again,

No TVRs yet :D.

I own Tado TRVs but I’m not really happy with them.
They are quite pricey and need their own hub + cloud.
Also they have some quirks which make them not the ideal candidate for integration with HA. I once wrote a topic about these: link.
On the other hand they are easy to install and come with a lot of adaptor brackets, so its kind of guaranteed to work.

My advise would be to go with a Zigbee or Z-wave (whichever you use) TRV.
I cannot recommend a particular type as I don’t have experiences with any, but there are many topics around here.