DIY OpenTherm Thermostat?

Of course. I’m still learning myself, so out of interest what do you mean it was too aggressive?

It is actually just the one from the example in github here, with the sensor changed (security creds trimmed):

  name: esp32-01

  in_pin: 21
  out_pin: 22
  ch_enable: true
  dhw_enable: true

  - platform: opentherm
      id: t_set
      min_value: 20
      max_value: 65
      zero_means_zero: true

  - platform: opentherm
      name: "Boiler Relative modulation level"
      name: "Boiler water temperature"
      name: "Boiler Return water temperature"

  - platform: homeassistant
    id: ch_room_temperature
    entity_id: sensor.average_temperature
      # Push room temperature every second to update PID parameters
      - heartbeat: 1s  

  - platform: opentherm
      name: "Boiler Central Heating active"
      name: "Boiler Domestic Hot Water active"
      name: "Boiler Flame on"
      name: "Boiler Fault indication"
      entity_category: diagnostic
      name: "Boiler Diagnostic event"
      entity_category: diagnostic

  - platform: opentherm
      name: "Boiler Central Heating enabled"
      mode: restore_default_on

  - platform: pid
    name: "Central heating"
    heat_output: t_set
    default_target_temperature: 20
    sensor: ch_room_temperature
      kp: 0.4
      ki: 0.004

EDIT: I’d be interested to know too how to tell what of the opentherm parameters a boiler supports. I’ve tested other OT sensors and they return wild values, I assume that means those particular sensors are not available on my boiler. Just interested to know what others have discovered in this area.

I meant with ‘aggressively heating’ that it was heating up really fast, with too much overshoot. So for me, these parameters should be changed, but they are not really explained. Even in the esphome documentation, i did not find a lot. Is the 0.4 a percentage with maximum 100 for example, what happens when taking a higher or lower value. It would also help if you could find a table with used values in certain circumstances (regarding how big is the room, how well isolated is the house/age of the house, …). There is a autotune function in esphome, but it seems not to produces always good results. I did not try it yet however.
Regarding the number of sensors your boiler supports, i think it’s trial and error. I think most of the basic sensors are everywhere supported. Probably you could find some more info when looking in other opentherm open source initiatives.

1 Like

Hi has anyone been able to use powercalc in conjunction with your diy OT install to get a fairly accurate gas consumption reading?? My gas meter doesn’t have the p1 port nor the magnetic ticker…

@shcherban, do you also have a blueprint for the thermostat so you can add automations and schedules for the thermostat? I have it working but only by manual controle. Other question do you also have a sugestion for a hardware knop to change see the temperature and change it? By girlfriend like physical buttons/knops to see and change the temp.

Dont know are you talking about master shield or thermostat (the one with ble sensor in bundle).

  1. For the thermostat (with BLE) schedule is in our plans to do as a built-in functions. For any other generic usage from HomeAssistant - i should check HA docs on how to create schedules and maybe will write some post on Diyless bolg.
  2. Physical control would be nice, but it requires a bit more work, like case, new board, knob itself, some display and software to glue all this together. We are considering this as some ‘next gen’ of our thermostat, but it wouldn’t be so fast(
1 Like

Check this tread: Smart heating scheduler for Home Assistant (extra: multi-zones version) - Share your Projects! - Home Assistant Community (

As for a physical button / touchscreen perhaps en ESP32 with OPenHASP can help you:

1 Like

@shcherban and @Keeze thanks both for your reply. Unfortunatly i used the ESP8266. I didn’t know at the time i started the project that the phiscal controle would have been an issue for the other users in my house. As this is not possible as off now with this setup what would you advice to use?

Hi Dolphinman, I have this exact problem too. Bought that kit last week. At first it seemed to work but after a while OT conn loss. Did you happen to find a solution yet?? I have an Intergas Kombi Kompakt HReco. The only thing that works is sending commands like on/off to the boiler. So there is some communication going on… but no data coming back to indicate what boiler status is after that.

Maybe boiler is waiting for some vendor-specific command, and if its not issued within some period - it rejects further communication.
Did i understood correctly that:

  1. It works for some time
  2. Starts loosing OT connection
  3. You restart the boiler/thermostat/whole setup
  4. Back to 1


Im using the DIYLESS code and Im facing with an problem (I guess) about pid modulation. The “float ophi = 50;”, but when is heating for the first time, this just increase by 1% until it reach its destination: 50. When the thermostat declare its heat reach, thermostat send command “off” to boiler. On the next “heat” command ![Screenshot 2023-02-04 at 22.50.34|635x415]
(after about 1 hour) the boiler-target-temperature stays on 50, no modulation, only the flame level seems to modulate. Is it normal what is happening?Screenshot 2023-02-04 at 22.50.34
Screenshot 2023-02-04 at 22.50.37

The screenshots above are from its first running after I flash it.

Hi, would you like to help me with this entry? I cant make it work; where to enter those values as I dontt have any. Please

Great post. Yesterday I have set up the ophentherm termostat, hot water works like a charm, i love it, but heating is not turning on. Thats my thermostat:

    - name: "My Thermostat"
      unique_id: "my_thermostat_1"
      - "off"
      - "heat"
      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: 28
      value_template: "{{ value }}"
      temp_step: 0.5

Its taken from website.
Can anyone help me?

Do you have mqtt explorer installed? That way you can see whats happening and check if your actually sending / receiving the setpoint and temperatures.

Are you using ready-made thermostat (preflashed one) or you have uploaded a sketch yourself?

We’ve released a second version of the thermostat, which is based on ESP32-S3, so it gets a bit better Bluetooth performance if you are using Xiaomi BLE Thermometer. Also it has a tiny display and a few buttons to be operated without HomeAssistant/web UI (just in case).
Also we added an expansion connector there, which is connected to ESP32. You can either write your own firmware or drop us some ideas which features would be nice to have. Using that connector you can drive/communicate to some external devices.


Nice work! I have the first version of this thermostat and it serves me well. I printed a small case and attached it to my boiler and send it commands over WiFi. I like the idea of a screen and buttons a lot, but the main barrier to buying on of these for me would be the external power supply. Most households have no power supply near their thermostat wire and running cable there has a low WAF. The strategically placed couch on your product image is there for good reason :slight_smile:

Are there any plans to make a version with an integrated buck converter so it can run over the power supplied on the opentherm cable? Or am I missing something here?

1 Like

Yep, WAF factor if a bit barrier for now)
And regarding integrated supply - yes, we are aiming for it, however it requires a software support aside of hardware changes: opentherm library should be able to request for power providing as well as firmware should be rewritten itself, because for now we are using Arduino framework which is great for fast start but it uses a lot of energy (relatively). You might notice than thermostat is heating itself because CPU isnt sleeping. We are investigationg ESP IDF to use some advanced powersave technics, that would lower device’s power appetite.
BTW we have also released a firmware update (if you are using pre-flashed version), which adds scheduler, and some minor bugfixes.

1 Like

Ah, bringing deep sleep to the device over firmware update would be amazing!
I don’t use your firmware personally and switched to ESPHome, I’m the kind of person that likes control over their PID loops. Did you consider using ESPHome? You get deep sleep for free.
Here’s the ESPHome config I’m running on your device:

1 Like

Working on it) Our firmware is more for people not too friendly with those technical details. But of course we are encouraging any extension/new usecase, that was primary goal our HW was built for. After we get up and running ESPHome version - will try investigationg on opentherm powering from boiler.


Understanding Heating Curves

In most boilers you can select a heating curve. There are two cases:

  1. a sensor for external temperature is connected to the boiler
  2. a sensor for external temperature is NOT connected to the boiler

In the first case the target boiler water temperature can be looked up.
In the second case it can not, so at best a default external temperature is used. Than the selected heating curve translates to a certain target boiler water temperature.

What happens next depends on the “algorithm” of the boiler.

a) if you have an on/off system than the boiler could heat up to the value of the heating curve, this can be done with full power, or with some throttled down power.

b) if you have a thermostat that modulates (opentherm) than the heating curve temperature becomes IMHO at best some secondary parameter, because the target boiler water temperature is set by the thermostat.
Anyway the target temperature has to be translated into flame height (the amount of heat added). Flame height is calculated by the boiler, mostly by proprietary closed algorithms.
Or put in other words: heating curves are obsolete with a modulating thermostat. From experimenting with heating curves my finding was that they did make no differences in behaviour of the system.

Please Comment ! Maybe I 'm totally wrong, would be happy to hear that.

1 Like