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.

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

Illustration
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
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
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
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
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
Home Assistant
Once MQTT is set up, the gateway's entities appear in Home Assistant automatically.
- 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.
Not included: 3D-printed case, wire, solder, USB cable
Related Projects


