Any straightforward IR Zigbee blasters?

I’m looking for an IR blaster that connects via Zigbee to Zigbee2MQTT and lets me send arbitrary IR codes. No proprietary app, no nonsense. I looked around and I can’t seem to be able to find one.

I bought this MOES and it’s been a frustrating experience as it’s very hit or miss, needs to be configured with the Tuya app that’s a complete piece of shit.

I also have a broadlink that is not Zigbee, cumbersome to set up and somewhat unreliable but at least works.

Any other option?

I’ve build a couple custom ones using esp family. A lot of work, however does give you the most control I’ve found.

I’ve been experimenting with the MOES device you reference some and have found the experience with it positive so far. I am only using the ‘local’ record function in zigbee2mqtt to get IR signals in, but it has been working very solidly. I’ve never touched the Tuya app with it, I have it on Zigbee2MQTT. I would like to find or write something that will convert the widely available libraries of IR commands into a sequence that I can send to the MOES via MQTT. I did some initial poking around and I think it is possible. The pluses of the MOES device so far:

  1. very low cost, I scored them for USD 10 all in on the recent AliExpress shop till you drop event.

  2. Battery powered, with so far good ‘blast’ coverage for a single room. Easy to deploy if you have a good zigbee mesh. Battery life is not super, I am still evaluating it, it looks like it runs for about 5 days in the stress test I have been doing on it, sending a IR on/off sequence every five seconds, that is about 17k signals send per day. Not sure yet how that will map to real world use. I think if you velcro it to the ceiling at point with max visibility to all corners in each room you want coverage. I am going to experiment with one of them in a water and air ‘tight’ clear plastic food container to see about controlling garden and holiday lights outside. Glass windows are of course a wall for IR.

  3. 100% local as long as you don’t futz around with the Tuya zigbee. I realize I am missing out on some learning, so I might attach it as part of my reverse engineering. I’m kind of amazed that I could find no one who had already created the conversion tool I want.

I’ve found this software AnalysIR pretty interesting and helpful, link below. I had an ancient IRToy from Dangerous Prototypes that I dusted off from way down in the ‘stuff’ drawer the combo of the two do a great job looking at IR signals and sending them.

What are the negatives you are finding, if you run only on zigbee2mqtt and ignore the Tuya space completely?

Good hunting!

Not Zigbee

I use one of these

then I created a template Switch

  - platform: template
      gas_heater: #gas_heater_ir
        friendly_name: Gas Heater
        value_template: "{% if is_state('input_boolean.gas_heater_dummy', 'on') %}on{% else %}off{% endif %}"
          service: script.turn_on
          entity_id: script.ir_turn_on_gas_heater
          service: script.turn_on
          entity_id: script.ir_turn_off_gas_heater

here a the 2 scripts

    - data_template:
        payload: '{"Protocol":"NEC","Bits":32,"Data":0x416649B6}'
        topic: cmnd/IR-2/irsend
      service: mqtt.publish
    - data_template:
        entity_id: input_boolean.gas_heater_dummy
      service: input_boolean.turn_on
    - data_template:
        payload: '{"Protocol":"NEC","Bits":32,"Data":0X4166B14E}'
        topic: cmnd/IR-2/irsend
      service: mqtt.publish
    - data_template:
        entity_id: input_boolean.gas_heater_dummy
      service: input_boolean.turn_off

my safety is this automation only turn gas heater on if TV on and lounge light ON

alias: "Turn Gas heater off if TV not on "
description: Turn off gas heater if tv not going
  - platform: state
      - switch.gas_heater
    to: "on"
  - platform: state
      - sensor.tv_status
    to: "OFF"
  - condition: state
    entity_id: sensor.tv_status
    state: "OFF"
  - condition: state
    entity_id: light.shelly_lounge
    state: "on"
  - service: switch.turn_off
    data: {}
      entity_id: switch.gas_heater
  - service: climate.turn_off
    data: {}
      entity_id: climate.gas_heater
  - service: input_boolean.turn_off
    data: {}
      entity_id: input_boolean.livingroom_climate
mode: single

could you give me some detail on how you send codes through Home Assistant without pairing the unit with a Tuya hub first? If that’s possible that’s really all I need but I couldn’t figure it out.

The most basic way I have found, record as many IR remote buttons as you need using these steps.

  1. Go to you Zigbee2MQTT web console, find the Moes IR device, go to the ‘Exposes’ tab for the device.

  2. Turn on the ‘State’ switch for the device as is shown in picture below.

  3. Aim your IR remote a the Moes IR device and press the desired button on the remote.

  4. The raw IR code in base 64 will appear in field below this switch.

  5. copy this raw code into some kind of document to track you codes with the IR remote button name.

  6. Then as is shown in example bash script code below, you can send this code to the Moes IR device using MQTT message. Expand on this to create in Home Assistant a switch or automation using HA’s ability to send MQTT messages.

Good hunting!

echo "Bash version ${BASH_VERSION}..."

echo $zdelay
while :

    echo "ON"
    # state="{\"ir_code_to_send\": \"BW4jahFCAuAXAQGMBsADAHLgAgvAE4AH4BcBwCeAB+AFRw8vm24jqwhCAv//biOrCEIC\"}"
    # echo $state
    mosquitto_pub -h -t 'test_zigbee2mqtt/0x3425b4fffaaaaaaa/set' -m '{"ir_code_to_send":"BW4jahFCAuAXAQGMBsADAHLgAgvAE4AH4BcBwCeAB+AFRw8vm24jqwhCAv//biOrCEIC"}'
    sleep $zdelay

    echo "OFF"
    # state="{\"ir_code_to_send\": \"BXIjdBFDAuAXAQGNBuAVA+AXAeAXPwkom3IjyQhDAv//4AIHAghDAg==\"}"
    # echo $state

    mosquitto_pub -h -t 'test_zigbee2mqtt/0x3425b4fffaaaaaaa/set' -m '{"ir_code_to_send":"BXIjdBFDAuAXAQGNBuAVA+AXAeAXPwkom3IjyQhDAv//4AIHAghDAg=="}'
    sleep $zdelay


1 Like

this is the part I wasn’t aware of. Is this the pertinent documentation or are you referring to something else? Shell Command - Home Assistant

With HA, use the mqtt.publish service.

1 Like

Search for MQTT JSON switch and you will get a number of ideas.
For other folks similar examples, link below. And have a look at some of the HA code in the answers posted to you in this thread.

So taking the above info, the LED Candles I am testing, should work with a Home Assistant MQTT JSON switch something like this code in my mqtt.yaml file. Picture of resulting switch below:


  - name: "LED Candles"
    unique_id: "0x3425b4fffaaaaaaa-led-candles"
    command_topic: "test_zigbee2mqtt/0x3425b4fffaaaaaaa/set"
    payload_on: '{"ir_code_to_send":"BW4jahFCAuAXAQGMBsADAHLgAgvAE4AH4BcBwCeAB+AFRw8vm24jqwhCAv//biOrCEIC"}'
    payload_off: '{"ir_code_to_send":"BXIjdBFDAuAXAQGNBuAVA+AXAeAXPwkom3IjyQhDAv//4AIHAghDAg=="}'

MQTT Json Switch

Good hunting!

1 Like

For future reference to anyone struggling with this, this is my actual explanation how to get it done without any unnecessary gatekeeping:

My script is super simple. I used the script UI, selected “call service” and “MQTT Publish”.

  - service: mqtt.publish
      qos: "0"
      retain: false
      topic: zigbee2mqtt/0x187a3efffe2f2175/set/ir_code_to_send
      payload: >-
mode: single

I inspected the IR Blaster MQTT device info to get the ID and the topic. Scrolling a bunch I found this:

MQTT discovery data:
Topic: homeassistant/text/0x187a3efffe2f2175/ir_code_to_send/config
  - topic: zigbee2mqtt/bridge/state
    value_template: '{{ value_json.state }}'
command_topic: zigbee2mqtt/Ir Blaster/set/ir_code_to_send
    - zigbee2mqtt_0x187a3efffe2f2175
  manufacturer: Moes
  model: Universal smart IR remote control (UFO-R11)
  name: Ir Blaster
name: Ir code to send
object_id: ir_blaster_ir_code_to_send
  name: Zigbee2MQTT
  sw_version: 1.34.0
unique_id: 0x187a3efffe2f2175_ir_code_to_send_zigbee2mqtt
value_template: '{{ value_json.ir_code_to_send }}'
platform: mqtt

this means that the topic I need to use is zigbee2mqtt/0x187a3efffe2f2175/set/ir_code_to_send which is composed as “zigbee2mqtt/{device unique ID}/set/ir_code_to_send”. The IR code just goes in the “payload” slot of the script UI without any quotes or anything else.

May I know so far what is your evaluation on the battery life?

I’m planning on to purchase battery powered or usb powered

I’ve found the battery powered units to last a very long time. They used very little battery while idling on zigbee. As I pointed out above, of course if you have the unit send signals at 5 second interval you will kill the battery in a month or less. I think it is a very good product for Zigbee2MQTT setup. Good hunting!

Is this still an issue?

I have a couple of the MOES IR blasters working well will Z2M. An IR code is sent whenever the entity
text.[remotename]_ir_code_to_send is updated, so a script to send a code is quite simple:

alias: "[Devices] TV remote standby"
  - service: text.set_value
      entity_id: text.living_room_remote_ir_code_to_send
      value: >-
icon: mdi:remote
mode: single

Seems pretty no nonsense to me.

I’ve never had to use a Tuya app - the remote was discovered and paired automagically by Z2M.

Edit: I have found that there is a slight delay before the code is sent. Presumably this is because Zigbee has to wait for the IR blaster to poll its parent router for new messages. Zigbee is probably not a suitable technology if you want quick reactions.

1 Like

if there any benefit of using text.set.value against mqtt.publish - didn’t realise you could send it this way.

Don’t know, sorry - I’ve never used mqtt.publish. It seems intuitively simpler to me because (in my head) I’m using the device itself to send the code. Whether it’s more efficient or more effective… don’t know. :thinking:

FWIW, I’m using a TuYa ZS06 and haven’t noticed any delay.

It’s mains powered, also acts as a Zigbee router, and I use mqtt.publish (never tried text.set_value so I can’t say if it’s faster/slower/same).

I used it to automate a range hood (a k.a. kitchen exhaust fan).

Mine’s battery powered, so HA has to wait (a split second) for it to check in.

very well so far, since my message in December I’ve been using the device (it’s a Moes IR blaster) almost daily and I haven’t had to change the batteries since. I’m sure at some point I’ll have to but seems a pretty set and forget deal. It’s not super quick but fast enough for what I need it for.