DIY Smart AC Controller: Use ESPHome & Infrared to Replace a Broken Wi-Fi Module

by taste_the_code in Circuits > Remote Control

70 Views, 0 Favorites, 0 Comments

DIY Smart AC Controller: Use ESPHome & Infrared to Replace a Broken Wi-Fi Module

I Hacked My AC Remote with a $5 Chip (ESPHome IR Blaster Climate Control)

My air conditioner's built-in Wi-Fi module stopped working, leaving me without smart controls.

Instead of replacing it, I built a small and affordable device that uses infrared signals, just like your TV remote, to connect the AC directly to my Home Assistant.

This guide will show you how to build your own using an ESP-01 module.

This guide is made possible with the support from PCBWay!

Supplies

Assemble the Circuit

MVI_2572.MP4.00_00_00_00.Still001.jpg
MVI_2572.MP4.00_00_48_24.Still002.jpg
MVI_2573.MP4.00_00_04_06.Still001.jpg

The circuit for this device is very simple.

I started by soldering the ESP-01 and the voltage converter onto a small piece of perfboard to keep everything tidy.

The most important connection is the infrared LED. I connected the longer leg (the anode) to GPIO3 on the ESP-01 and the shorter leg (the cathode) to a ground pin.

If you are using a 5V power supply, make sure to connect it to the input of your voltage converter and then run the 3.3V output to the ESP-01's power pin to avoid damaging it.

Configure ESPHome

MVI_2570.MP4.00_00_22_22.Still001.jpg
MVI_2570.MP4.00_00_32_16.Still002.jpg

The brain of this project is ESPHome, which integrates seamlessly with Home Assistant.

I created a new device in ESPHome and selected the ESP-01 as my board. The key part of the configuration is the IR climate component.

I used the 'gree' platform and, after some testing, found that the 'yac1fb9' protocol worked for my specific AC model.

You might need to try a few different protocols from the list in the ESPHome documentation to find the one that matches your air conditioner.

The full YAML file I used on my device is available here.

Flash the ESP-01 and Power Up

MVI_2571.MP4.00_00_06_02.Still001.jpg
MVI_2571.MP4.00_00_14_04.Still002.jpg

To upload the ESPHome configuration to the board, you need to put it into programming mode.

Using my USB serial adapter, I connected the GPIO0 pin to ground right before plugging it into my computer.

Once connected, I could flash the firmware directly from the ESPHome dashboard. After the flash is complete, unplug the board and disconnect GPIO0 from ground.

When you plug it in again, it will boot normally and should connect to your Wi-Fi, showing up in Home Assistant.

Build and Install the Enclosure

MVI_2574.MP4.00_00_00_20.Still001.jpg
MVI_2575.MP4.00_00_55_03.Still001.jpg
MVI_2576.MP4.00_00_27_10.Still001.jpg
MVI_2574.MP4.00_00_47_10.Still002.jpg
MVI_2577.MP4.00_00_48_10.Still001.jpg

I designed and 3D printed a simple box to make the device look presentable for my living room.

I made sure to include a small, clean hole for the infrared LED to shine through and another hole for the power cable.

After assembling the electronics inside, I sealed the box.

For installation, I placed the device on a shelf across from my air conditioner, ensuring the IR LED has a direct line of sight.

I used a common 5V USB power adapter to provide electricity, hiding the adapter behind furniture.

The model can be downloaded from here. If you do not own a 3D printer, PCBWay provides services for 3d printing, CNC machining and other manufacturing and can help you with manufacturing the case.

Integrate With Home Assistant and Enjoy

MVI_2582.MP4.00_00_19_18.Still001.jpg
MVI_2583.MP4.00_00_01_15.Still001.jpg
MVI_2580.MP4.00_00_08_27.Still002.jpg

Once the device is online, it automatically appears in Home Assistant as a climate entity.

I can now control my air conditioner's power, mode, fan speed, and temperature all from the Home Assistant interface or with automations.

The device reliably sends the infrared commands, perfectly mimicking the original remote and giving me back the smart control I wanted without any expensive repairs.

I hope this guide helps you bring your own air conditioner back under smart control.

If you run into any questions while building your own, feel free to ask in the comments below. For more DIY projects like this one that blend simple electronics with smart home fixes, be sure to subscribe to my YouTube channel. Happy making!