Skip to content

Use an ESP8266 or ESP32 to create a WiFi Infrared Blaster and send IR commands using your phone or a tablet

License

Notifications You must be signed in to change notification settings

macca448/ESP-IR-Blaster

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 

Repository files navigation

ESP-IR-Blaster

Use an ESP8266 or ESP32 to create a WiFi Infrared Blaster and send code using your mobile phone or a tablet

Core code source project:

This is the Project that gave me the core code for the Arduino sketch and the ajax script.

Note:

I stripped out all "HTTP_GET" functionality in my project as I only wanted to send "HTTP_POST" commands. If you need to pull data into your HTML like sensor readings then you'll need to look at the core code source project for that detail.

Arduino IDE libraries and tools:

IRremoteESP8266 This library has an impressive list of supported protocols.

ArduinoJson to facilitate the AJAX exchanges

You need to make sure the Arduino IDE has support for the ESP8266 or the ESP32 Dev boards installed.

Plus SPIFFS upload support for the Arduino IDE is also needed. Here are links to instructions for the ESP32 and the ESP8266 for adding this tool.

Tips

(1) Randomness when capturing IR codes

You will most likely need to capture your own IR codes and if you get random captures (as I did) I strongly recommend you read this blog for the answer. In a nutshell it comes down to IR reciever center frequency and what carrier frequency the remote you are capturing uses. In my case both the Sky and Panasonic used 37Khz and the standard Arduino IR receiver has a center frequency of 38Khz.

I swapped to a TSOP4136 (36Khz center frequency) IR receiver hardwired to the ESP controller and everything burst into life.

To capture IR codes I recommend you use the example sketch in the library called "IRrecvDumpV2". It's what worked for me. The switch and the LED shown in the image below were only for developement and debugging. image

and this is my final setup using an ESP32

image

(2) Handling a large IR code library

The HTML and CSS are the most time consuming and to help avoid incorrectly assigning ID's and IR codes to the wrong buttons I added them as comments to the IR library (irCodes.h) The DOM ID is the array index position. As the remotes are numerically grouped this also let me do a simple "IF" statement for switch case encoder assignment. The core code-source project used IR header hex values that may work for you but were not optimal in my case.

(3) Javascript and Fontawesome

In my project I'm not hosting the javascript or Font Awesome libraries so internet access is required.

Watch the video demo

Watch the video

About

Use an ESP8266 or ESP32 to create a WiFi Infrared Blaster and send IR commands using your phone or a tablet

Resources

License

Stars

Watchers

Forks