Alexa Compatible IR Bridge Using an ESP8266

Introduction: Alexa Compatible IR Bridge Using an ESP8266

I wanted a way to control my smart TV via Alexa. Unfortunately my Hi-Sense 65" Smart TV does not have the ability to be controlled via WiFi. It would have been nice if it had some sort of API that I could use to interface with it.

So I created an IR bridge that will allow you to control it by means of a stationary IR bridge that is compatible with Alexa.

Supplies:


3d printed enclosure - If you do not have access to a 3d printer you can always build this using something home made. Downloadable from here https://github.com/mailmartinviljoen/LittleNodes_IR_Bridge

NodeMCU ESP8266 micro controller.

2 IR Transmitter LEDs. These LEDs only have 2 legs and they are connected the same way you would connect an ordinary LED (Flat side is the negative)

1 IR receiver for learning remote commands from an existing TV remote. You have to use an IR receiver that has 3 legs, VCC,GND and data out.

1 RGB Led, this is optional, you don't need it and it will function without any modifications needed.

Other downloads
ESPFlasher Tool https://github.com/nodemcu/nodemcu-flasher

Teacher Notes

Teachers! Did you use this instructable in your classroom?
Add a Teacher Note to share how you incorporated it into your lesson.

Step 1: Connecting Everything Together

Both of the IR transmitters LEDs are connected in Parallel. Flat sides to any GND pin on the NodeMCU and the other 2 legs joined together connected to GPIO Pin D2 on the NodeMCU. I'm not sure if they need to be connected via a resistor but I figured the ESP8266 output is only 3.3V so they should be safe. Also they are not used all the time. They only come on when it's sending a signal.

The IR Receiver As shown in the picture it has 3 legs. The data out pin has to be connected to GPIO D5 the GND to GND and offcoarse the VCC to a 3.3V pin on the Node MCU


RGB LED Has 4 legs, GND and then positive for Red Blue and Green. The RGB legs go to GPIO pins D6 D7 and D8. The order does not matter. It will just show different colors.

Once assembled you can simply flash it using the Binary that I created. see the next step.

Step 2:

Flashing the binary to the ESP8266 instead of directly from the Arduino sketch means you don't have to have all the libraries installed. You can use the Esp Flasher tool downloadable from here.

https://github.com/nodemcu/nodemcu-flasher

And both the sketch and binary can be downloaded from my GitHub page.

https://github.com/mailmartinviljoen/LittleNodes_IR_Bridge

Unfortunately this is not all you have to do. Once you flashed the image you need to also upload the HTML web interface that is making use of bootstrap to configure the NodeMCU. The tool used to upload these files is an external plugin that you need to install in the Arduino IDE. Instead of re-creating the tutorial, here's a great article that shows you how to do it.

https://randomnerdtutorials.com/install-esp8266-filesystem-uploader-arduino-ide/

Place the contents of the data.zip file in a folder called data in the same folder where the .INO files are in.

You have to open the .INO file in the Arduino IDE. If you installed the plugin correctly you will see under tools an option called ESP8266 Sketch Data upload. After uploading it the device will finally be programmed.

Note: If you don't upload the files, once you connect to the access point in setup mode the page will be blank because it cannot find any pages to load.

Step 3: Learn IR Codes and Save Them Onto the NodeMCU

Instead of explaining in text form how to set up your new IR device I created a video that demonstrates how it work and also explains how to program the device with IR codes.

Watch the video!

Some extra information.

Libraries uses (Not created by me)

https://github.com/esp8266/Basic/tree/master/libraries/IRremoteESP8266

Wemo Emulator


Possible problems.
My TV is making use of the NEC IR protocol, so there is a posibility that your TV will not work if it does not make use of the same type of IR codes. I.E My fan has a remote. The device will learn the codes but it doesn't work not sure why , you will have to fiddle with the IRsend and Receive libraries in order to figure out why.

The 3d printable STL is also on my github page.

Be the First to Share

    Recommendations

    • LED Strip Speed Challenge

      LED Strip Speed Challenge
    • Sculpting Challenge

      Sculpting Challenge
    • Clocks Contest

      Clocks Contest

    4 Discussions

    0
    Jugaad it yourself
    Jugaad it yourself

    4 days ago

    For two weeks Im struggling to do this project please help me, have done everything what you have told in the intructables they only thing Im stuck right now is that my web interface is coming blank can you please help me

    0
    Jugaad it yourself
    Jugaad it yourself

    Question 21 days ago

    hey buddy can you help in this I have done all the steps correct but im unable to see the web interface i mean the setup page

    0
    ostaaz
    ostaaz

    21 days ago on Introduction

    Would you please send the direct link of the stl file?
    I can’t find it in your github.

    0
    Jugaad it yourself
    Jugaad it yourself

    26 days ago on Step 2

    Hi there
    "You have to open the .INO file in the Arduino IDE. If you installed the
    plugin correctly you will see under tools an option called ESP8266
    Sketch Data upload"
    can't see this option I m unable to add the plugin please help