In a previous post <Link>, I described how I put together a 'thermostat' using the EspBuilder integration in Home Assistant. That project was fun, but it relied on my old thermostat from years back that was actually wired into the Air Handler. Since I still have ties to actual code, and was familiar with Zigbee, I thought I'd put together a controller that directly wired into the actual Air Handler and lived on top of it up in the attic and out in the garage using the Arduino IDE. I saw this as a fun Zigbee project that I could tailor over time.
Sadly, that didn't work out. I started by creating a Zigbee device with one control, the fan. That worked well on the second try. I had the usual problem with setting it low instead of high. Then I added the reversing switch, that worked also. As I added things reporting and being controlled, I hit the magic number of seven. It seems the Arduino IDE Zigbee interface to the Esp Zigbee library had trouble with more than seven endpoints on a single device. That kind of sucks because to finish my plans for this new device I needed more than that.
I thought about combining sensors by sending data encoded in numbers and such because text is a real pain using zigbee. Then I thought about my experience with EspBuilder. Maybe that would work...
There I was deep into YAML again, dropping into lambdas of C code where necessary and spending hours looking for the exact right indentation needed to make this idea real. Coming from C originally, putting up with having indentation be the determining factor for nesting really is a space alien concept, but with the help of AI, I stumbled through it.
I took a XIAO ESP32C6, another of those little expansion boards and a cheap four relay board and slapped them together.
So after some time with EspBuilder, I trotted this out to my garage where the Air Handler lives and used some sophisticated mounting devices to place it in actual operation.
Ah, the good old days ...
After a bit of following wires and installing connectors, I had it all wired up and tested with the prototype duct taped to the top of the box. I want folks to notice how I powered this device.
Yes, it's a cellphone charger. I use these a lot for 5vdc projects. As I described in other posts, it's only a buck and will work just fine with 240vac input. Love these little things. Now, how to protect the boards and wiring.
This is what I came up with. Yes, I ordered a new roll of white filament for the printer. I used plugs for both ends and kept the USB C connector as the power input. That way I can plug a laptop into that side to make changes if I need to do that. The other side is a Phoenix plug. I discovered Phoenix plugs mostly by accident prowling around for plugs on Amazon. You can put wires directly into both the fixed socket and the plug itself. Using plugs like this is really nice for environments where there is a small amount of vibration for a long time; plus it allows me to remove the entire assembly and bring it to a workbench for some work if needed. This is specifically what I used:
It looks like it's two parts, but it's actually three, One part mounts to the enclosure, and then the top piece snaps into that forming the socket. The plug part is one piece. I just put the wires from the Air Handler into the plug and the wires from the relays into the socket. It did take a bit of work on the enclosure to accommodate the mounting though. I put a recess in the enclosure using Fusion.
It worked.
The last piece of this upgrade to my home controls is the remote temperature sensor, I'm still using the ancient ones I built up for the old system and waiting patiently for the Esp and Arduino developers to get past the bugs in their code. The last time I tried (about a month ago) two analog sensors wouldn't work in the Arduino IDE, one would show up in the other; I couldn't get two of them independently reporting. The ESP developers have promised EspBuilder would support Zigbee on the Xiao ESP32C6, but they encountered pretty serious problems with their build environment meshing with changes in Home Assistant. It is currently rumored that they blew off their first of the month deadline in favor of coming out with a 2026.6.0 release instead. So, both platforms are in flux and I'm currently stuck.
What I found though, was that EspBuilder under Home Assistant is really great for this kind of development. I can make changes, load them onto the device, and try them out from my recliner in the house. There is even a little web server on the interface board that I can get to.
There's a whole bunch of other features that make that development environment absolutely the best for home automation that fits it's requirements.
Code? Sure, I will eventually put the code into github, when I feel a need to be punished learning yet another new thing.
