PCBHub
November 24, 202526 min read 1 views

DIY Smart AC Controller: Use ESPHome & Infrared to Replace a Broken Wi-Fi Module : 5 Steps (with Pictures) - Instructables

pcbhub
pcbhub
Author
DIY Smart AC Controller: Use ESPHome & Infrared to Replace a Broken Wi-Fi Module : 5 Steps (with Pictures) - Instructables

Introduction: 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:

Step 1: Assemble the Circuit

Article visual
Article visual
Article visual

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.

Step 2: Configure ESPHome

Article visual
Article visual

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.

Step 3: Flash the ESP-01 and Power Up

Article visual
Article visual

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.

Step 4: Build and Install the Enclosure

Article visual
Article visual
Article visual
Article visual
Article visual

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.

Step 5: Integrate With Home Assistant and Enjoy

Article visual
Article visual
Article visual

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!

Enjoyed this article?

Support the author by leaving a like.