Introduction: IoT Based TV Remote/IR Blaster With Google Assistant + Blynk ESP8266

About: Ever since I unscrambled my old RC car , I knew I wanted to be a tech enthusiast. There’s nothing like that “light bulb” moment when a child understands something they didn’t know just a few minutes before. I …

When my family watches television there is only one thing that became invisible, it is the TV remote. After some vigorous research, it was found to be under someone's pillow. 

So I decided to make something that will change my TV channels through voice commands on google home or Alexa. Therefore I made this IoT blaster which can be controlled by the Blynk app and voice commands from around the world. I made this dedicatedly for my set-top box, but in the future, I will make a universal IR blaster that will control all the appliances that use remote through voice commands. You can make it for anything you want to control so let's make it.

Supplies

Step 1: Setting Up Ardiuno IDE

I prefer using the online Arduino editor because it is easier to use.

  1. Create an account on Arduino editor.
  2. Download ardiuno agent.
  3. Now libraries > library manager > search IRREMOTEESP8266 > add to favourite


SETUP DONE. You can also use Arduino Ide.

Step 2: Capturing IR Codes

How do remote work?

Every button in the remote has a different code. The code is sent by the remote, decoded by the receiver, and performs that function.

Capturing Codes

  1. Goto libraries > favourites > under IRREMOTEESP8266 Examples > IRrecvDemo
  2. Make the circuit for the IR receiver.
  3. Upload the code Open the serial monitor.
  4. Press the buttons on your remote Copy the HEX codes for a specific button.
  5. NOTE: CHECK YOUR IR RECEIVER PINOUT. IT MAY BE DIFFERENT.

IR RECEIVER NODEMCU

Step 3: UNDERSTANDING THE BLYNK CODE

Line 26 to Line 71 are of simple initialization.

Line 74 to 261 is the main code

Here I am using only one virtual pin V0 so if the value of V0 pin will be 1 it will trigger "starplus" which has a number 101 so I send the hex values(which I captured earlier) of 101 with a delay of 1 second and so on using else if condition I wrote code for all the channels. The code is attached below.

Step 4: Setting Up the Blynk App

Now, will make a layout of the remote in Blynk.

  • Download the Blynk app from the google play store.
  • Sign Up and create your project selecting your board.-
  • Add menu element by clicking on the + sign.
  • Add STEP H and STEP V elements. (Refer Images)
  • I added two buttons for mute and back.
  • Now in every element you have to select the V0 pin.
  • (IMPORTANT) In the menu element add channels on the position number that you have given in the code. For ex: In the code when the value of V0 will be 1 it will trigger star plus, Therefore we will add star plus at position 1
  • Now add other channels on position according to their values in code.
  • Now in STEP V for volume I will add value 19-20 19 for low and 20 for high.
  • Similarly we will do for forward and backward.
  • ENTER THE AUTH TOKEN, WIFI, PASSWORD TO THE CODE AND UPLOAD IT TO NODEMCU.


Step 5: SENDER CIRCUIT

IR LED NODEMCU

Step 6: EMBEDDING GOOGLE ASSISTANT

  • Download IFTTT app.
  • Sign up.
  • Click on create.
  • Click on if > search google assistant.
  • Select say a phrase.
  • In then search webhook
  • http://188.166.206.43/YOUR BLYNK AUTH TOKEN/update/V0
  • Method PUT
  • Content type > application/json
  • Body > ["Add value of your channel"]
  • Do the same for all the T.V. channel

How to create more than 5 applets for free ??

  • For ex your email is abc@gmail.com
  • After using all your 5 applets logout.
  • Enter abc+anything@gmail.com you can add anything after + sign.


Step 7: TESTING

You are ready to test your IoT-based remote/IR blaster with the google assistant/blynk app.

PS: I am working on a universal IR BLASTER Stay tuned!!

Meanwhile, if you like the project add it to your favorite section. If you have any queries comment down below.