Opentherm gateway/thermostat with full integration for Home Assistant

Once upon a time I started developing a simple Opentherm controller on esp8266 for personal use, which resulted in a full-fledged controller product for Home Assistant. I think it’s time to publish it.
The software is free, it develops as I have free time.
The repository contains a board diagram, BOM and Gerber file for self-assembly, but it is also compatible with boards from Ihor Melnik, DIYLESS and others assembled according to this scheme.

Goals and tasks that this software performs:

  1. Regardless of the “clouds”
  2. Works autonomously and locally: even if the server is turned off, it will continue to work
  3. Full integration into HA, without the need to describe mqtt entities


  • Hot water temperature control
  • Heating temperature control
  • Smart heating temperature control modes:
    • PID
    • Equithermic curves - adjusts the temperature based on indoor and outdoor temperatures
  • Hysteresis setting (for accurate maintenance of room temperature)
  • Ability to connect an external sensors to monitor outdoor and indoor temperature
  • Emergency mode. If the Wi-Fi connection is lost or the gateway cannot connect to the MQTT server, the mode will turn on. This mode will automatically maintain the set temperature and prevent your home from freezing. In this mode it is also possible to use equithermal curves (weather-compensated control).
  • Automatic error reset (not with all boilers)
  • Diagnostics:
    • The process of heating the coolant for heating: works/does not work
    • The process of heating water for hot water: working/not working
    • Display of boiler errors
    • Burner status: on/off
    • Burner modulation level in percent
    • Pressure in the heating system
    • Gateway status (depending on errors and connection status)
    • Boiler connection status via OpenTherm interface
    • The current temperature of the heat carrier (usually the return heat carrier)
    • Set coolant temperature (depending on the selected mode)
    • Current hot water temperature
  • Auto tuning of PID and Equitherm parameters (in development)
  • Home Assistant integration via MQTT. The ability to create any automation for the boiler!

I also made a board for installation on a DIN rail. The total cost for self-assembly does not exceed $35. But you can also use other boards.

Repository with additional information here: GitHub - Laxilef/OTGateway: OpenTherm gateway for HomeAssistant
Firmware releases here: Releases · Laxilef/OTGateway · GitHub

I will be glad to see your comments and suggestions.


Awesome work. Thank you so much. I have purchased a DIYLESS board to test it with my boiler. I will comment on impressions. Do you intend to integrate valves into the equation?

This looks great, thanks a lot! Is there a way I can get the board assembled somewhere for a reasonable price?

Maybe this one?

1 Like

Thanks for the feedback! :slight_smile:

I don’t think esp8266 has enough resources for this. However, I added the ability to output heating status to any pin ESP. You can use solid-state relays with optocoupler, which can be controlled from 3V, by connecting them to the ESP.
Or you can use Zigbee relays and control them via automation in HA.

You can assemble the device yourself. I order boards from jlcpcb, Gerber and BOM files are available in the repository on Github. Or buy boards for ESP from Ihor Melnik or DIYLESS.

1 Like

Got it, thank you. I will probably just get it from DIYLESS. If someone could double-check my reasoning about this device for my project on this boiler, I would greatly appreciate it.

Users reported that the firmware works correctly with the Viessmann Vitodens 0-50w boiler. This is a boiler that is similar to your boiler.

Morning, appologies if this is not the right place to post this, I had a look for a dedicated “area” to discuss the OpenTherm gatway for HA/ OTGA but this was the only thing I found which is a thread.

so I suppose two questions.

  1. Is there a general area to discuss this intergration?
  2. If not, is there any way to change the max_ch_setpoint on the boiler, in a similar way that can be done via the OpenTherm monitor software?

My house is predominantly wet underfloor heating, and as such having the boiler set much above even 50C is not required.

So my ideal, I believe would be to have an automation that if just underfloor heating is calling for heat, then have the max set to 50C, however if the hot water tank is calling for heat, bump that up to say 65.

I did find SERVICE OPENTHERM_GW.SET_CONTROL_SETPOINT however I don’t believe that is what I want.

For the record, I don’t have two controls set up where one is Hot water and the other is heating, it’s all coming on as “central heating”

I think you have a three-way valve installed that redirects the flow of heat carrier from the heating system to heating the water tank. You need to monitor the state of this valve and change the heating temperature depending on the state of the valve: if the valve is open for heating, then set it to 50 degrees, if the valve is open for the water tank, then 65.

Thanks for the reply @LazyDev, the problem was with the HA intergration I was struggling to see how to set that value.

Or is it a case of using OPENTHERM_GW.SET_CONTROL_SETPOINT which from the docs of the integration appears to suggest that this will activate the central heating circuit.

Using the OpenTherm monitor, I know I can simply set the “Max CH setpoint”, which does what I’m looking for, I was hoping with HA integration I could chnage that depending on what was calling for heat.

wow, amazing project and exacty what i was looking for. I have Vitodens gas heater and air-water heatpump in same system and want to switch them related to electricity/gas price and COP, so that I have the most cost effective outcome.

Good idea, I did that too. An electric boiler is used at night, and a gas boiler during the day. Savings of about 30%.

cool. i ordered the opentherm themostat and closure and so excited already. I really thought i cannot make my gas heater smart.

1 Like