How to Convert and Add a Cheap IR Blaster to Home Assistant for Automations

2022-03-26 06:28:32 By : Ms. yin li

Got a WiFi-based universal IR blaster? Find out how to convert it to YTF IR Bridge so you can use it as a custom remote for Home Assistant.

There are several WiFi-based universal IR blasters available online from manufacturers, such as Tuya and its rebranded versions, sold across the world. They allow you to get rid of all remote controllers and control your TV, heaters, HVAC, home theater, fan, or other IR remote-controlled devices through a smartphone app. You can also integrate and send commands to these IR blasters for controlling the devices through Alexa or Google Assistant.

However, there are a few considerable challenges associated with the smart Wi-Fi IR blaster, such as:

There are two different ways to convert a universal IR baster with the TYWE3S chip into a custom IR remote for Home Assistant:

In this DIY guide, you will learn the process of converting these universal IR devices into a custom Tasmota firmware-based IR blaster, add them to Home Assistant for local Wi-Fi remote control, and set automation triggered by events.

To get started, you will require the following hardware:

To flash the Tasmota firmware onto a universal IR blaster, you need to interface the IR blaster with the USB to TTL Serial converter module. The steps are as follows.

Flashing custom firmware could be dangerous and may render your device unusable. Follow this DIY guide at your own risk.

Disassemble the IR blaster to access the hardware inside for flashing the Tasmota firmware. Use a screwdriver to remove the screws and then use some force to remove the outer cover.

Once you have access to the hardware, solder jumper wires to the 3.3V power supply, TX and RX communication pins, GND, and IO0.

After soldering the jumper wires, connect them to the USB to TTL Serial converter module as shown in the table.

Download the Tasmota.bin firmware file and Tasmotizer.exe flashing tool.

Connect the USB to TTL Converter module to the PC or laptop and launch the Tasmotizer flashing tool

Click Refresh and then select the COM port and click Open to choose the downloaded Tasmota.bin firmware file.

Wait for the tool to finish flashing the firmware.

After the flashing completes, disconnect the IO0 pin from the ground pin and press the reset button on the USB to TTL module.

On your PC or laptop, open Wi-Fi settings and connect to the tasmota-XXXX-XX Wi-Fi network

Open a web browser and go to 192.168.4.1.

Select the available Wi-Fi network and enter the password. Click Save.

An IP address will be displayed. Note down and then open the IP in the web browser. You may also click on the IP address to open the Sonoff Basic Tasmota web interface.

Click Configuration > Configure Module.

From the Module Type, choose Generic and click Save. The device will restart.

Click Configuration > Configure Module and select the pins as shown in the screenshot below, then click Save.

To connect this converted custom IR blaster to Home Assistant, you must install and configure MQTT on your Home Assistant.

Once set up, go to Configuration > Configure MQTT in the custom IR blaster web interface and enter the MQTT parameters, such as IP address of the Host, User, and password, and click Save.

Once setup is finished, open the web interface and go to Console.

When you press a button on your IR remote, the converted IR blaster receives an IR signal and displays it in the Console.

You can send this IR signal from the converted IR blaster via the Console using IRSend:

The command will be sent, and the device will perform the action based on the IR data transmitted.

To integrate with Home Assistant, you need to install the File Editor add-on and then use it to open the configuration.yaml file and add the following lines,

After the restart, go to the Dashboard and click Edit Dashboard.

Click Add a Card and choose Horizontal Stack.

Select the Button and choose the name of the IR entity you want to control. Test the button and then repeat the steps to add all other entities and buttons.

Now you can control the IR device with your Home Assistant. You may repeat the steps to add as many devices as you want to control.

Besides adding toggle buttons to Home Assistant for controlling your home appliances or air conditioner, you can take advantage of the MQTT Climate component in Home Assistant to further customize the controls.

You may also use ESPHome to build custom firmware for your HVAC (heating, ventilating, and air conditioning) and thermostat controls with the Climate component in Home Assistant and flash it on any cheap IR blaster.

Further, you can add automation to control IR devices. For instance, turn off/on the home theater when the TV is switched off/on, or slow the fan speed when the air conditioner is switched on.

Ravi is an expert tech explainer, an IoT enthusiast and Linux lover with a background in big data and app development. He spends most of his weekends working with IoT devices and playing games on the Xbox. He is also a solo traveler who loves hiking and exploring new trails.

Join our newsletter for tech tips, reviews, free ebooks, and exclusive deals!