Awesome Open Source
Awesome Open Source

WiFi IR Blaster for ESP8266

This is simple infrared sender/receiver controlled over MQTT. It uses the Homie MQTT convention and is based on Homie implementation for ESP8266 by Marvin Roger.

Wiring diagram

The wirring bellow is the one I used and worked for me. You will likely need to adjust the resistor sizes based on the voltage drop and max current for your IR diodes. The transistor is general purpose NPN transistor (I used BSY34)



I recommend to use platformio which will resolve all the dependencies for you, but to compile this sketch in Arduino IDE you have to manually install follwing libraries:

as well I recommend to install the Homie UI Bundle to data/homie folder. To upload the UI bundle you have to follow SPIFFS upload process if using PlatformIO or if you use Arduino IDE you may use arduino-sep8266fs-plugin.

Once you upload the sketch, you have to configure the node as described in Homie Getting Started Tutorial (this is where you device gets device id assigned)


  • To listen for received IR codes, subscribe to MQTT topic homie/<deviceid>/infrared/code:
$ mosquitto_sub -h -v -t 'homie/5ccf7fd38d01/infrared/code'
homie/5ccf7fd38d01/infrared/code {"name":"UNKNOWN: 0x42D74094","value":1121403028,"frequency":38,"type":{"id":-1,"name":"UNKNOWN"},"raw":[9100,4600,600,650,600,1750,600,1750,600,1750,600,650,600,1750,600,1750,600,1750,600,1750,600,1750,600,1750,600,650,600,650,600,650,600,650,600,1800,600,650,600,650,600,1750,600,650,600,650,600,650,600,650,600,650,600,1750,600,1750,600,650,600,650,600,1750,600,1750,600,650,600,650,600]}
  • To send IR codes, publish to MQTT topic homie/<deviceid>/infrared/code/set:
mosquitto_pub -h -t 'homie/5ccf7fd38d01/infrared/code/set' -m "{"frequency":38,"raw":[900,900,1800,900,900,900,900,900,900,900,900,900,900,900,900,900,900,900,900,900,900,900,900,1800,900]}";
Related Awesome Lists
Top Programming Languages
Top Projects

Get A Weekly Email With Trending Projects For These Topics
No Spam. Unsubscribe easily at any time.
C Plus Plus (238,708
Arduino (30,704
Upload (14,305
Iot (11,916
Esp (8,424
Mqtt (7,890
Esp8266 (4,923
Home Automation (2,212
Platformio (1,047
Homie (44
Homie Esp8266 (15