The RJ12 Jack Under the Lid: Teaching an ESP32 to Talk to Your Heat Pump Water Heater
Photo: Shixart1985, CC BY 2.0, via Wikimedia Commons
When the installer wheeled my new heat pump water heater into the garage and left, he pointed at a small modular jack on the control board and said, 'That's for the power company.' Then he drove away. It took me three months to get curious about it, which is embarrassing, because the port is arguably the most useful connector in my entire house.
The jack is a CTA-2045 port. If you have bought a heat pump water heater in the US in the last handful of years, there is a decent chance yours has one too. It is a standard, it is documented, and nobody is stopping you from using it.
What CTA-2045 actually is
ANSI/CTA-2045 is the consumer-facing name for a demand-response interface that appliance makers and utilities agreed on so that a water heater, a thermostat, or a pool pump could all be told 'ease off for a while' without a proprietary cloud in the middle.
The physical layer is a 6-position, 6-contact modular jack, the same plastic body as an old phone cord but not wired like one. The port supplies a nominal 24-volt class-2 DC feed to a plug-in communications module, plus a single-wire half-duplex data line and a ground. The appliance is the host; the module is the guest that translates utility signals into instructions the appliance understands.
The basic command set is short and boring in the best way: grid emergency, load up, load shed, and a price-stream tier. Modern water heaters also report back setpoint, tank temperature, element state, and lifetime energy, which is where the fun starts.
You do not need a utility to be the module.
Listen first, write later
The single biggest mistake here is treating the port as an input you own on day one. Treat it as a bus you are eavesdropping on.
Grab a cheap logic analyzer, clip onto the data pin and ground, and let it run for an afternoon. On my unit the host polls the port every few seconds whether or not a module is attached, and there is a periodic status frame that carries the tank temperature and setpoint in plain sight once you know the byte offsets. Do not guess from a datasheet alone; capture your own appliance, because manufacturers implement different subsets.
A few practical cautions before you clip anything:
- Do not backfeed the 24-volt rail. Your ESP32 is a 3.3-volt device. If you wire the supply pin to anything, you will have an expensive, smelly lesson.
- Use a series resistor on the data line while you are sniffing, something in the 1k range, so a mistake costs you a resistor instead of a control board.
- Isolate if you can. A small optocoupler or a level-shifting transceiver keeps the appliance's reference and your dev board's reference from arguing.
- Stay out of the refrigerant side and the 240-volt junction box entirely. The port is the one part of this machine that was designed to be touched by third-party electronics.
The $25 bridge
The build is genuinely unglamorous: an ESP32 dev board, an RJ12 breakout, a quarter-watt resistor assortment, an opto or two, a buck converter if you insist on stealing power from the port rail, and a 3D-printed bracket so nothing dangles in a garage. Total spend for me was under thirty dollars, and most of that was shipping.
Firmware choices are your usual suspects. ESPHome is the least work if you just want binary sensors and numbers in Home Assistant. A hand-rolled sketch makes more sense if you are decoding frames yourself and want to log raw bytes to an SD card for a week before you trust your parser.
Start read-only. Prove to yourself that the tank temperature your ESP32 reports matches the number on the appliance display within a degree. Then, and only then, consider writing.
Aligning the tank with the rate schedule
This is the whole point. A heat pump water heater is a thermal battery with a compressor bolted to it, and thermal batteries are the easiest thing in your house to shift.
My utility's peak window runs 4 p.m. to 9 p.m. on weekdays, and the spread between off-peak and on-peak is ugly enough that I stopped watering the lawn over it. The strategy is simple:
- Load up before the peak. Raise the setpoint to roughly 135-140°F starting around 1 p.m., letting the heat pump do the work at a coefficient of performance around three instead of the resistance element at one.
- Shed during the peak. Drop back to 120°F or issue a shed command and let the tank coast. A 50-gallon tank with decent insulation will hold usable hot water for hours.
- Recover after 9 p.m. Resume normal setpoint once the rate drops.
The catch nobody mentions in the brochure: heat pump recovery is slow. A tank that has been coasting for five hours needs two to three hours of compressor time to come back. If three people shower back to back at 6 a.m., you will meet the resistance element, and the element wipes out whatever you saved. Watch household patterns for a couple of weeks before you trust the schedule.
Does it actually save money
Yes, but modestly and honestly. Mine lands between $110 and $190 a year depending on the season, measured with a clamp meter on the circuit and cross-checked against the appliance's own energy counter read through the port. The variables are the rate spread, how much hot water you use, and whether your tank is in a cold garage.
Do not trust a savings estimate that ignores standby loss in winter, and do not trust one that assumes you never touch the resistance element. Log for a month at baseline, change one thing, log another month.
The warranty question
Read your manual's language about the port. Most manufacturers describe it as intended for a utility-supplied communications module and say nothing about your own. Using the port as designed, without opening the appliance, is very different from cutting into the control board, but warranty language is written by lawyers, not engineers. Save your receipts, photograph the install, and keep the ability to unplug your module and restore the stock state in under a minute.
That is the real argument for the port over a spliced-in relay: you can always put it back the way you found it.