Ryan Murphy's Line-Power Smart Thermostats Expand Off-the-Shelf Sockets for Home Assistant Heating

Available in rotary encoder or six button variants, these smart thermostats use ESPHome to integrate with Home Assistant.

Maker Ryan Murphy has designed a pair of line-voltage-powered thermostats, built using modified off-the-shelf smart switches and ESPHome firmware to tie them — and their newly-added extra hardware — into Home Assistant.

"A while back, I wanted to add smart thermostats to my apartment. However, I was surprised by the lack of inexpensive, line voltage (or baseboard) smart thermostats," Murphy explains of the project's origins. "Especially since there's so many cheap smart wall switches, and a line voltage thermostat is just a wall switch with a temperature sensor and some type of UI [User Interface]. So I decided to make some using ESPHome and Home Assistant."

The heart of the project is the user's choice of off-the-shelf smart power switch, with one key requirement: it has to be driven by an Espressif ESP8266 microcontroller compatible with the ESPHome replacement firmware. To this, Murphy adds either a rotary encoder to serve as a user input, a DHT22 or AM2302 environmental sensor, a 128×64 SSD1306-based OLED display, and a handful of passive parts, all housed in a 3D-printed case.

"I've since moved to a house with central heat but has a baseboard heater in the bathroom," Murphy writes. "I wanted to be able to run the heater on a timer for showers in the winter so I redesigned the thermostat to use a ESP32 for the increased I/O [Input/Output] to add buttons instead of the rotary encoder."

This second variant of the design adds a separate Espressif ESP32-based microcontroller board and replaces the rotary encoder with six tactile push-button switches. These, in Murphy's case, are set to adjust the temperature in 0.5 degree steps, toggle between two preconfigured temperature settings, set a 30-minute or one-hour timer ticking, or manually toggle the heater on or off.

"This project involves line voltage," Murphy warns anyone interested in building their own smart thermostats from his designs, "which can be extremely dangerous and deadly. I am not an electrician or electrical engineer so proceed at your own risk. Always turn off the power at the breaker and double triple check the power is disconnected before touching any wires."

If the warning hasn't put you off, the configuration files, hardware designs, and 3D-printable cases are available on GitHub under the permissive MIT license.

Gareth Halfacree
Freelance journalist, technical author, hacker, tinkerer, erstwhile sysadmin. For hire: freelance@halfacree.co.uk.
Latest articles
Sponsored articles
Related articles
Latest articles
Read more
Related articles