DIY OpenTherm Thermostat?

This is sometimes confusing. If the room is stil 2 degrees colder than requested, the boiler target temperature, as requested by the thermostat, is sometimes at its maximum, 60 degrees. However, once the boiler temperature starts to reach it, the boiler target temperature lowers allready to 50 degrees. While there is still 2 degrees in the room needed. After the boiler shuts down for some some time, because the water temperature is higher than requested. The pump still continues to circulate water for 3 minutes (setting in boiler), tilll it cools down under the request temperature of 50 degrees, then the boiler starts up again, and the thermostat asks again 60 degrees water and so onā€¦ So really slowly the room temperature gets where it is needed.
What also confuses me, sometimes boiler target temperature asked by thermostat is 60 degrees, room temperature still not reaching its target, but actual boiler temperature stays at 39 degrees, and boiler is off allready. Rooms cool down in this period, while it is colder than asked. But pump continues to run. Then boiler start up and heats water, to for example 43 degrees, but not till the 60 degrees boiler temperature asked by the thermostat.


In the screenshot you however see not enough details about the room temperature. But you can see when 60degrees is wanted, it takes a long time before the boiler delivers this asked temperature.

This is what i expect to see more; once the target room temperature is reached, thermostat and boiler modulate around ideal water temperature needed to keep the room to the asked room temperature.

I think the same. Thatā€™s a ā€˜problemā€™ for most rooms, i have 1 room where this power can be used, living room combined with kitchen (1 open space), and even this is too much power i think. I would expect the lowest modulation possible then. If i ask heat for the smaller rooms alone, itā€™s logically more on/off.

Could it be PID parameters are not ideal for me? Or could i suspect a failure somewhere in my boiler?

I doubt boiler is faulty. More likely PID not fine-tuned for your case, or maybe we have some issue in the sketch. Can you please tell which sketch do you use?
P.S. it looks like a mistake in the code. Or sensor reading some wrong value from time to time and causes PID to calculate wrong boiler target.

Iā€™m using the code from joparmenā€™s git: GitHub - Joparmen/diyless-opentherm-ota: OTA addition to diyless opentherm for home assistant, which should be the same as the original, but added ota. I have changed the heading a bit to make it work with esp32, nothing in the programming was changed. I could upload it on git too, which could help debugging this. Iā€™ll do this tomorrow.
Iā€™m using the override topic as test now. In this situation, the boiler temperature follows nicely the target boiler temperature. Without this override topic, it looks like it is modulating, cause after all, the boiler target temperature stays more or less stable. But it is not following the boiler target temperature, which is fluctuating too much/fast. If i would not know better, i would think this one is reporting wrong. But then there are moments the boiler temperature is following the itā€™s target temperature.
I wil do some more testings also. Like following the behavior after resetting boiler and/or thermostat. I will also buy a new boiler temperature sensor to rule this one out (it is never bad to have a spare one).

Everything seems solved. I had a defect pump. It wasnā€™t clear in the beginning, the pump started late, and it became worse. So the heat was in the boiler, and building up a bit, without the possibility to give this energy to the room(s).
In the code i had also the extra line to stop the pump, when the boiler temperature was higher than requested. My boiler was letting the pump run for 3 minutes, but then the pump stopped.
Now, i use an automation in home assistant to stop the boiler when the heat in the room is high enough.
But most important, the pump starts when needed. It seems btw the new pump seems to decide how hard she works, which has quite an impact on the energy the pump uses.
Thanks for all the advise and support here! This solution is superb :wink:

Btw iā€™m experimenting a bit with the modulation feature, and setting a (low) boiler temp myself. It is like told here, a bit more savings with modulation, but more overshoot. With modulation, perfect stable temperatures in the room.

1 Like

Whoa, glad to know youā€™ve solved it.

Thanks for the great work. I have managed to install the OpenTherm thermostat on a non-opentherm boiler (Saunier Duval/Vaillant/Hermann group) using an ebus to opentherm adapter sold on the Netherlands and shipped worldwide (search for: AWB Ebus Opentherm interface 0020092426 if interested).

I have also been able to use the min temp of three xiaomi sensors to set the temperature reported to the boiler using an automation, as discussed above.

So far so good. Now Iā€™m trying to automate a ā€œnight-timeā€ temperature so that Sunday to Thursday it sets the thermostat at 14ĀŗC at 23:00 and on Friday to Saturday at 24:00. I am unable to do this as I donā€™t know how I can set the temperature in an automation. Any help?

Edit: also, how can I use the OTA feature to edit the config? I have already installed the modified script, but I donā€™t know to proceed.

If you are using home assistant to control your opentherm thermostat, you can have a look at:

Iā€™m using this, and till now, this was the nicest solution.

I wanted to make integrating an OpenTherm device a little easier in Home Assistant, so I started a collection of drop-in templates for ESPHome for people that want to control their OpenTherm device from Home Assistant.
The goal is to make it easy for people that want to go this route and remove some of the friction that currently exists. Let me know what you think of this, and feel free to submit other models if you have them available. Iā€™ll try to increase the supported models this week as I have a few more friends that want this.

3 Likes

Does anybody know how to send the outdoor temperature to the opentherm adapter? I have a sensor outside and I would prefer to use that instead of the sensor of the boiler.

Secondly, did anybody try this system with the average room temperature and average target temperature in case of multizone heating. By using the coldest room the boiler will always change his target temperature when the active zone is changing.

I am capable of changing my central heating water temp from home assistant. I would like to make that dependent of the outdoor temperature. I know there is modulation, but on days that the outdoor temperature is higher than -1 I can perfectly heat with max 40 degrees. On colder days I need 45 or even 50.

This is my automation:

- id: '1617292479611'
  alias: ot outside
  description: ''
  trigger:
  - platform: time_pattern
    minutes: /5
  condition: []
  action:
  - service: mqtt.publish
    data:
      topic: OTGW/set/otgw-<REDACTED>/command
      retain: true
      payload_template: OT={{ state_attr('weather.<REDACTED>', 'temperature') | float(0)
        }}
  mode: single

Assuming you have a opentherm gateway.

I have the diyless gateway. Does this work on that?

Iiā€™ve got a opentherm gateway by Nodo-shop and use mqtt to do this.
But if you use the opentherm gateway intergration then you should be able to do the same with the service opentherm_gw.set_outside_temperature.
You can find an example here.

1 Like

Anyone has found that the Home Assistant.12 update breaks the thermostat integration? Reading boiler temp and target temps no longer work unless I roll back to 11.5.

Iā€™m planning to do the same. My idea was to just use an automation in home assistant and publish a new high temp to the topic ā€˜BASE_TOPIC + "high-temperature/setā€™. I tested it allready and it works. You can even use it for setting different max water temperature for different rooms.
For example if the boiler is heating for a smaller room, you could lower the max temperature. If the boiler is working for the living room, you could make it a bit higher.
But i have the impression the algorithm is determining the temperatures and heating my rooms quite good allready, it is not too aggressive and still heats enough. For example when it has to heat up a bigger room 2 degrees i goes to the maximum temperature i set (60degrees), but once heated up, and to just keep it at that temperature uses 45-50 degrees. For smaller rooms 50 degrees for maximum temperature is allready enough.
At the moment iā€™m playing a bit with the high temp override topic trough an input number in home assistant. Iā€™m surprised how low i can set this temperature under some circumstances.

I think the mqtt stuff changed recently. I got an error when trying to add the sensors as well. I got it working using the following code (both sensors and climate). Note that I added all the sensors that I could find in the arduino code, even though my boiler doesnā€™t support all these. Iā€™m still fiddling with everything. I might have misinterpreted some of the sensors as well so maybe double check my sensors with the arduino sketch.

mqtt:
  sensor:
    - state_topic: "opentherm-thermostat/current-temperature/get"
      name: "OT Current temperature"
      value_template: "{{ value }}"
      unit_of_measurement: 'Ā°C'	
      icon: mdi:thermometer
      
    - state_topic: "opentherm-thermostat/high-temperature/get"
      name: "OT Boiler High temperature"
      value_template: "{{ value }}"
      unit_of_measurement: 'Ā°C'	
      icon: mdi:thermometer
      
    - state_topic: "opentherm-thermostat/low-temperature/get"
      name: "OT Boiler Low temperature"
      value_template: "{{ value }}"
      unit_of_measurement: 'Ā°C'	
      icon: mdi:thermometer  
      
    - state_topic: "opentherm-thermostat/setpoint-temperature/get"
      name: "OT Current Setpoint temperature"
      value_template: "{{ value }}"
      unit_of_measurement: 'Ā°C'	
      icon: mdi:thermometer
      
    - state_topic: "opentherm-thermostat/mode/get"
      name: "OT Current mode"
      value_template: "{{ value }}"
      icon: mdi:thermometer
      
    - state_topic: "opentherm-thermostat/boiler-temperature/get"
      name: "OT Boiler temperature"
      value_template: "{{ value }}"
      unit_of_measurement: 'Ā°C'	
      icon: mdi:thermometer
      
    - state_topic: "opentherm-thermostat/boiler-target-temperature/get"
      name: "OT Boiler target temperature"
      value_template: "{{ value }}"
      unit_of_measurement: 'Ā°C'	
      icon: mdi:thermometer

    - state_topic: "opentherm-thermostat/integral-error/get"
      name: "OT integral error"
      value_template: "{{ value }}"
      icon: mdi:thermometer

    - state_topic: "opentherm-thermostat/flame-status/get"
      name: "OT flame status"
      value_template: "{{ value }}"
      icon: mdi:thermometer

    - state_topic: "opentherm-thermostat/flame-level/get"
      name: "OT flame level"
      value_template: "{{ value }}"
      icon: mdi:thermometer

    - state_topic: "opentherm-thermostat/dhw-temperature/get"
      name: "OT DHW temperature"
      value_template: "{{ value }}"
      unit_of_measurement: 'Ā°C'	
      icon: mdi:thermometer

    - state_topic: "opentherm-thermostat/dhw-actual-temperature/get"
      name: "OT DHW actual temperature"
      value_template: "{{ value }}"
      unit_of_measurement: 'Ā°C'	
      icon: mdi:thermometer
      
    - state_topic: "opentherm-thermostat/dhw-state/get"
      name: "OT DHW state"
      value_template: "{{ value }}"
      icon: mdi:thermometer

    - state_topic: "opentherm-thermostat/cv-modulation/get"
      name: "OT modulation status"
      value_template: "{{ value }}"
      icon: mdi:thermometer      
    
  climate:
    modes:
      - "off"
      - "heat"
    name: "OT Climate"
    current_temperature_topic: "opentherm-thermostat/current-temperature/get"
    mode_command_topic: "opentherm-thermostat/mode/set"
    mode_state_topic: "opentherm-thermostat/mode/get"
    temperature_command_topic: "opentherm-thermostat/setpoint-temperature/set"
    temperature_state_topic: "opentherm-thermostat/setpoint-temperature/get"
    min_temp: 12
    max_temp: 23
    value_template: "{{ value }}"
    temp_step: 0.5    
1 Like

To improve the WAF, Iā€™d love to be able to use the slave shield so we can also use our OG wall thermostat. The DIYless guy has a sketch for the slave shield, but thereā€™s no sketch for master+slave+home assistant support. I donā€™t have the programming skills to combine the two. Has anyone else figured this out yet?

Iā€™ve bought the OpenTherm Thermostat combo (ESP8266/ESP32 Thermostat Shield + WeMos D1 Mini ESP32 + Xiaomi Thermometer LYWSD03MMC) but stay receiving ā€œOT Conn Lossā€ after some time, any idea on what could cause this? My boiler is an Vaillant HRsolide plus 24-28/3-5 With Opentherm Module, it works fine with just an modulating thermostat on the OT connection.

Is it working at the start and does it stop working later, or does it not talk to the boiler at all?

With Opentherm Module, it works fine

You mean master shield?