I have plenty of ESP32s deployed around my house, acting as command centers for various lights, sensors, and automations. And in my quest to create the ultimate smart home, I’ve finally tamed temperature.
With a tiny ESP32, a temperature sensor, a screen, and a few buttons, you can create a climate controller for your home that’ll maintain whatever temperature you want across rooms, regardless of whether you’ve got a smart air conditioner or a dumb one. All it takes is a little time.
What needed to be monitored
Two ACs, two printers, one button to rule them all
I wanted a device that could control the ACs in my bedroom and office to maintain a specific temperature, as well as provide a quick physical button I could use to control lights without having to fiddle with my phone or Home Assistant on my PC. Additionally, I also wanted to monitor the print status on both my 3D printers.
The part list for this build is about as basic as it gets. First, you need an ESP32. Any variant of the board works, but I chose the ESP32 C3 Supermini for its small form factor because I wanted to make magnetic docks for my office and bedroom that I could dock the device in. A DHT22 provides basic temperature and humidity data that’s used to control both my ACs, which are in turn connected via Tapo smart plugs to the wall. A 1.3-inch SH1106 OLED display shows data, and three tactile buttons help navigate the menus and toggle devices.
The printer page was in and of itself a small headache to get right. Since my printers are from Bambu and Elegoo, their respective integrations report print status in different terms. The solution to this was to normalize everything into six buckets — idle, printing, paused, done, error, and offline — so the display doesn’t care which brand is talking.
Turning a dashboard into a thermostat
One zone at a time, whether you like it or not
I started creating the climate control logic by adding a Climate Control page to the device, which arms or disarms the main Home Assistant automation and shows a snowflake icon on other pages to indicate the AC’s actual state. The automation holds whichever room is currently selected between 28 and 30 °C using the onboard DHT22 reading, but only while armed, and only for one room at a time.
Switch rooms, and whatever room you left behind gets forced off regardless of how warm it still is. It’s a single-zone system riding on a multi-zone dashboard, which is a reasonable tradeoff for something built for less than the price of a coffee. The Home Assistant automation itself is rather simple: check whether climate control is armed; if yes, check which room the device is in and then use the temperature sensor readings to toggle the AC on or off.
The trickiest part of this whole build wasn’t the sensor or the automation logic — it was a hardware quirk in my office AC. Even though the AC might be on from the plug, the onboard control unit doesn’t necessarily turn the AC on, forcing me to power cycle the AC again to get it to actually run. This behavior rendered a simple automation useless, as simply toggling the office AC on wasn’t enough to actually run it.
I ended up writing a verify-and-retry script that turns the plug on, watches actual power draw to know when the compressor kicks in, and power cycles if the compressor doesn’t kick in. The script runs five attempts, ten seconds apart, with a five-second cooldown period. Only once the script confirms real power draw does the snowflake on the display turn on. There’s also a separate safety-off automation that forces both ACs off if you disarm the system or if the device drops offline for more than 45 seconds to ensure nothing is left running unsupervised.
The reboot mystery
Wi-Fi signal strength is my prime suspect
I’d love to say this build was successful in the first go, but if you’re working on cheaper ESP32 boards, especially the C3 Supermini, there are connection problems that’ll almost always creep up on you. My current device has been reboot-looping more often than I’d like, and I genuinely don’t know the reason yet. It does happen more often in my bedroom than it does in the office, so Wi-Fi signal strength or channel congestion are my top suspects.
In my experience, C3 Supermini boards with incorrect antenna placement are much flakier at connecting to Wi-Fi, especially if the router is further away. I do have decent signal strength between 45 and 50 dBm in both my office and bedroom, but it tends to go non-responsive sometimes for no apparent reason. Brownout, firmware crash, or a flaky Wi-Fi driver are all still on the table, but for now, I’ve put two band-aids in place — a 45-second grace period before the safety-off automation kicks in, and making sure the display never shows a stale guessed state after a reconnect.
There’s still more work to do
Pogo pins and a battery stand between here and done
The device is still sitting on a breadboard powered by a nearby USB port, so it’s not quite a finished product yet. I’m yet to build the magnetic charging docks, one for the office and one for the bedroom, using 3-pin pogo connectors that carry power and a room ID signal so the device knows where it’s sitting. A small onboard battery to keep it alive between dock jumps also needs to be put in place.
Regardless, it’s starting to come together rather well, and it’s one of the most useful smart home devices that I’ve made. It has made possible something that would’ve taken me thousands of dollars and a whole lot of work, and all of it runs locally, without the need for an internet connection, on hardware I already own.