Automate infrared devices
In Home Assistant
Introduction
With a Zigbee/WiFi infrared transmitter and receiver device, you can automate all your infrared controlled devices!
There are a lot of devices that have a remote which works via infrared.
Like a TV, air conditioner, (ceiling) fans, fireplace, screens, lights and electric candles.
The signal of an infrared remote has no encryption and is always the same.
This makes it easy to capture, store and resend the signal.





NOTE: Also affiliate links are used on this page. You sponsor my work and still pay the original price.
Smart infrared transmitter / receiver
I used for this project the Zigbee IR remote control - Moes (AliExpress)
|
UFO-R11
With this small black box, powered on batteries, you can control any infrared device.
An infrared sender needs to be in a direct line with the receiver. If you have more devices you want to control, it can be that you need multiple smart devices to control them all.
There are also similar WiFi versions available of this device.

You can set the device in learning mode to copy signals and store the signal on the device.
When you trigger the device with a code, it sends the stored signals but now from this box.
You can save a lot of signals on this box, each button on a remote and that for multiple remotes.
I used this solution also for my Christmas paper star, see my dedicated page about my automated Christmas lights and decorations.
Learning mode
To learn a new signal, set the device in learning mode by sending this payload to the MQTT topic of the device, for it that zigbee2mqtt/irremote/set
{
"learn_ir_code": "ON"
}
Now a LED light turned on in front of the device. Now you can hold the original remote in front of the device and press a single button.
The response in MQTT on the topic zigbee2mqtt/irremote
contains the infrared code. You need this code to resend the signal via this same device.
{
"battery" : 11,
"last_seen" : "2024-11-03T09:21:03.343Z",
"learn_ir_code" : null,
"learned_ir_code" : "Bb8jphFIAuAXAQF9BuAVA0ABwCPgAwFAE0ABwAdAAUALwANAAUALCcqdvyPBCEgC///gAgcCCEgC",
"linkquality" : 43,
"voltage" : 1200
}
Resend signal
To resend the signal, send on the MQTT topic zigbee2mqtt/irremote/set
this payload to resend the same signal as send from the original remote.
Make sure your signal is in line with the device because the infrared signal is an invisible light beam. My experience is that the signal can control devices still in a range of 5 meters. Because it works on batteries your free to position the device.
{
"ir_code_to_send": "Bb8jphFIAuAXAQF9BuAVA0ABwCPgAwFAE0ABwAdAAUALwANAAUALCcqdvyPBCEgC///gAgcCCEgC"
}
If all goes well, the device now also reacts on your box!
Now you can add also other buttons from the remote to the box and clone the signals of other remotes as well.
Now the fun continues to automation the commands! Turn the candles/fireplace on when you enter the room in the evening or whatever scenario you can think of! Enjoy home automation!
Home Assistant
From Home Assistant, you can create buttons on your dashboard and send a MQTT events to a specific topic.

# Sourcecode by vdbrink.github.io
# Dashboard button card code
type: button
name: Turn on
tap_action:
action: perform-action
perform_action: mqtt.publish
data:
topic: zigbee2mqtt/irremote/set
payload: >-
{"ir_code_to_send":"BcsjsBFGAuAXAQGFBuAZA0ABQCfgAwHgAw/AC0AHwANAAUALCc+dyyPDCEYC///gCgcCCEYC"}
You can create a script which contains the MQTT event and call this script from an automation. For readability, I place it here direct on the dashboard as action for a button.
Hardware
These hardware devices are examples of what you need and can use in your own infrared automations.
Infrared transmitter / receiver
-
An few examples of Zigbee and WiFi devices which act as programmable infrared remotes.
They can learn signals from the original remote, and via Wi-Fi or Zigbee you can resend the copied signal to simulate the press on the button via an automation. There are also devices that support RF signals as well.
Infrared controlled devices
As mentioned in the introduction, there are a lot of devices that can be controlled via infrared. Here are some links to products which all work via infrared, and can be controlled via the above mentioned infrared transmitter / receiver.
LEDS
Light curtains
Tea lights
Candles
-
Candle lights controlled by an infrared remote
-
Candle lights controlled by an infrared remote
-
Long candle lights controlled by an infrared remote
Also, some Christmas decorations have an infrared remote, see my dedicated page how I used this project for it.
Physical stores
- The Dutch Action sells them also in their shops
- The Dutch Hema sells 4 rechargeable tea lights with a remote
Where do you use the infrared transmitter / receiver for in your smart home?
Top | Homepage | Best Buy Tips | Shirts, mugs, stickers with IT quotes