Some time ago I also completed this project that I never got around to publish. This project is a WiFi-Infrared gateway. I am aware that such commercial products exist, but at the time I needed one for my home the available options all suffered from one or more shortcomings, such as not being open source, not working with my own (very old) IR-capable devices, expensive (I wanted several pieces, one for each room in my house), etc. So I decided to build my own. this also had the added benefit of learning about IR communications, etc. Below is a recap how I went about it, what difficulties I have encountered and a detailed description of the project should one want to make one. The whole project is now open source.
Hardware
My WiFi-IR gateway is designed around the well known and documented ESP8266 based ESP-12F module. The circuit is rather simple, consisting of only a few parts apart from the ESP-12F module. These are the main groups of parts on the custom built PCB:
- Power circuitry: Takes 5V DC via a USB Mini-B socket from any USB phone charger and delivers 3.3V to the rest of the circuit.
- ESP-12F module with its “mandatory” company of Reset and Programming buttons etc.
- IR receiver to “learn” new codes from (almost) any IR device.
- IR transmitter circuitry including the IR LEDs and their driver, which in this simple case, is a simple transistor in switch mode.
That’s it, that simple!
What caused me a bit of grief is that, as I learnt the hard way with a lot of experimenting, not all IR LEDs are created equal: When preparing for this project, on the breadboard, I used an old IR LED that I had recovered from an old and thrown away TV remote control. Sending IR commands across the room, even without pointing directly at the receiver, worked perfectly. For the final item, though, I ordered some IR LEDs (of the same wavelength) from eBay. Unfortunately, these LEDs performed very poorly: First I thought they were completely broken, but then I realized that if I place the transmitter LEDs within a cm or so to the receiver, then my circuit worked. I got like a 100 such LEDs, so I tried a few more, but they all performed the same way. I was convinced that they were faulty, so I got another batch from another supplier. when they arrived, however, I was disappointed to see that this new batch was as bad as the first one. THEN I started to do a deeper research on the subject, and I found out that the wavelength (in my case 940nm) is not the only critical parameter. So I ended up buying a few TSAL6400 IR transmitter LEDs from Vishay. When I put just one of them in my circuit it already “illuminated” the whole living room, without having to pointed it to the target receiver. For extra robustness, I have place for 3 pieces of 5mm IR LEDs on my board, although so far haven’t needed more than one in any room for reliable operation.
Firmware
The firmware I created this WiFi-IR device is open source and is available in my GitHub repository. The code is a modified version of my open source ActoSenso Framework.
At the moment it supports only IR codes that I use around my house. If you want to use it, you will need to add your own IR commands that your IR devices understand, or download them from somewhere on the internet. I haven’t found IR codes for my devices, so I used the “learning” functionalities of this device: Once it detects an IR command, it decodes it and sends it on via MQTT to a server. Then I can either add it to the firmware or use it from my home automation server. It is not a fully automatic learning system, but it is sufficient as I don’t need to add new commands every day. I did it once, and never touched it again.
I haven’t tried it, but I see no reason why Tasmota (the IR version of it) wouldn’t run on my device.
Conclusion
After some minor hurdles with the IR LEDs I now have a perfectly working WiFi-IR gateway in each room with an IR device in it with the following major functions:
- WiFi to IR gateway translates commands received over MQTT to infrared.
- IR to WiFi gateway forwards received IR commands to MQTT server.
- Manual learning of new IR codes
- Can be used as an IR code sniffer or a TV-b-Gone!
- Super bright IR LED
Hai Viktor,
I have sent you an email. Can you please reply to it. Thanks
can you please list a complete BOM for this ?
Please contact me via one of the links in the menu, and I’ll send it to you.
haven tried this yet but https://github.com/probonopd/irdb/tree/master/codes should have a lot of codes…
Nice! Thanks for letting me know!
Hi Viktor , Thanks for your amazing work . I am working on Broadlink Bulb Project of Yours and ordered PCBs that you have posted on the PCB way. I am also interested in this project, Have you posted it on PCBway so that I can order it from there and start bulding it.
Thank you for your interest in this little gizmo! 🙂
You can find this project shared on PCBWay as well:
https://www.pcbway.com/project/shareproject/Bidirectional_WIFI_IR_Gateway.html
Please let me know when you will have finished these projects and send me a pic of your results. I’d love to feature them on my blog!
Hi there! I came across your page from a quest to “smart-ify” my dumb air conditioner that has an IR remote. I don’t know the first thing about PCBs and have barely any experience with soldering (just audio cables). Do you have any plans to ever sell these completed?
Thanks!
Alexander
Please remind me in a couple of weeks. I certainly can send you a device, but currently I am abroad. The best would be a private message.. Thanks!