Hi everyone, I wanted to share my recent project with you all—it was both fun and a bit challenging, but the result is something I’m really proud of! I’ve managed to turn my ordinary fan into a smart device, and I’d love to walk you through how I did it. Hopefully, this can inspire someone else to give it a try or even improve upon my setup.First off, I started with a basic fan that had a remote control. It wasn’t anything fancy, just a simple oscillating fan. My goal was to make it controllable via my smartphone, integrate it with my existing smart home ecosystem, and maybe even add some voice control. I’ve heard about people using ESP8266 modules for DIY smart home projects, so I decided to give that a shot.I did a bit of research and found that the ESP8266 NodeMCU was the way to go. It’s small, affordable, and has built-in Wi-Fi, which was perfect for my needs. I also needed an IR module since the fan uses infrared signals from its remote. The idea was to have the ESP8266 act as a bridge, receiving commands from my phone or voice assistant and then sending the appropriate IR signals to the fan.The first step was to capture the IR codes from the fan’s remote. I used the IRremoteESP8266 library for this, which made the process a bit easier. I set up a simple sketch to log the IR codes when I pressed the buttons on the remote. This was a bit tricky because I had to make sure I was capturing the correct sequence of codes. After some trial and error, I managed to get all the necessary codes for turning the fan on/off, adjusting the speed, and changing the oscillation direction.Next, I needed to create a web interface so I could control the fan from anywhere. I wrote a basic HTTP server using the ESP8266’s built-in web server functionality. This allowed me to create a simple webpage with buttons for each function. I also integrated it with SmartThings, which meant setting up a device handler to translate the HTTP requests into commands the ESP8266 could understand.One thing I wasn’t prepared for was the power consumption. Initially, I thought I could run everything on two AA batteries, but the ESP8266’s Wi-Fi module drew too much power. After a couple of days, the batteries were dead, so I had to hook it up to a power outlet. It’s a minor inconvenience, but it’s definitely something to keep in mind if you’re considering a similar project.Another challenge was ensuring reliable communication between the ESP8266 and the fan. Sometimes, the IR signal wouldn’t be picked up correctly, especially if there were obstacles in the way. I solved this by placing the ESP8266 in a position where it had a clear line of sight to the fan’s IR receiver.Now, the best part is how I can control the fan. I’ve set up Alexa routines so that I can turn it on or adjust the speed using voice commands. It’s also integrated into my SmartTiles dashboard, so I can control it right from my phone’s lock screen. Plus, I’ve started experimenting with other devices using the same method—like my TV—and it’s been a lot of fun exploring the possibilities.I’d love to hear if anyone else has tried something similar or has any tips to make this project even better. Maybe someone has a solution for the power consumption issue or knows of a way to make the IR signal more reliable. Let me know your thoughts and experiences!