My air conditioner's built-in Wi-Fi suddenly stopped working one day, leaving me unable to control it from my phone or through my Home Assistant system. I have a GREE air conditioner that's about seven years old, and it came with its own Wi-Fi module. After what felt like a random update, the module just went offline for good. I tried resetting everything I could think of, the module, the AC unit itself, and my Wi-Fi settings but nothing brought it back online. The device was completely unresponsive in the official app, and I was stuck using the physical remote.
I really wanted that smart control back, so I started looking for a workaround. I realized I didn't actually need the original Wi-Fi module to function. Instead, I could build a small, separate device that could talk to the air conditioner directly using infrared light, which is the same technology your standard TV remote uses. This new device would act as a bridge, taking commands from my Home Assistant and sending them to the AC via an infrared signal, completely bypassing the broken Wi-Fi.
This approach meant I wouldn't have to buy a replacement part from the manufacturer or try to repair the internal electronics of the AC itself. The project turned into a fun challenge of finding the right components and figuring out how to make them all work together.
Finding a Solution with Infrared
My first thought was to use the air conditioner's original remote as a key to unlocking its control. I knew the remote used infrared, so I started by using a small microcontroller called a NodeMCU that I had lying around. I connected a tiny infrared receiver to it, which is the same kind of part you'd find inside any electronic device that gets commands from a remote. I loaded up a simple program that would show me the specific code being sent every time I pressed a button. This worked perfectly for a simple remote I tested, where the same button always sent the same code.
However, when I pointed my air conditioner's remote at the receiver, things got confusing. The data on my screen was different almost every time I pressed the same button, unlike the consistent codes from a TV remote. I realized my AC's remote was sending more complex, variable signals, which made it nearly impossible to simply record and replay a single code to control the unit. This initial method wasn't going to work, so I needed a smarter approach.
I decided to switch to a system called ESPHome, which works seamlessly with my Home Assistant. I used a different board, an ESP32, and set it up with both an infrared receiver and a transmitter. I hoped this more powerful system could handle the complex codes, but I still couldn't get the AC to respond to the signals I was sending. It was clear that just blindly sending the raw codes I received wasn't the right path, and I needed to dig deeper into how these specific air conditioner protocols work.
The Journey Through Different Prototypes
My journey to get the AC working involved building a few different prototypes to test my ideas. After my first attempt with the simple code reader failed, I moved everything to an ESP32 board running ESPHome. I set it up with both an infrared receiver to listen and an infrared LED to transmit, hoping it would be powerful enough to handle the complex signals from my AC's remote. I programmed a few buttons in my Home Assistant to send the commands I had captured, but the air conditioner simply didn't respond. The codes I was sending just weren't registering correctly.
Thinking the ESP8266 chip in my first board might not be fast enough, I built another nearly identical version using the more powerful ESP32. I was sure this would solve the problem, but I ended up with the same frustrating result. The device was receiving and sending data, but the AC unit acted as if it couldn't hear anything. This told me the issue wasn't the processor speed, but something more fundamental about how I was formatting or sending the infrared commands for this specific brand of air conditioner.
It was through this process of trial and error that I realized I was going about it the wrong way. I didn't need to capture and replay raw codes. I started searching through the ESPHome documentation more carefully, and that's when I discovered a dedicated component made specifically for controlling climate devices like air conditioners. This was the turning point that moved me from failed prototypes to a working solution.
ESPHome IR Climate Component
After my prototypes failed, I found the solution in a special part of ESPHome called the IR climate component. This wasn't just a simple infrared sender, but an entire smart component built to speak the specific language that many air conditioner brands understand. Instead of trying to copy and send messy raw codes, I just told this component what I my device was and it handled all the complicated work of translating that into the correct infrared signal.
I set up this climate component in my ESPHome code and told it my AC was a GREE model. The most important step was finding the right protocol, which is like the specific dialect my AC uses. The documentation listed many options, so I had to find the right one through trial and error. I started with a generic setting and tested each one until my AC finally turned on. For my unit, the correct protocol was called YK1FB9.
Once I had the right protocol selected, everything just worked. I connected the component to the same infrared LED on my ESP32 and linked it to a temperature sensor in my living room. Now, through my Home Assistant dashboard, I can turn the AC on or off, set the mode, and change the temperature. The component sends all the right commands, and my air conditioner listens perfectly, finally giving me back the smart control I wanted.
The final configuration YAML code for the device is available below.
remote_transmitter:
pin: GPIO3
carrier_duty_percent: 50%
sensor:
- platform: homeassistant
name: "Current temperature"
# substitute this with your own sensor in the same area
entity_id: sensor.t_h_monitor_temperature
id: current_room_temperature
internal: true
climate:
- platform: gree
name: "GREE AC"
sensor: current_room_temperature
model: yac1fb9
Building the Final, Minimalist Device
With a working setup on the ESP32, I realized that board was overkill for what I needed. It had more power and pins than necessary, so I decided to build a final, minimalist version. I had a few tiny ESP-01 modules in my parts bin, which are very basic versions of the ESP8266 chip. They are incredibly small and perfect for a simple job like sending an infrared signal, so I chose to use one for this project.
To program the ESP-01, I used a simple USB adapter. You have to connect a pin to ground to put it into programming mode, so I even added a little switch to make that easier. One important thing about these small modules is that they need a very steady 3.3 volts of power. I didn't have a 3.3-volt power adapter, but I had plenty of 5 volt ones. I solved this by using a tiny DC-to-DC converter that takes the 5 volts from the power brick and steps it down to a perfect 3.3 volts for the ESP-01.
I soldered the ESP-01 module and the voltage converter onto a small piece of perfboard to keep everything neat. Then, I connected an infrared LED emitter to one of the available pins on the ESP-01. The code for this final device was almost the same as before. I just told ESPHome I was using an ESP-01 and specified that the infrared LED was connected to a different pin. With that, the hardware for my tiny, dedicated AC controller was ready.
Creating a Neat Enclosure
I wanted the final device to look tidy in my living room, not like a mess of wires on a shelf, so I designed a simple case for it. I used a 3D modeling program to create a small box that would fit all the electronics snugly inside. The design included a precise 5-millimeter hole on one side for the infrared LED to poke through, ensuring it had a clear line of sight to the AC across the room.
I 3D printed the box and tried to assemble everything. The first version was a bit too tight, especially the lid. The wires for the LED had some spring to them, which made the lid hard to close properly. It fit, but it wasn't as clean as I wanted it to be. So, I went back to the design and adjusted the tolerances, making the lid just a little bit larger to accommodate the wires without any force.
I printed the new lid, and this time it fit perfectly. The box now closes smoothly and holds everything securely in place. The infrared LED sits firmly in its hole, pointing straight out, and the power cable exits neatly from a dedicated opening on the back. The final device looks compact and intentional, something I don't mind having visible in the corner of the room.
You can get the 3D model for the case from here.
Installation and Final Results
To install the device, I found a perfect spot on a shelf in the corner of my living room. This location is directly across from the air conditioner, giving the infrared LED a clear view to send signals. I used a standard 5-volt power brick that I had spare, soldered the wires to my board, and made sure all the connections were well insulated. I plugged it in and tucked the power adapter behind a piece of furniture, so the entire setup is almost completely hidden from view.
Now, the small white box sits discreetly on the shelf. Unless you know it's there, you probably wouldn't even notice it. More importantly, it works perfectly. I can open my Home Assistant app on my phone from anywhere and turn the AC on or off, adjust the temperature, or change the mode. The little device instantly sends the command via infrared, and the AC unit responds just as if I were using its original remote.
With this simple project, I successfully brought my old air conditioner back into my smart home system without having to fix its original Wi-Fi or buy a costly replacement module. It was a satisfying solution that cost very little and used common parts, giving me full control again and proving that sometimes a small, custom-built device is all you need to solve a frustrating problem.
If you enjoyed following along with this project and want to see more ways I fix everyday problems with a bit of DIY electronics, be sure to subscribe to my YouTube channel. I'm always working on new ideas, and I'd love to have you along for the next one.
The links below are affiliate links. This means if you click through and make a purchase, I may earn a small commission at no extra cost to you. This is a simple way to support my work and helps me continue creating free content for you. Thanks for your support!
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
