tl;dr I hacked two window ACs to run esphome
All of this is mains electrical, so if you don’t know the difference between live and neutral, you’ve got some studying to do before tackling this kind of a job.
I’ve done this to two of my window ACs, but in theory it should be possible to modify any freestanding “dumb” air conditioner. I’m not sure about units with electronics (e.g. a screen or remote) - I’ve only been able to hack apart my cheapest-available units.
This wiring diagram shows how the unit works. It’s entirely electro-mechanical, meaning it’s only two switches and a relay. Paying careful attention to the wire colors, and peek under the cover to identify all the wires. In my case, the supply wires are easy to spot (live, neutral and ground), and the fan low wire is black, fan high is red, and compressor is brown.
I hacked apart a 5v USB power supply, just to include everything inside the AC unit. Wired supply in line with the mains input, and the 5V output is powering a dual relay board.
I’ve wired the dual relay board the same way the internals were designed - if the fan is not powered on, the supply side of the compressor is not live. Basically, output from the fan relay is the common pin for the compressor.
I stuffed the guts (properly isolated, of course) inside the unit, and passed out the 5v, GND, IN1 and IN2 lines out the front of the unit. Put it all back together, and voila:
ESPHome sketch is pretty simple for now. The plan is to integrate a DHT22 so it’ll have a full blown thermostat in the code on the device, and i2c display to show the settings, and maybe a rotary encoder for input. Not sure yet. For now, I’ve integrated a different sensor in the same room.
It’s an ongoing process, just excited to share my progress. Ideally I’ll have a better interface on the device, a sensor (or more), and a 3d printed enclosure that fits in with the machine.