An IR to WiFi bridge lets you use any old infrared remote control with Google Home, Alexa, or Home Assistant — transforming your existing TV, AC, DVD player, and set-top box remotes into smart home devices without replacing a single appliance. This project is ideal for Indian homes where replacing working electronics purely for smart home compatibility feels wasteful and expensive. With a simple ESP8266 build, you can retain every IR remote you own while adding voice and app control.
Table of Contents
- How an IR to WiFi Bridge Works
- Components Required
- Circuit Design
- Learning IR Codes from Your Remotes
- Firmware Options: Tasmota vs ESPHome
- Integrating with Google Home
- Indian Home Use Cases
- Frequently Asked Questions
How an IR to WiFi Bridge Works
An IR to WiFi bridge has two main functions:
- Learning mode: Captures IR codes from your existing remotes using an IR receiver (TSOP sensor)
- Transmit mode: Replays those codes using IR LEDs when triggered via WiFi (MQTT, HTTP API, or voice command)
The ESP8266 or ESP32 acts as the bridge between the WiFi world (Google Home, Home Assistant, phone app) and the IR world (TV, AC, DTH box, projector). You point your existing remote at the bridge once to “teach” it the code, then never need the remote again.
Components Required
- NodeMCU ESP8266 or Wemos D1 Mini
- TSOP38238 or VS1838B IR receiver (38kHz, for learning)
- 2-3x high-power IR LEDs (5mm, 940nm, 100mA)
- 2N2222 or BC337 NPN transistor
- 47 ohm resistor (per IR LED)
- 10k ohm pull-up resistor (for TSOP)
- 5V USB power supply
- Project box or 3D printed case
Circuit Design
NodeMCU / Wemos D1 Mini:
IR Receiver (TSOP38238):
D4 (GPIO2) -> OUT pin of TSOP
3.3V -> VCC
GND -> GND
IR Transmitter (3 LEDs in parallel):
D5 (GPIO14) -> Base of 2N2222 via 1kohm
Collector of 2N2222 -> LED cathodes
LED anodes -> 5V via 47ohm each
Emitter of 2N2222 -> GND
For wide-angle coverage:
- LED 1: Forward (toward TV)
- LED 2: 45 degrees left (for AC on side wall)
- LED 3: 45 degrees right (for set-top box)
This setup covers a typical Indian living room from one location.
Learning IR Codes from Your Remotes
The IRremoteESP8266 library makes learning and replaying codes straightforward. Use this sketch to capture codes:
#include <IRrecv.h>
#include <IRutils.h>
#define RECV_PIN D4
IRrecv irrecv(RECV_PIN);
decode_results results;
void setup() {
Serial.begin(115200);
irrecv.enableIRIn();
Serial.println("Point remote at receiver and press buttons");
}
void loop() {
if (irrecv.decode(&results)) {
Serial.println("Protocol: " + typeToString(results.decode_type));
Serial.println("Code: " + uint64ToString(results.value, HEX));
Serial.println("Bits: " + String(results.bits));
printIRResultAsCArray(&results, &Serial);
Serial.println();
irrecv.resume();
}
}
For common Indian devices:
- DTH boxes (Tata Sky, Dish TV): Usually NEC or NECx protocol
- Indian TV brands (Onida, BPL, Videocon old models): NEC protocol
- LG, Samsung TVs: LG2 and Samsung protocols respectively
- Voltas, Blue Star ACs: Proprietary raw codes
- CD/DVD players (older Sony, Philips): SONY or RC5 protocols
Firmware Options: Tasmota vs ESPHome
Tasmota IR Bridge (Easiest Option)
Tasmota has built-in IR gateway support. Flash Tasmota IR firmware (tasmota-ir.bin) and configure:
- Flash Tasmota IR to your ESP8266
- Connect receiver to GPIO D4, transmitter to GPIO D5
- In Tasmota console:
IRSend {"Protocol":"NEC","Bits":32,"Data":"0x20DF10EF"} - Home Assistant auto-discovers via MQTT and creates IR send service
# Home Assistant service call to send IR
service: mqtt.publish
data:
topic: "cmnd/ir-bridge/IRSend"
payload: >{"Protocol":"NEC","Bits":32,"Data":"0x20DF10EF"}
ESPHome IR Transmitter
remote_transmitter:
pin: GPIO14
carrier_duty_percent: 50%
remote_receiver:
pin: GPIO4
dump: all
button:
- platform: template
name: "TV Power"
on_press:
- remote_transmitter.transmit_nec:
address: 0x20DF
command: 0x10EF
Integrating with Google Home
Connect your IR bridge to Google Home through Home Assistant:
Step 1: Create Script Entities in Home Assistant
# scripts.yaml
tv_power_toggle:
alias: "TV Power Toggle"
sequence:
- service: mqtt.publish
data:
topic: "cmnd/ir-bridge/IRSend"
payload: >
{"Protocol":"LG2","Bits":28,"Data":"0x20DF10EF"}
tv_volume_up:
alias: "TV Volume Up"
sequence:
- service: mqtt.publish
data:
topic: "cmnd/ir-bridge/IRSend"
payload: >
{"Protocol":"LG2","Bits":28,"Data":"0x20DF40BF"}
Step 2: Expose to Google Home
In Home Assistant: Settings -> Integrations -> Google Home (via Nabu Casa or local cloud). Expose the TV scripts as scenes or switches. Then in Google Home app, you can say “Hey Google, turn on TV” to trigger the IR power sequence.
Step 3: Create Google Home Routines
Create a “Movie Time” routine that:
- Turns on TV (IR command)
- Switches to HDMI 2 (IR command after 3 second delay)
- Dims lights to 30% (via smart switch)
- Sets AC to 24C (via IR AC blaster)
Indian Home Use Cases
Tata Sky/Dish TV Control
Control your DTH set-top box from your phone when you’re in the kitchen. Change channels, mute advertisements, and adjust volume — all via the Home Assistant companion app without needing the actual remote.
Old DVD/CD Player Automation
Many Indian homes have working Philips, Sony, or LG disc players that are used occasionally. Put them on a smart plug + IR bridge combo. One voice command starts playback of a previously inserted disc.
Projector Control
Business presentations and home theatre projectors typically use IR remotes. A ceiling-mounted IR bridge pointing at the projector allows app or voice control for power, source switching, and volume.
Multiple AC Control from One Room
In large Indian homes with multiple AC units, a single centrally-placed IR bridge with multiple directional LEDs can control all ACs in adjacent rooms — reducing the need for multiple IR blasters.
Frequently Asked Questions
Can the IR bridge control all my Indian appliances?
Any device with an IR remote can be controlled. This covers virtually all Indian TVs, ACs, DTH boxes, DVD players, projectors, audio systems, ceiling fans with IR receivers, and home theatre systems. The only exception is appliances using RF remotes (some ceiling fans, electric blinds) which require an RF bridge instead of IR.
How far do IR signals carry from the bridge?
A single high-power IR LED covers 8-10 metres. Using 3 LEDs in different angles covers a typical Indian living room (20-30 sqft) reliably. For very large halls, mount two bridges — one at each end of the room.
What happens to my original remote controls?
They continue to work normally alongside the IR bridge. The bridge does not interfere with original remotes. You can use either the bridge or the physical remote at any time — both send the same IR signals.
Do I need to re-learn codes when I change my TV or AC?
Yes, when you replace an appliance, you need to re-learn the new remote’s codes. The process takes 5-10 minutes per device. Keep a note of learned codes in a spreadsheet for easy reference during future updates.
Is this compatible with the Mi Remote app codes?
Many IR code databases, including Xiaomi’s Mi Remote app and the IRDB (IR Database) project, share codes compatible with the IRremoteESP8266 library. You can often import codes from these databases instead of physically capturing them from your remote.
Add comment