Oleg Tarasov Smartens Up a Basic Gas Boiler with an ESPHome-Driven OpenTherm Thermostat System
When your boiler's manufacturer is behind the times, an Espressif ESP32 can get your heating talking to Home Assistant.
Engineering manager Oleg Tarasov has set about turning a limited-function gas-fired boiler into an integral part of a Home Assistant-controlled smart home — by building a custom OpenTherm controller from an Espressif ESP32 microcontroller running the ESPHome firmware.
"Gas boilers such as ours are very popular in Russia, but most of them don't come equipped with any smart or remote control features," Tarasov explains. "There are also more sophisticated systems from other vendors on the market, and they promise all the good stuff, at least on paper: mobile apps, cloud access, reporting, alerts and so on. But these are all cloud based services which are vendor-locked and closed-source, so I'm a bit reluctant to build critical and generally hard to replace infrastructure with a service that can be breached or simply go out of business."
The solution, then, is to roll something custom. This, Tarasov explains in a pair of blog posts brought to our attention by Adafruit, is aided by the fact that the boiler, a Buderus Logamax U072, is compatible with the OpenTherm protocol. "This is good in a way that this standard is documented and there are several open-source libraries available," he explains. "The not so great part is that a hardware bridge is required, since boiler operates in a 0-18V range, and you can't just plop a microcontroller on top of it."
Thankfully, that has already been addressed by Ihor Melnik, who designed an adapter that sits between an OpenTherm compatible boiler and any microcontroller — an Arduino UNO in Melnik's original design, but an Espressif ESP32 with built-in Wi-Fi radio for Tarasov's project in order to deliver both wireless data connectivity and integration with Home Assistant through the ESPHome firmware.
"I also made eight or nine screw-in temperature sensors to monitor temperature in various point in my system," Tarasov adds. "I bought super cheap analogue gauge thermometers, threw out the thermometers and glued a bunch of DS18B20 sensors into screw-in enclosures. I used a thermal glue which is also used to glue CPU heat sinks, and later filled it all with heat-resistant resin."
The result is a major upgrade over the limited-functionality thermostats on offer from Buderus itself, offering multiple temperature measurement points as well as a wired temperature sensor as a fallback, a proportional-integral-derivative (PID) control system to call for variable radiator heat depending on the room's requirements, and full monitoring on a dashboard — complete with toggles to enable and disable both the boiler's central heating and hot water functions.
Full details, including configuration files and a schematic, are available on Tarasov's website; additional information on adding a display to the thermostat is to be published in the near future, he promises.