TV Tutorial - IR Transceiver

In this section we’ll walk through controlling your TV using an IR transceiver and then use voice to control the TV via Alexa, Google Home or SmartThings.

Prerequisites :

  1. ESP8285 ESP-01M IR Transceiver x1.

In this tutorial, we’ll be using the ESP8285 ESP-01M IR Transceiver, a popular option readily available online. While we’ll be focusing on this specific module, the concepts can be applied to other 38KHz infrared transmitters as well.

Sinric Pro ir transceiver

Quick introduction to ESP8285 ESP-01M IR Transceiver

An Infrared ESP8285 Wireless WIFI Transceiver Module is a circuit board that combines two functionalities:

Infrared (IR) Transceiver: This part allows the module to transmit and receive infrared signals. IR transmitter is connected to GPIO4 and IR receiver is connected to GPIO14

ESP8285 Wi-Fi Module: This is a separate chip on the board that enables the module to connect to a Wi-Fi network. ESP8285 is a ESP8266 with 1M Flash, which can withstand high temperatures up to 125 degrees Celsius.

To Upload Firmware : Connect the Jumper GPIO01 and GND.

To Run Firmware : Remove the Jumper and replug the USB programmer


Sinric Pro esp8266 relay wiring

5V 5V

Before we integrate with Sinric Pro, it is important to verify that the relay is wired correctly and you can record IR signals.

Step 1: Recording IR

  1. Install IRremoteESP8266

    • Click the “Sketch” -> “Include Library” -> “Manage Libraries…” Menu items.

    • Enter IRremoteESP8266 into the “Filter your search…” top right search box.

    • Click on the IRremoteESP8266 result of the search.

    • Select the version you wish to install and click Install.

  2. Connect the Jumper GPIO0 to GND to upload the firmware.

  3. Flash the IRrecvDumpV3 No need to change the sketch. It’s already using correct GPIO pins.

transceiver esp8285 flash

  1. Remove the Jumper connecting GPIO0 to GND and replug the USB programmer. Now ESP chip will run the IRrecvDumpV3 sketch. Set the Arduino Serial BaudRate to 115200 see the logs.

  2. Time to record the power on button of your TV remote control.

record tv remote esp82266

Would output the IR codes like this below in the Arduino Serial Monitor.

Copy rawData array

record tv remote esp82266 arduino serial

Step 2: Sending IR

#include <Arduino.h>
#include <IRremoteESP8266.h>
#include <IRsend.h>

const uint16_t kIrLed = 4;

IRsend irsend(kIrLed);

uint16_t rawData[3] = {9004, 2218,  586};  // TODO: Change this to your remote control power button

void setup() {

void loop() {
  Serial.println("a rawData capture from dump");
  irsend.sendRaw(rawData, 3 /* IR len */, 38 /* kHz */);  // TODO: adjust IR len according to rawData length.

Flash the above sketch and remove the the Jumper to run the the firmware.

When the sketch sends the signal, TV should either turn on or off. Now you can repeate the process to record other buttons such as volume up, down, mute ect..

Step 3 : Create a new TV device in Sinric Pro

record tv remote esp82266 arduino serial

Sinric Pro copy device id

Step 2 : Coding

2.1 Install Sinric Pro Library

Sinric Pro install SinricPro library

2.2 Complete Code

Now we can complete the SinricPro TV sketch with the IR codes.

Now you should be able to control the TV via Sinric Pro App, Google Home, Alexa as well.


Please refer to our Troubleshooting page for possible solutions to your issue.

This document is open source. See a typo? Please create an issue