Stephen Carey's Hot Tub Gets Smart, Thanks to a Home Assistant-Linked ESP32 Monitoring System

This MicroPython-based monitoring system keeps an eye on temperature, pH and ORP levels, and even whether the lid's been left off.

Maker Stephen Carey has given his hot tub a scorching makeover, building a detailed monitoring system using an Espressif ESP32 microcontroller and a range of industrial sensors to keep track everything from temperature to the water's pH levels.

"When I got my hot tub last year and was looking into remote monitoring and control I could only find an old Hackaday post from 2015 but the old microcontroller was hard to source," Carey explains, referring to a project dubbed SpaSitter and based around an Arduino-compatible but long-since discontinued Nanode board. "I figured I'd rework it using tech from this decade so I could read the temperature, pH, and ORP [Oxidation Reduction Potential] in Home Assistant and not have to deal as much with test strips."

An Espressif ESP32 in a 3D-printed housing makes for a cheap but feature-rich hot tub monitoring system. (📷: Stephen Carey)

The heart of Carey's monitoring system, aside from the hot tub itself, is an Espressif ESP32-based development board with an OLED display, an analog pH sensor, an ORP sensor, two temperature sensors for air and water temperatures, and enough pH calibration solution to ensure that the readings taken are at least close to reality. The addition of a reed switch also keeps track of the hot tub's insulated cover, providing a warning if it's been left off for too long.

"I just put the pH, ORP, and water temp sensors up and over the side and into the tub near a filter," Carey explains of the physical installation. "The air temp sensor should be somewhere out of the sun and away from other objects. Mine's hanging over one of the shelf supports. I haven't hooked [the cover sensor] up on my setup yet but adding support for it in the code was simple enough. I figured I'd glue or maybe sew some magnets into the flap of the cover and try to line up a reed switch near where they magnets should end up."

The monitoring system transmits readings to Home Assistant via MQTT once every minute. (📷: Stephen Carey)

The MicroPython-based sensor station sends its readings once per minute to Home Assistant via MQTT, tracking historical data if required and offering the option for alerts should readings be out-of-whack — such as the water pH level being too low or too high, indicating the need to add chlorine or more water, or the temperature being outside a configurable range.

Carey has published a full write-up, with source code, on his website; he notes that the pH and ORP sensors need to be replaced once a year, at a cost of around $60.

ghalfacree

Freelance journalist, technical author, hacker, tinkerer, erstwhile sysadmin. For hire: freelance@halfacree.co.uk.

Latest Articles