Control over my Airconditioning/Heatpump
2025-08-03 11:07:47
It started with our Mitsubishi heatpump. Someone on the internet had found a way to control it via Home Assistant. Sadly, this heatpump broke down in April... In July (yes, 10 weeks later!) we got a new one. A Panasonic this time.
A side-note, I recently started working at the New Zealand Meteorological Service (MetService)... So the title is a double joke...
Articles » 😶🌫️ Controlling the weather 🌦️
Controlling a heatpump
Control over most heatpumps isn't that hard. You go and ask for a wifi module to be installed, create an account with the "cloud service" of whoever makes the heatpump, and away you go!
One little problem here, is of course, the cloud service of the manufacturer. Yet Another Cloud Account. Yet Another Spy. And I don't like that one bit. No sirey, I don't like it at all.
Let's get to work
I was actually halfway writing a Raspberry Pi plus MQTT compatible version of the Python integration for a Mitsubishi Split Unit, when our heatpump broke, so I ehm... gave up. You can find my half-finished work on codeberg.
Let's try again
Our new heatpump, aside from having the capacity to heat up our lounge, which is nice during winter (did I mention we were out of proper heating for 10 weeks already? If not, well, it was cold!), is a Panasonic. And lo and behold, one of my favourite maker groups has a way to build a Home Assistant supporting integration.
Without a NZ$200 wifi module, but with about NZ$25 of parts from Ali Express and a PCB print you can get for free (I'll upload it here as well later), you can have your Home Assistant integration done!
Constructing a Wifi module
The following instructions are adapted from Ingenious Makers. Some parts can be skipped for certain models, and I've only written/updated for my model here.
Parts list
| PCB | 1 | N/A, Upload soon | X |
| Resistor - 10k | 4 | R10K | R1,R2,R3,R4 |
| Mosfet | 2 | 2N7000 TO92 Small Signal MOSFET 200 mAmps, 60 Volts |
T1,T2 |
| Diode | 1 | 1N4001 | D1 |
| Capacitor | 1 | 470µF / 10V or 16V | C1 |
| ESP32-C3 Super Mini | 1 | ESP32-C3 Super Mini development board with header pins | X2 |
| 5-pin cable | 1 | 5 pin PAP-05V-S | JP1 |
It is, from looking at the PCB, pretty obvious where everything should go.
Putting it together
To put everything together, you'll need a pretty fine-tipped soldering iron. And I also suggest to have a steady hand, and if possible, a "third hand" with a magnifying glass.
DO NOT BREATH IN THE SOLDERING SMOKE, IT IS NOT HEALTHY FOR YOU!
The easiest order of soldering everything:
- Solder the headers on your ESP32 board
- Tip: position the header pins in the PCB, then place the ESP32 on top. Don't solder them to the PCB (yet), but it helps getting them nice and cleanly poking through the holes.
- Solder the 10k resistors in place. Do not solder anything in the 4k7 slot!
- Solder the mosfets in place, the correct way round, with the middle pin sticking "out"
- Solder the diode in place (note the orientation!)
- Position the ESP32
- Now, attempt to connect a USB cable to the ESP32. You'll notice that it won't fit if you also solder the capacitor in place flush with the board
- Position the capacitor and ESP32 board loosely, so that you can still connect the cable.
- Take a photo of your positioning
- Solder the capacitor in its place, according to the photo you just took
- Solder the ESP32 in place, or solder a row of header-connectors in place so you can plug it in and pull it out easily (In case of the latter, ignore the positioning malarky above)
- WASH YOUR BOARD!
- Seriously, make sure there are no remnants of flux etc. on the board. Flux is not funny stuff.
Yay! Your chip board is done! It's time to give it a quick run through, before the final step of soldering.
Configuring the ESP32
You can use either the ESPHome web interface, or a self-hosted interface.
Create your YAML for ESPHome. Here's mine:
yaml:
substitutions:
devicename: esp32-airco-01
long_devicename: Panasonic Climate Lounge
pcb_version: "P11-PTH-C3 250214"
esphome:
name: "${devicename}"
name_add_mac_suffix: false
comment: "${long_devicename} ${pcb_version}"
esp32:
board: esp32-c3-devkitm-1
framework:
type: esp-idf
variant: ESP32C3
external_components:
source: "github://DomiStyle/esphome-panasonic-ac"
components:
- panasonic_ac
wifi:
ssid: !secret esphome_wifi_ssid
password: !secret esphome_wifi_password
ap:
ssid: "${devicename} Hotspot"
password: !secret esphome_ap_password
captive_portal:
web_server:
port: 80
logger:
level: DEBUG
# Enable Home Assistant API
api:
encryption:
key: "your_encryption_key_here"
ota:
- platform: esphome
password: !secret ota_password
bluetooth_proxy:
uart:
tx_pin: GPIO21
rx_pin: GPIO20
id: ac_uart
baud_rate: 9600
parity: EVEN
switch:
- platform: restart
name: "$long_devicename Restart"
climate:
- platform: panasonic_ac
id: lounge
type: cnt
name: "$long_devicename"
vertical_swing_select:
name: "$long_devicename Vertical Swing Mode"
outside_temperature:
name: "$long_devicename Outside Temperature"
current_power_consumption:
id: power_consumption_lounge
name: "$long_devicename Power Consumption"
unit_of_measurement: W
accuracy_decimals: 0
device_class: power
state_class: measurement
sensor:
- platform: total_daily_energy
name: "$long_devicename Total Daily Energy"
power_id: power_consumption_lounge
filters:
- multiply: 0.001
unit_of_measurement: kWh
device_class: energy
time:
- platform: homeassistant
timezone: "Pacific/Auckland"
id: my_time
Uploading the firmware
My procedure of loading an ESP32 is via building through a self-hosted web version of ESPHome, downloading the factory binary file, and uploading it via the CLI
bash:
esptool write_flash 0 esp32-airco-01.factory.bin
I prefer using the CLI over the web interface, as the web interface has been quite flaky for me from time to time.
Once the flashing of the ESP32 is done, give it a test-run. Connect it to power, and see if you can get the logs via the web interface, and if you can find it in Home Assistant. Give it at least a few minutes to power up.
Final wiring
Finally, solder the wiring to connect the whole chip to the heatpump. I prefer to do this last, because when the wires are connected, the chip has a bit of a wobbly stand, so it is easier to do the pre-connection tests without the wires.
To connect the wires, grab your PAP cable. Put the clip facing downward, and the not-wires-sticking-out part of the clip facing you.
The cables to solder on to the JP1 points 1, 2, 3, and 5 are from left to right
Wire up as follows:
| 1 | JP1 - 1 (+5V) |
| 2 | JP1 - 2 (Rx) |
| 3 | JP1 - 3 (Tx) |
| 4 | SKIP |
| 5 | JP1 - 5 (GND) |
In the photo above, you can see it a bit. Note that the clip is facing upward in my photo, due to the twisting of the cables. For the colours in the photo, the order is:
Black - Red - White - Orange - Dark Orange
The Orange (second to last) is snipped short.
Plugging it in
DISCONNECT AND FULLY POWER OFF YOUR HEATPUMP/AC
Plugging in this construction is pretty straight forward. Open the front flap of your heatpump. You'll notice on the right side a manual Start/Stop button (that's your emergency control button), and a cover that is held in place by a Philips Head screw at the bottom right of the cover.
Unscrew the cover, and you should see the connector in which you can plug your device. Be careful plugging it in, the pins bend quite easily. Don't use any force!
Carefully position your board in the space next to the access point. Be careful, you'll probably see the mains power lines. Don't touch those, and ensure your board is well clear of them!
Close the cover, screw it back in place, close the front main cover, and you're done. Restore power to your heatpump and listen out for any issues.
If all goes to plan, the heatpump should power up, and with that, provide power to your device. After a few minutes, your device should start showing in ESPHome to read out the logs wirelessly, and in Home Assistant!
Congratulations! You're done!
Location
Wellington
New Zealand
Phone
+64 (0) 21 20 80 443
.png)


