Skip to content
MCU Atlas
ESP32ESP32ESP32-C3ESP8266Draft

OTGateway: ESP32 OpenTherm boiler controller for Home Assistant

Controls OpenTherm gas boilers from an ESP32 with PID/weather-compensated heating and full Home Assistant integration.

Difficulty:IntermediateCost:Source available

Key Facts

  • Chip: ESP32 / ESP8266
  • Protocol: OpenTherm
  • Control: PID, equithermic curves
  • Integration: Home Assistant via MQTT

About This Project

OTGateway speaks the OpenTherm protocol to compatible boilers and adds smart heating control: PID and equithermic (weather-compensation) curves, hot-water control, external sensors (1-Wire, NTC, BLE) and an emergency mode that keeps heating running if Wi-Fi or MQTT drops. It integrates with Home Assistant via MQTT auto-discovery. Requires an OpenTherm adapter board between the ESP and boiler.

Source & Attribution

Source: GitHub
License: GPL-3.0
Last verified: 10/16/2026
OTGateway: ESP32 OpenTherm boiler controller for Home Assistant

Illustration

How to Build It
OpenTherm Gateway (OTGateway) is ESP32/ESP8266 firmware for controlling a gas boiler over the OpenTherm protocol. It offers PID and weather-compensated (equithermic) heating curves, external temperature sensors, an emergency mode, and Home Assistant integration through MQTT.

Parts Needed

  • ESP32 or ESP8266 board from the supported-boards list
  • OpenTherm adapter (DIY or bought; see the adapters page)
  • DS18B20 or NTC sensors for indoor/outdoor temperature (optional BLE sensors)
  • MQTT broker (e.g. Mosquitto in Home Assistant)

Steps

  1. 1

    Choose a board and adapter

    Pick a supported board and OpenTherm adapter from the docs' Boards and OT adapters pages. Ready-made adapters are listed as well.

  2. 2

    Flash

    The easiest method is the project's Web Flasher in Chrome or Edge. You can also use Espressif's Flash Download Tool, or build with PlatformIO using the 'Build firmware' guide.

  3. 3

    Connect to the boiler

    With the boiler powered off, wire the adapter to its OpenTherm terminals (the two low-voltage wires usually used by the room thermostat) as shown in the Connection guide.

  4. 4

    Configure

    Join the gateway's hotspot and open its web UI to set your Wi-Fi, MQTT broker and sensor pins. Then choose PID or equithermic mode and tune the curve.

  5. 5

    Home Assistant

    Once MQTT is set up, the gateway's entities appear in Home Assistant automatically.

  6. 6

    Tips

    The on-board LEDs show OpenTherm link status. Emergency mode keeps the heating running if Wi-Fi, MQTT or a sensor drops out.

Parts List (BOM)
Parts list inferred by MCU Atlas — check the original
inferred
PartQtyRoleEst. PriceBuy
1main board$2–$5View
1adapter$15–$30View
1sensor$2–$5View
Estimated Total$17–$35 USD

Not included: 3D-printed case, wire, solder, USB cable

Download CSV

Related Projects

Watchy: open-source ESP32 e-ink smartwatch
Illustration
ESP32Draft
An open-source smartwatch with a 1.54in e-paper screen and ESP32, hackable watch faces in Arduino.
Beginner·Under $15·Code
2 parts listed
Low-power ESP32 e-paper weather display (7.5in)
Illustration
ESP32Draft
A wall-mounted 7.5in e-paper weather display on an ESP32 that runs for months on one battery charge.
Intermediate·Cost varies·Code
5 parts listed
OpenEPaperLink: reuse e-ink shelf labels with an ESP32 access point
Illustration
ESP32ESP32-S3Draft
Turns cheap second-hand electronic shelf labels into a Wi-Fi-managed e-ink display fleet via an ESP32 access point.
Advanced·Under $15·Code
3 parts listed