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
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
Tools and materials for the video:
- NodeMCU development board - https://s.click.aliexpress.com/e/_c3hdOWbL
- ESP32 WROOM Development Board - https://s.click.aliexpress.com/e/_c311zVzF
- ESP01 Module - https://s.click.aliexpress.com/e/_c2zmsybb
- ESP01 Programmer - https://s.click.aliexpress.com/e/_c4W6vJ2N
- IR Transmitter Diode - https://s.click.aliexpress.com/e/_c32uCb65
- IR Receiver - https://s.click.aliexpress.com/e/_c3UJOYYz
- Mini Step Down Module - https://s.click.aliexpress.com/e/_c4KTYGZf
- Mini Breadboards - https://s.click.aliexpress.com/e/_c3VHvUAh
- Mini PC for Home Assistant - https://s.click.aliexpress.com/e/_c3LG4oZP
- Bench Power Supply - https://s.click.aliexpress.com/e/_c4FHcrVF
- Digital Multimeter - https://s.click.aliexpress.com/e/_c3cgi9LR
- Soldering Station - https://s.click.aliexpress.com/e/_c3Q9ssy5
Assemble the Circuit
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
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
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
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
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!