Note: previously you needed a custom quirk, but since September the Tuya IR Blaster is natively supported in Home Assistant
After years of playing around with Philips Hue and never being really happy about it, I switched to Home Assistant. I installed it on a Raspberry Pie, added a ZigBee USB-Stick and never looked back.
It’s simply amazing. Fully customisable, everything local. And zero problems.
There was only one thing I wished it had. Infrared output. I wanted to remote control devices that only had IR-Input. I tried two Broadlink devices, and both sucked. The first just didn’t want to connect to a properly secured wifi, the other one was buggy as hell. I needed something better. And I found it.
The Tuya Zigbee IR Blaster ZS06
Setting it up is as easy as the usual “a couple of clicks” in Home Assistant.
Let’s start.
Requirements
Things you need:
- Fully installed Home Assistant
- A Zigbee USB-Stick
- A fully configured Zigbee Home Automation device
Installation
To enable the support for the Tuya IR, you need to install have a working zigbee stick. After that it is pretty straight forward.
Add the device to your system
Initiate the pairing process by pressing the button on the device for around 5 seconds till the LED starts blinking. You will be able to add the device in Home Assistant now.
Navigate to the ZHA configuration page and click on the “Add Devices” button. The device should show up as “Tuya Zigbee IR Blaster ZS06”. Click on it and wait for the pairing process to finish.
After the device was added, navigate to it and click on the “…” button in the device info box. Click on “Manage zigbee device” to open the device configuration page. There you can send commands to the device.
Select the “ZosungIRControl
” cluster and the “IRLearn
” command. Your dialog
now should look like this:
Press “Issue Zigbee command” and then the blue led should start to light up, indicating that the device is waiting for an IR code.
After you pressed a button on the remote, you can see the code in the attributes tab. For that you have to select last_learned_ir_code
in the dropdown and press the read attribute
button.
You can now test the code by selecting the “IRSend” command and paste the code into the “code” field. Click on “Issue Zigbee command” and the device should send the IR code.
If everything works, you can now create a script to send the code. For that you
need to grab the ieee
code that is shown in the device info box after you
expanded the “Zigbee info”. The cluster_id
is the ID of the ZosungIRControl
cluster, in my case 0xe004. Convert that to decimal and you get 57348. The
command in my case is “IRSend (id: 0x0002)”, which translates to decimal 2 and
the command type is always “server”.
The final script should look like this:
service: zha.issue_zigbee_cluster_command
metadata: {}
data:
cluster_type: in
ieee: 90:39:5e:ff:fe:0b:e4:cc
endpoint_id: 1
command: 2
command_type: server
cluster_id: 57348 # = 0xe004
params:
code: >-
B3UjhBFrAo8GgAMALOAAAeABCwGPBkADQA8BawKABwEsAuAHB+AHAcAfQAFAC4ADQAuAA0AB4AMLAc6gwIcBLAJAA+AFAQFrAkADAY8GgAPAC+ALB0AT4AMDQDPAD0AL4AEDACxgCwUsAmsCjwaAA0AL4AGHAWsCQANAE+AHA0AXQANAF+APB0Ab4AMDA48GLALAAUAL4AED4AEbAY8GQAMCawIsIAGAhwMsAo8GgAPgCwHgAxtAC0AB4AEHgEfgBwEDjwYsAsABQAvgBwNANcATQAHgBYdAHeAJAQGPBoADQAFAC0Al4AcHQBPgAwPAH0ATQAvgBwPgAxcDawIsAg==
Now you have everything you need to control your IR devices.