Thursday, July 9, 2026

The 24-Volt Insurgency: Why Desert Packrats Are Mocking Your Peppermint Oil

There is a specific, primal horror to waking up in the middle of an Arizona summer night in a pool of your own sweat, checking the thermostat, and seeing a crisp 89 degrees staring back at you.

It’s even worse when you grab a flashlight, walk out into the hot, dark, pre-dawn desert air to inspect your air conditioner, and find that a furry, four-legged demolition specialist has systematically snipped your 24-volt control line, converting your life-saving air conditioner into a heater.

If this happens once, it’s an annoyance. If it happens three nights in a row, it’s a battlefield between the primal forces of nature and civilization as we know it.


What was going on?

For the last week, my northern AC unit became the epicenter of a tactical showdown between human engineering and rodent persistence. A huge inconvenience to me, but after a few midnight flashlight repairs and some serious crime-scene analysis, I’ve cracked the code on why they do it, why the internet’s favorite DIY remedies are absolute garbage, and most importantly, how to build a defense grid that actually works.

Add to that the safety factor. The default factor in home AC heat pumps is to heat. It seems better to be awakened to the heater running unexpectedly instead of the cooling. The engineers seem to think that uncomfortable heat is better than freezing to death in the winter from a rat breaking the 24-volt circuit. Living in Arizona, I might argue that, but my relatives in the Northeast would object.

The Soy-Plastic Myth vs. The "Perfect Toothpick" Reality

If you spend ten minutes on automotive or HVAC forums, you will run into the classic urban legend: "The government forced manufacturers to change the insulation to soy-based plastics, and now the wires taste like food!"

Let's set the record straight. While it’s true that modern car manufacturers did switch to soy-based bioplastics over the last decade (creating a multi-thousand-dollar buffet under modern truck hoods), it wasn't due to US regulations. It was companies pandering to environmental concerns.

This new insulation will, over time and exposure, decay—unlike petrochemicals that last forever. It’s lighter, easier to form, weighs less, and fills that niche of environmental awareness that sells so well to city dwellers who seldom actually see, much less live in, the environment they talk so much about preserving. The unintended consequence of this corporate virtue signaling? Your expensive vehicle or outdoor equipment has been converted into a gourmet snack.

However, before you go blaming a corporate marketing department for your broken AC unit, there’s a twist: your standard residential air conditioner thermostat wire isn't soy. It's still old-school, petroleum-based Polyvinyl Chloride (PVC). It smells like chemical garbage, not dinner.

So why did the rats keep coming back to my north unit to slice the exact same wire?

During day three of my investigation, I noticed something critical: The rats completely ignored the thick outer cable sheath. They only attacked the thin, individual 18-gauge colored wires after the sheath had been peeled back for the connections. "But why?" one asks.

It turns out it's a matter of biological imperatives. A rodent’s incisors grow continuously—up to five inches a year. If they don't constantly gnaw on things to file them down, their teeth will literally grow through their own jaws. This provides some clues to why, but also some cautions.

The thick outer jacket of an AC cable is too wide and smooth; they can't get a jaw around it. But an individual 18-gauge strand? That is the exact diameter of a small root or a piece of desert scrub. It fits perfectly into the sweet spot of their jaw mechanics. It's not dinner—it's a precision-engineered toothpick. Something to gnaw on to help grind down their teeth, and a low enough voltage not to roast them into a carbon footprint. 

Why Internet Remedies Fail: The Evaporation Trap 

Before we talk about what works, let’s talk about the absolute sales BS cluttering up the internet. In my time fighting the desert wire-eaters, I have systematically tested the "feel-good" remedies. Here is the field report:

  • Peppermint Oil: I once sprayed a literal quart of high-concentration peppermint oil around the engine compartment of my truck. The result? I had the best-smelling, mintiest rodent hotel in Arizona. Once the initial vapor shock wears off in a few hours, the rat’s drive to chew completely overrides any objection the rat has to the smell. Trusting that home remedy cost me $2400 at the dealer having wiring harnesses replaced.

  • Bitter Sprays: Products designed to stop dogs from chewing work for about 48 hours. In our brutal desert environment, the intense sun, heat, and ambient dust cause the bitter compounds to volatilize and vanish. Also, remember, the rat has to chew enough of it to taste the bitters. Our own experience with canine bitters has mixed results; some dogs react to it, and others ignore it and still chew off our baseboards and chair legs. How well would we expect it to work on a rodent that eats cactus (thorns and all), chews the bark off our fruit trees, gathers dried dog poop and uses it as a front door to its home, and leaves trails of its scat under our BBQ?

  • Predator Urine: Buying fox or coyote urine sounds tactical, but rodents are highly adaptable. A desert packrat has no evolutionary memory of a European Red Fox. Even if you use local coyote scent, if the smell just sits there day after day without a physical coyote ever showing up, the rats figure out within 48 hours that it’s a ghost threat. Renewing the dosage only helps the rat to learn that the smell is not left by a predator simply because the threat never materializes. 

The Real Culprit: The Oasis Effect

While inspecting the unit on day four, I finally found the smoking gun. I noticed a distinct, wet patch of condensation pooling right on the base tray of the compressor housing. Look closely at the dust, and you can see the tiny, muddy footprints.


In the middle of a scorching summer, a guaranteed, daily source of fresh, dripping water is worth more than gold. The copper pipe carrying cold refrigerant into the air handler inside the house condensed the limited humidity of our desert air and dripped into that little reservoir at the bottom of the compressor casing. My AC unit wasn't just a hardware store; it was a five-star desert oasis. The rats were stopping by for a cool drink of AC sweat to beat the heat and then deciding to utilize the local 24-volt toothpicks while relaxing by the pool.



Before your environmental instincts kick in and you comment on how bad for the environment rat poison is, I had been three nights without sleep in a sweltering puddle of sweat, listening to complaints about the AC continuing to fail. What exactly would you have done? Cut me some slack here. Plus, this is some of the incredibly expensive rodenticide that only kills once. 

Even worse? Those green poison pellets I threw down were sitting completely untouched right in the puddle. The rats literally marinated their poison while ignoring it to chew on my wiring.

The Counter-Insurgency Playbook

To win a war, you have to change the environment. Here is the two-phase strategy I used to take back the north wall.

Phase 1: The Tactical Retreat to the High Ground (The Free Fix)

The rats were successful because the 24V lines were sitting on a low-level "lounge deck" right at chest height for a sitting rodent.

The service access to the AC compressor

Close up of the wiring area after two
repair attempts. 

I pulled the thin AC control lines completely out of that bottom open shelf. Then I rerouted the multi-conductor line from the house upward and fed it directly into the side knockout of the upper, enclosed high-voltage metal service area.

The 24VAC wires are on the bottom
And the 240VAC wires are on top.

By making all the wire-nut connections inside a sealed metal box, the target wires were protected. The only thing left downstairs near the concrete pad is a smooth, unbroken stretch of factory cable jacket. They showed up the next night, drank their water, and realized the wire playground was locked and went off to some other rat playground. We are currently four nights in with zero outages.

Phase 2: The Permanent Armor (The Parts List)

Once the immediate crisis is averted, it's time to build a maintenance-free fortress. Because we are dealing with a whole desert ecosystem—from tiny mice to heavy-jawed gophers, ground squirrels, and don't forget, rabbits—your best bet is to armor-plate the entire run from the wall to the chassis.

  1. Mechanical Armor (Techflex F6 Heavy Wall Braided Sleeving: Instead of tearing your fresh wiring apart to slide a tube over it, use a split braided sleeve. The heavy-wall version has a built-in lateral overlap that snaps shut around the existing wire. A rat's teeth slide right through the slick woven matrix rather than grabbing and cutting it. Plus, the wire sticks them in their mouth, making it unpleasant enough to leave alone. 


    I've used this on my pool for months. 

  2. Chemical Deterrence (Genuine Honda Rodent Tape) This stuff is the gold standard for a reason. Honda bakes micro-capsules of pure capsaicin (chili pepper extract) directly into the vinyl substrate. It doesn't wash away or evaporate in the sun like a spray. When a rodent punctures it, the capsules burst directly into their mucous membranes. It's true that the rodent has to actually chew on the tape to get the burst of capsaicin, but that's what rats do, chew.
    Honda Tape Rodent 19mm 20m 4019-2317|

    Safety Note: Always wear heavy gloves when handling the spicy tape, and for the love of God, do not rub your eyes, scratch your privates, or pick your nose afterward. You might also warn a repairman, but that's your choice.

End Result

Here's a picture of the AC unit after I finished it up. It has (so far) held up against the wandering rodents seeking cover and water. 

All the points where wires might get exposed are wrapped with rodent tape and  all the wiring is inside the wire sheath. Yes, those are stainless steel zipties; plastic doesn't last long here. I suspect this will hold up for a long time, but I'll keep an eye on it just in case of sun deterioration. 

Final Lessons from the Desert

If you live out in the rural desert, nature is always trying to reclaim your assets. If you park a vehicle outside, leave the hood up. Rats hate open spaces where hawks can see them, and they hate the sun. I've had reasonable luck with flashing lights; get some flashing Christmas tree lights and toss them under your vehicle to chase rodents away. This method does run the risk of the extension cord from the vehicle to the outlet getting chewed up though. For vehicles I use a combination of open hood and flashing lights that has worked well.

If your AC goes down, look for the water source, move your connections into protected areas, and armor the gaps. Let the neighbors deal with the mint sprays and the ghost coyote urine—stick to solid mechanical engineering and really spicy unexpected treats.


Friday, June 19, 2026

The Evolution of My Hot Water System - Part 1

Hot water isn't usually thought of as a problem in the rural Arizona desert, but to my household, it actually is. During the summer, we get lukewarm water out of the tap running around 80° - 90° because the ground heats up to that temperature. The water right out of the well runs cooler, but it sits in a tank and travels through a PVC pipe to the house. One would think that just heating it up to the standard 130° - 140°F would be cheap. Not true.

Incessantly rising power company charges and the energy it takes to raise the temperature of water 50 degrees make for a noticeable expense. Then let's compound that with "Peak Demand Billing" and an uncontrolled water heater can really tack on the charges. In fact, this exact thing is what got me started in Home Automation. I was surprised by a huge power bill and wanted to understand why; then after hours of research, trying to find a way to prevent it became a large part of my free time. This blog is filled with my various methods of control. 

Specific to the water heater, first I had a solar-assisted water heater installed. That was wonderful and did a lot for my power consumption. Suppose on a normal clear day of our usual 100+° sunshine, I only get one tank of hot water from the solar system. Going from 85°F up to 135°F in an 80 gallon tank is actually 667 lbs x 50°F = 33,360 BTUs. Using one of the internet calculators to convert to kWh, 33,360 / 3,412 = 9.78 kWh using only sunshine and a few watts from the circulation pump. That leads to around $1.20 to $1.50 a day savings. Taking that on an average monthly bill, I'm saving about $36; in a year that's over $430!! 

I'm saving money that I don't have to give to the power company's lawyers so they can lobby for higher rates with the local regulators.

Unfortunately, that doesn't address the peak billing problem. Back then the peak period was from 3 PM until 8 PM, and that period held some of the largest uses of hot water, like the evening meal (supper to some, dinner to others), dishes, and after-work showers, normal stuff. That led me to installing a power shutoff timer to keep the helper heating element in the hot water heater shut off during that period. 



I added stops in the timer to control the heater from 10 PM to 6 AM also since I didn't need hot water during those times. Everything was great until the power went off (happened often back then) and the timer was off. Those mechanical devices, while extremely reliable, had nothing to keep the time correct. When I got a power bill for an extra $40 in demand charges because I forgot to reset the timer clock, I started looking for another solution. That initial solution (this was in 2011) was an X10 relay and a timer clock in the house that had a battery in it. That failed me as well <link>, and another $40 down the drain... literally. 

It was time to create something that actually worked. Grabbing an Arduino and ordering an SSR from China, I built my own controller that had the time from an XBee network that I already had running and controlled the SSR that interrupted the power to the water heater. Note that I tried a contactor first, but those things are noisy unless you spend tons of money on them <link>. SSR devices cost a lot less and are easier to control. That little device <link> actually worked really well for a long time until I decided to measure the power usage of the heater. This ability to measure the power usage was mostly just me investigating because, at the time, I really didn't need to know the water heater used 4500 watts; that was written right on the label. What I wanted to know was how often it kicked on and why.

My SSR Water Heater Controller

That meant another device and a bunch of changes. I built up a pretty sophisticated combination of an Arduino hooked to an XBee that read power from a Modbus-based power measuring and display device <link>. This transmitted the state of the water heater and the temperature of the top vs. the bottom of the heater. I was really cooking now. I had temperature measurements, power measurements, remote control, and it wouldn't fail because the time changed. It looked cool on the wall over the water heater and was great for showing off to the neighbors <link>.

Oddly, it didn't impress the girls though

Man, I was right up there with a fully controlled water heater that provided wireless telemetering and autonomously controlled activity to avoid peak demand charges. A home automation dream, BUT there was still that problem of not enough hot water on cloudy days. What should I do about that?

The answer was right in front of me for years. The solar-assisted water heater had a circulation pump that pumped antifreeze-conditioned water from the heating coils at the bottom of the heater to the array on the roof. That's how they avoid damage from freezing weather: isolate the potable water with a radiator in the water heater and send it through the heating array on the roof. Suppose I put another one in that pumps the water from the bottom of the water heater to the top. I have water fittings on both ends, one is the exit for hot water to the house (top) and the other is the drain at the bottom. That would force mixing the water to equalize the temperature, and the helper element would take up any slack to give me the entire volume of the heater as a reserve. With an 80 gallon capacity, that would serve any reasonable purpose during cloudy days. However, this wouldn't be a simple task; one inch plumbing fittings are a real pain to deal with, and sweat joints are NOT as easy as the YouTube videos pretend.

But this series of adventures is getting too long, and I know you're approaching TL;DR, so in part 2 I'll get into the trials of a destratification pump.

Thursday, June 18, 2026

More Adventures With My Pool

 Way back over a decade ago (2013), I installed a Waterco Multicyclone Filter on my pool <link>, and it worked pretty well. Then in 2015 I had a problem when one of the fittings broke, <link> which was annoying because nothing else broke when my pool flooded during a downpour. Well, it happened again and was a little bit exciting at the time.

I was sitting on the patio enjoying a fine sunny day (103F) over a cup of coffee when I noticed the pool level had dropped. A little bit concerned, I checked to see if the autofill was working; it was. So I went to the equipment, and the area was flooded, and water was shooting everywhere. I waded through the mud and spray to the controls and shut the pump off. The union fitting on the Waterco had split in half and was the source of a high-pressure leak right at the pump. The first time this happened, it was the top fitting; this time it was the bottom fitting. After a heavy sigh, I decided it would be necessary to do some plumbing work.

A little background here: my area requires a cartridge filter on swimming pools to conserve water. The thinking is that backwashing a sand filter wastes water and a cartridge filter solves that problem. The engineer that came up with that suggestion was an idiot. The person didn't think about the fact that cleaning a large cartridge filter takes a ton of water to clean. I actually used a pressure washer, and it took an hour or more to clean all four filters in the enclosure. Then, it would fill up with desert sand in a week during the summer, and here in Arizona, we have roughly nine months of summer. So it was almost a weekly task of taking out the cartridges, putting in a spare set, cleaning the dirty ones, and putting everything back in service. Cleaning the darn things took a whole lot more water than my neighbor's sand filter, plus the time and effort of doing it. When the cartridges wore out from incessant cleaning, they cost around $100 each; four filters in use and 4 on standby for changing, roughly $800 invested in paper. 

Now, keep it to yourself, but I bought a sand filter and replaced that hunk of junk cartridge filter. The straw that broke the camel's back was when the assembly inside the cartridge filter failed and needed replacement. I looked at the cost of Hayward parts and decided it was time. After changing to a sand filter, the water looked just as good, backwashing took about 6 minutes, and I was done for at least three weeks before it needed it again. Much less work, much less water wasted, no cartridges to worry about replacing. A little bit of heaven for a change. 

Getting back to the recent problem, the last time I replaced the fitting on the Waterco, it took over a week to get it, and that would mean a green pool. Additionally, the failure was exactly the same as the last time; the ring split in half.


I decided that over a full decade of good service while I was fighting the cartridge filter's problems was enough for this device and decided to eliminate it. Mostly because I realized that it really wasn't overpressure that destroyed the fitting; it was vibration. Years of motor start-stops, pressure changes, and constant vibration just wore the darn fitting out. That combined with the ease of cleaning the sand filter and its much better filtration meant that I really didn't need the extra filtration any more.

Time to simplify and eliminate another thing to take care of.

However, it was a bigger job than I first expected, actually much bigger. The darn concrete platform the equipment was sitting on was broken and starting to fall apart. Yes, the people that manufactured that piece of concrete for pool companies to install had left some of the rebar reinforcement outside the concrete and water infitrated causing the rebar to rust. When rebar rusts, it expands and cracks the concrete. I had a broken mess supporting my pool equipment. But pulling all the above ground plumbing, tearing out the broken slab, pouring a new slab, waiting for it to cure, putting everything back would take at least a couple of weeks. 

What to do? I decided to take it in two steps. First, I would just get the pool back in service because it is June in the middle of Arizona and we only get half a day of active work before the heat drives us into the shade or under an air conditioner. Second, it's Summer, that's when you want a pool. Third, to support the weight of the filter, the concrete should cure for at least three weeks before you put weight on it like a sand filter and a heavy motor. Those three reasons made enough sense to me to do something different. After I got it in service with the broken slab and some inventive plumbing, I would cast the slab out in the back on a piece of plywood, let it cure for a few weeks, then dismantle the plumbing and move the new slab into place where it needed to be. Yes, the new slab would be heavy and hard to move, but I have a small skid steer, a small excavator, a Jeep with a winch on it, and pipes. I should be able to get that thing in place with all that stuff to play with. 

Now to fix the plumbing and get the pool back in service so I can work on the second stage.

Well, it wasn't as easy as I made it sound. There simply wasn't enough room between the existing fittings to just put in a pipe with a couple of couplers on each end. 


The arrow shows one spot that might have worked, but it was covered in glue and the surface was pitted pretty bad. I decided to replace the entire piece from the motor to the union up on top. That didn't seem too bad, but I would have to order the Hayward motor union part. It seems that Hayward is true to form in that they make everything custom to them. The motor coupler on the Hayward is different from a union that you can buy at Home Depot; it's different from a Pentair. It doesn't match anything one would expect it to. No, it has to be made special. 

The price of the real Hayward replacement was over three times an aftermarket equivalent. So I got the less expensive (cheap!) one, and after waiting a day (Amazon Prime) for the part and then getting some common fittings, I went to work. 

I had to replace the top union and all the fittings down to and including the special Hayward motor connection. So I spent a couple of hours lining things up and glueing them together. It really wasn't a huge amount of work; most of it was measuring pipe and cutting it. I got it all back together and gave the entire assembly an extra half hour before testing it for leaks. I turned on the motor in low speed and got it all primed up and working; everything looked fine. So I kicked it to high speed.

And it blew up.

The aftermarket (cheap) Hayward replacement fitting literally blew apart. Water shot up in a 2" fountain and soaked me and everything around me. In a real rush, I shut off the motor and looked at the damage. This is the part that failed:


No, the pipe didn't leak at the joint, nor did the union leak, The cener part actually blew out of the collar that holds the pipe to the motor and seals the connection. These things are two pieces, a female pipe connection with a flange that the collar pulls tight to a rubber washer on the motor fitting.



The centerpiece that connects to the pipe from the motor literally blew right through the collar and allowed that 2" stream of water to shoot right up in the air. Over time, I did a post-mortem on it. There were two factors that led to the failure. First, there was almost a 1.5 mm gap between the top of the collar and the pipe, where the original Hayward had less than a millimeter. Second, the plastic was softer and a tiny bit pliant instead of hard as a rock like the Hayward original. This is called 'durometer' if you want to look it up.


It's really hard to see in the picture because of the color and wear marks, but feeling the gap and the softer plastic, the problem became obvious. So, when the pressure increased, the plastic flexed a bit, and the larger opening allowed the entire female part of the fitting to shoot right through the hole in the collar. Sigh... Now, what to do about it? Well, the obvious choice was to just get a real Hayward fitting and bite the bullet. 

This time I decided to put a union in the middle of my vertical run so I could dismantle the plumbing a little better and not have so many fittings to buy if something else happened. It was a good idea in theory. When I repeated the same test of running it on low, then switching to high, the Hayward fitting (real one this time) held up and didn't leak. I thought I was home free until I noticed a leak at the top of the new union. Glued fittings don't leave any room for error; you can't take them apart and fix them, but I was sick of messing with this. So, out came the J B Weld Water Weld.


If you've never used this stuff, it's great for this kind of thing. It can set up underwater and is actually sticky enough to hold things in place. I use it a lot because plastic fittings in the sun deteriorate over time and sometimes leak. This stuff can fix that. I let the pool run on high speed for a few hours to prove it would hold together.

So, the temporary plumbing repair was done. I could test it a bit more to get comfortable and then start on the new concrete slab for the equipment. Since I wasn't totally confident that everything was perfect and wanted to hedge my bet a bit, I turned off the pool automation and left everything for the next morning when the area would be in the shade. 

The next morning, I went out near the equipment and turned on the pool motor... nothing. Walked over to the equipment, and the motor was not running at all. I checked the power; it was on. So, I tried it again and got that tell-tale buzz from the motor before it shut off. The most likely culprit was the capacitor. Off I went to get more tools for the pile by the gate, took the cap off, and checked it with a multimeter. That thing was a pure open circuit; something inside had actually broken. 

Of course none of the local stores had one in stock, but Amazon Prime came through the next day before sundown, and I got it installed and tested. Although I had to wear gloves because by the time the part arrived, the area had been in the sun for a couple of hours. 

Finally, I was done with this simple, easy repair job ... at least the easy part.

Wednesday, June 17, 2026

Chasing a Moving Target.

One thing I didn't have a problem with when I first got into home monitoring and control was the software changing underneath me. I fully realize that software changes over time and that we need to adapt if we want to keep up with the industry, but MONTHLY? REALLY??

Home Assistant has a monthly release schedule, and many of their releases cause changes in the various add-ons and integrations. Dashboards you spent a week getting "just right" change. New features don't work the way you expected. Plus, each of those custom items (especially cards) has its own updates that change the way they work. It makes one (me especially) reluctant to update anything once we get it working. But, for me, the real annoyance is changes to our toolset to create new things.

Espressif (the folks that created the ESP32 series) is especially harrowing to people like me that build their own stuff to control and monitor things. Their libraries change often, and code we compiled and worked with yesterday fails to compile when we update to get the latest new capability or bug fix. I had that happen too often. Then, you have to hunt for the release documentation and hope you find a clue to fixing the source that worked yesterday.

Between the tools and underlying system changing as we work on things and then waiting for bugs to be fixed, it's hard not to just stick with whatever works right now and simply ignore any changes because there's usually some teeth-grinding involved in using the 'latest' of anything. I've seen users complain that a lot more emphasis should be put on making things work than on piling feature on top of feature that most of us won't even use. 

Such was the case with my little Xiao ESP32C6 Zigbee temperature and contact sensor that was actively measuring the air temperature and watching the septic float. I installed a new release of ESPHome, and suddenly my cool little CYDs wouldn't work. Seems they changed some names of things I used. 

This was a royal pain chasing down which things changed to what. I just gave up and turned the task over to an AI. It prowled through my code, looked at the new errors, and gave me the new names I needed to put it. That trick saved me a ton of time prowling through forums loaded with ads and chasing my tail to get what I needed.

Remember this trick when you run into the same problem.

However, I still hold with not letting it write code for me. Especially when you have something that involves a lot of details. What happens to me is that I tell it what I want to do, and it does well until we're chasing a bug; then the conversation gets so long that the AI starts to confuse what worked and what didn't. It seems to get trapped in a loop where it simply confuses itself and can't recover. 

I'm all for using whatever help I can get putting something together, and would proudly use AI to overcome syntax errors I just can't see or get a new way to shift some bits around to meet some obscure spec, but be really careful doing it. In a couple of instances it told me to remove files that were causing problems. DON'T do that. 

If you do want to see just how well it does with code, be sure to back up everything in sight just to be sure it doesn't convince you that this is the best way to go and you delete a week's work.

And, as some of you probably noticed, I'm anthropomorphizing it already. Currently, I consider it a quirky research assistant of indeterminate sex. It's a co-worker that makes mistakes and gets lost in detail but is great at gathering information from obscure sites and putting it in words that I can understand. I can see a real danger though.

It's really good at finding things and telling me where to look for answers; how will that threaten future workers that aggregate data and present it in things like newsletters of new ideas and processes? Will we need humans to organize ideas and specifications for use? There are a huge number of people out there that are preaching the future of AI, and the Terminator movies didn't help us base our fears, real or imagined, on reality. People are already claiming it helps them with the stock market.

That kind of thing is for people that are far better than I at predicting the future of a new technology; I just want to use it as it applies to me. It saved me lots of time making the changes I inherited from the ESPHome codebase "update."
 

Sunday, May 17, 2026

Controlling an Air Handler with Home Assistant.

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.



I've learned that actually mounting things keeps the wires from one piece to another safer. I got really tired of hooking things back up and trying to keep track of pieces when prototyping. Now, all I had to do was wire up the relays, and using the EspBuilder code I had created, test this thing until I was comfortable that it might do the job.

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.

Yes, duct tape

I just drilled a hole in the top of the Air Handler cabinet and stuck the device on top. It lived there for over a week taped down and actually doing its new job while I converted that AC unit over. I changed the device assignments in Home Assistant and disconnected the old DIY thermostat completely. Here's my previous thermostat that actually did everything resting in it's new retirement area:


That long USB cable was part of the actual installation. I would pull that out and plug it into my laptop to make code changes, then put it back inside the wall for next time. Notice the Arduino stack upper left? The model A Arduino, then the next layer is the ethernet board, then double stacked to allow for the ethernet plug to a board that held a buck converter to convert 24vac from the Air Handler to 5vdc for everything, and all the wires for the display, control buttons, and even the temperature sensor. 

Ah, the good old days ...

Of course there was wiring that had to be done inside the Air Handler. Have you ever looked inside one of those? They're a nicely laid out area where the factory put things together, then the place I needed to get to to connect my controls. On simple AC units, without fancy variable speed motors, semi intelligent control systems and such that we're starting to see, it's pretty basic. There are three controls, the fan, compressor and reversing switch. The reversing switch is what switches from heating to cooling by controlling which expansion valve is active, the one inside, or the one outside. Air conditioning is really simple until you get into the refrigerant handling. This is the wire bundle that leads out to the compressor beside the house:


The compressor and reversing wires are in there somewhere, "refer to schematic." Yeah, right, the schematic was wrapped around one of the covers and hard to follow, so I took pictures of each part, 




and then used paint.net to combine them, adding notes after I pondered each line to try and get the right ones hooked in:


My note boxes and complete schematic are now immortalized on Google Photos forever. When I get back into this thing in a year or two, at least I have some idea what I did last time. However, the actual Air Handler doesn't look anything like that. 


And, under the cover where the schematic wrapped around are the actual places that I need to hook to.



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.


This worked really well, here's the test print I did to try it out



I was really proud of how well this worked. I printed up a lid for it that is just an inverted "C" that friction fits to hold it on since I wanted to get in there if something happened during extended testing and went live with it. 

It worked. 

Look, no more duct tape!

The "warm red glow" is the little lights on the relay board. Basically, I was done, so I just duplicated everything for the other AC unit on the north side of the house after this one proved itself for a week.

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.

Wednesday, May 6, 2026

A Real Use for the Cheap Yellow Display

 So. a friend told me about the CYD (Cheap Yellow Display). Basically a nice little color display that has a processor on the same board with some inputs and an ESP32 complete with wifi. At first, I kind of shrugged because ... well wifi. For me, in a rural area prone to power outages, wifi has been pretty much a pain in the bottom. Internet in general has sucked over the years because a WAN connection had to be by wire. Dial up, DSL and such were the rule because that was all that was available. 

But, over time, that changed. The power company FINALLY decided to actually supply (mostly) reliable power. Then the various internet providers started showing up. Wifi mesh networking systems became cheap enough to actually use in the home. We caught up (almost) with the 21st century. 

Heck, I think I'll get one of these things and see how they work.Wow! these little things are really great!!


Notice I got the 4 inch model? I wanted something I could actually see and interact with. It has a resistive touch screen, and a nice color display. 


Since I didn't want to scratch up the screen playing with it, I immediately made a faceplate for it and noticed a small annoyance: the screen is off center.


Notice how the left side is wider than the right? No, that isn't because I printed the faceplate that way, it really is off center to allow for the wifi antenna that the processor has.


Never mind, that's good enough to begin; I can adjust for that when I have something real developed. For now, let's play with this thing.....

Since this was my very first ESP32 journey into code, I loaded up the latest Arduino IDE, an installed the esp32 board support and tried it. I got "blink" to work, then advanced to "Hello World;" they both worked, but it was painful. The native code was full of various calls that I really didn't understand and just seemed way to complex for something that would have to maintain for years and years. 

I looked around, even sent an AI out to find a way to simplify developing something for this board that actually did something. My answer was right there in Home Assistant, ESPHome Device Builder. They tout it as "No Code," and to some people it might be, but not for anything that I want to actually do something; more on that later.

I created my first ESPBuilder device, "Hello World," and I was impressed. I mean really impressed. I managed to get a string on the display, in any color I wanted, and actually be able to read it without squinting. I spent some time playing with the backlight, fonts, various items from home assistant like drop down menus and circular gauges. It was totally fun watching things come up on the CYD that had been limited to laptops and phone in the past. 

What to do with this? MY THERMOSTATS !!

For a decade I had used the "Super Thermostat" <link> that I created many years back. Now was a good time to replace them with new hardware. They were already ethernet devices, and a wifi device like the CYD would be a good experiment to try out. Plus, I could put that dusty 3D printer to work for a custom enclosure. 

This was a bittersweet decision. I created those thermostats back in the medieval times of home automation, and they were quite a project. At first they were wifi, but wifi didn't work too well with the Arduino platform in those days, so I switched them to wired which was a lot of work. Then, I modified them to use remote temperature sensors <link> so I could sense the temperature right where the people were; that was also a big project because they were battery powered end devices on a Digi XBee network. Plus, there was a lot of custom changes to the combination of devices over the years that I would have to reproduce under the new digital environment. Did I really want to take this on???

This is what one looks like finished, running, and controlling the AC unit on the south side of the house.


Yes, it's green. There were two main reasons I used green filament to print it. 1, I already had a spool of green filament, and 2, the wall behind it was green. No, it was not to draw attention to them so people would ask about them; nope, not at all. The two patches cover up the holes from previous thermostat work that I absolutely will cover up and paint ... someday. 

It all works, The code has provisions for my power company "Peak Demand Period;" where the price of power goes through the roof. It's animated; the little fan is black and stationary for idle, red and turning for heating, and blue and turning for cooling. It even has drop down (or in this case up) menus for selections. 


If you use your imagination, you can see the fan spinning

I can change the mode with the simple press of a fingernail or a pen on the screen (remember, it's a RESISTIVE touch screen). Same thing with the fan. The temperature is displayed as both a circular gauge and numbers in fahrenheit. The temperature setting is controlled by both a slider and two buttons.Yes, I was showing off a bit, but I couldn't control myself. 

"But, wait, how did this thing control the air handler? It doesn't have any wires going into it?," you say. Well, I cheated. The old real thermostat was still running, catching commands from Home Assistant and feeding them through the wires to the air handler. Basically, this was just a fancy display that had bells and whistles that actually worked to send commands to Home Assistant which sent them on to the old thermostat that fed the wires. The idea was to stage my conversion to new hardware one bit at a time. First the CYD because it was cool and pretty, then something to replace the old thermostat that would actually control the air handler, then a remote temperature sensor that I could place appropriately. 

Yes, this was going to turn into a huge job with parts all over the house, but any one of the pieces could be updated independently as desired. There's buzz words for this like, "distributed processing", "isolated failure tolerance," or maybe "extendable architecture," but what it really was was staging the changes while I kept the AC working. That thing is my heating and cooling, and in my unpredictable climate ---necessary. So, While this screen looks like a thermostat, it's actually just the face of a much larger system—the real work happens in the old thermostat that is ancient. For now,but that is going to change.

Power comes in the back through a USB C connector hooked to a wall wart on the opposite side of the wall. That way there are no wires visible and only a small round hole in the actual wall. Why? Well, I had a lot of trouble with heat generated by various devices when I tried taking the 24vac down to 5vdc. Those little converters are cool, but run hot and that's not a good idea over time. I thought of this going into the project, and the device is upside down compared to other projects. 

The lid is actually the mounting point of the new thermostat and is held on by screws into wall anchors, then the CYD is mounted to the case with a hole in the bottom for the display and a friction fit to the wall mounted lid. The USB C cord comes through the lid, like this:


So, if I want to work on it, I just pull it off the wall, unplug the USB C connector, and walk off with it. Slick, and I wish I had thought of that technique much sooner. It makes taking pictures of the other half easy, like this:


See how I used a commonly available right angle adapter for the USB C connector? I try to keep projects as cheap and easy to find parts for as possible. Also, notice the dead space to the right? That's because the CYD display is off center as I mentioned earlier. It makes for a larger thermostat device, but it would drive me nuts over time looking at a screen that was off center every time I walked down the hall.

Which reminds me, How does this control the actual AC units? Well, ESPhome and Home Assistant thought of that for me. Each operation like changing mode: heat, cool, off, are handled by Home assistant. The thermostat is a "device", with "entities" that can be put in a dashboard. That way, I have menus on the laptop and cell phone as well as the thermostats on the wall. I basically stole the controls I already had for the old thermostat that was routed from old code and hooked this to that. This mess of stuff made for a cool display on Home Assistant:


If you've read any of the other posts on this blog, you already know I'm a sucker for graphs. They tell me at a glance if something is wrong, and I get a feel for the behavior of the various things around the house easily. I will eventually make that menu simpler for 'normal' people to use, but for now, it's my baby, I'll show it the way I want to.

So, after building two of them and working out how to share the common code between them, I had two new thermostat devices. That was really great for a few days, but then I thought to myself, "Self, why don't you move all that logic over to another device that is right on the AC air handler? That way you can get rid of the requirement of hooking into a wire that runs through the wall to control the AC. I could put all the control logic in there, and when necessary, adapt it to a different air handler. Plus I could do things at the air handler that are not as easy with a wired system. I could measure the air flow, temperature of the incoming air vs the outgoing air, maybe use the lower speed of the fan ,,,

I'll write about that project in the future, it was a bit harder, but fun.

Wednesday, April 15, 2026

My First 'Real' Zigbee Sensor

I've made a lot of sensor devices that reported using Digi XBees. The little RF devices work quite well and set up a self healing mesh network that really does what is needed. These came before Zigbee and the devices we see now for home automation. It was the beginning of the Internet of Things (IOT), but it wasn't actually on the internet. Most of this blog is about developing these devices to serve some purpose: reporting data about or controlling something around the house. Bringing industrial controls home for a common person. 

Zigbee devices started appearing, using the same techniques I was familiar with but with a documented protocol that could make different manufacturers devices work together. However, the first implementations were crippled by the manufacturers such that anyone buying them would be stuck using a single manufacturer's equipment. Much like pool controllers that are locked into a particular manufacturer. The Iris devices promoted and sold by Lowe's were such devices. Myself and others broke into the protocols of the Iris devices and built our own controllers eliminating being locked down like that. 

That philosophy, thankfully, died in favor of a huge number of real Zigbee devices. Zigbee 2 MQTT was the crowning touch to this; it allowed any manufacturer's offering to connect and translated the protocol into MQTT topics that anyone could use to control their own house.

But, you can look up the history of IOT if you want to know more, this is about creating my first device that used the Zigbee protocol. In my last post I described how I implemented a swimming pool controller using commercially available Zigbee devices, but left something out: measuring the air temperature at the pool controller, and a contact sensor for a float in my septic tank on the same side of the house.

The ESP32C6 had been announced that supported native Zigbee and Matter. Then Seeed Studio announced a tiny Xiao device that packaged the C6 as a component similar in size to a Digi XBee. This little thing was exactly what was needed for me to get my feet wet creating a sensor to measure temperature and check the status of that float. So, I ordered one (actually a couple).

Taken right from their web site

This thing is a little bit bigger than my thumbnail.

It comes in a cool container


Yes, it's that tiny, and subsequently a bit hard to deal with, so I ordered the expansion board to play with it. 

Taken right from their web site

This was big enough to handle and work with. It has plugs for adding sensors and powering them as well as that cute little display for debugging or showing off. Plus, there were instructions on using the latest Arduino IDE to develop software for it. I'm very familiar with the Arduino IDE since I've been using it as long as it has existed. That was a real plus in my mind. 

I downloaded the IDE, installed the board specific software, and wrote my first program for the C6, "blink". Then I expanded to "Hello World,"  I was ready to dig into bringing up a Zigbee device, and then later, conquer the world.

The first thing I noted playing with the Zigbee examples supplied by the developers was that they were designed to connect a C6 controller to a C6 device. I wanted to connect a C6 device to Zigmee2mqtt and Home assistant; how does one go about that? I had to poke at it quite a bit to get my device to join, and it was really frustrating. There was a whole world of considerations that I didn't have in my development work under the Digi XBee model. At this point, I need to tell you about a way to cheat. You know how frustrating it is to look for an example of something like getting that little display on the expansion board to work, and even make it behave like a terminal and scroll information? It's really hard to search for it because you get 1.6 million hits, many of them on forums, and a huge number of youtube videos some of which are related, others that are not. Plus the usual totally unrelated hits that just drive you nuts. The answer to that for me is to use AI to search for me.

Let AI do the searching dealing with the ads, pop-ups, videos in the corner of the screen and give you back something that might actually help. I used it extensively to summarize discussions to a few real findings and translate the jargon into something I could understand. DO NOT let it write code for you. That would be great, but it puts in stuff you didn't ask for and inserts more errors than it solves, but for gathering information, it's a gem. Especially in today's ad-ridden internet.

I got the device to join with Z2M and then ran into problems with the data it was providing to Home Assistant. That led me to what's called a 'converter.' This is a piece of yaml code that describes the Zigbee clusters and what to do with the data. The documentation on these pieces of 'code' is odd and I had to prowl through it a lot to get some idea of what was going on. Also, Z2M had changed the way the converters worked and should be written, and the 'helpful' sites on the web were mostly too old, or just flat wrong. AI to the rescue, sort of. AI had the same problem I did, separating the junk from the real information. It kept suggesting things that just wouldn't work, and were a mix of the old and the new. However, it was pretty good at finding problems with the exceptionally weird combination of syntax, keywords, and indentation that plague yaml. Yaml was supposed to provide a way of creating code from a description without having to learn to code. Instead, you have to learn how to make a very elaborate description that is properly organized using specific keywords, indented to the way some programmer thought it should be. Basically, it is part of the future that one has to adapt to in order to get anything new done in the IOT field. Also, it sucks.

Net though, I got a device working. It measures the temperature using an 18B20 and looks for a contact closure. Two endpoints that show up just great in Z2M (Zigbee2mqtt) under Home assistant. And then later in any dashboard or card that I want to use. I didn't find anything that could do this particular combination anywhere on the internet. Heck, there's only a few contact sensors out there at all. Here it is as it looked while I was working on it.


The 18B20 is plugged in to one of the expansion board ports; I used the chip version at first and then changed to the waterproof version when I installed it outside. This is a picture of it installed and actually working in the same enclosure that I used for the other pool devices.



It has been VERY reliable in  the months that it has been running. I used the Seeed 'case' for the expansion board to protect it a bit. Of course, I broke the first one I used; the little crack repaired with super glue is visible in the photo. Here's a close up:


Sigh, one has to be careful with those tiny plastic parts. Hey, superglue is great stuff, might as well use it. Speaking of glue, that "Alien Tape" that used to be advertised all over the place is actually great stuff. I use it all over the place, but one has to be careful because sometime it lets loose. I used it to mount the board, and it has held up really well so far. The other stuff is that 3M double sided 'tape'; you use that to mount something and then let it set overnight, and it is there forever. Shortcuts for the various projects we develop.

If anyone is interested in the actual code for this, it will be available on github when I finally overcome my reluctance to relearn how to use it.