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.
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:
very low cost, I scored them for USD 10 all in on the recent AliExpress shop till you drop event.
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.
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?
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
trigger:
- platform: state
entity_id:
- switch.gas_heater
to: "on"
- platform: state
entity_id:
- sensor.tv_status
to: "OFF"
condition:
- condition: state
entity_id: sensor.tv_status
state: "OFF"
- condition: state
entity_id: light.shelly_lounge
state: "on"
action:
- service: switch.turn_off
data: {}
target:
entity_id: switch.gas_heater
- service: climate.turn_off
data: {}
target:
entity_id: climate.gas_heater
- service: input_boolean.turn_off
data: {}
target:
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.
Go to you Zigbee2MQTT web console, find the Moes IR device, go to the ‘Exposes’ tab for the device.
Turn on the ‘State’ switch for the device as is shown in picture below.
Aim your IR remote a the Moes IR device and press the desired button on the remote.
The raw IR code in base 64 will appear in field below this switch.
copy this raw code into some kind of document to track you codes with the IR remote button name.
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.
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:
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
Payload
availability:
- topic: zigbee2mqtt/bridge/state
value_template: '{{ value_json.state }}'
command_topic: zigbee2mqtt/Ir Blaster/set/ir_code_to_send
device:
identifiers:
- 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
origin:
name: Zigbee2MQTT
sw_version: 1.34.0
support_url: https://www.zigbee2mqtt.io
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.
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!
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"
sequence:
- service: text.set_value
target:
entity_id: text.living_room_remote_ir_code_to_send
data:
value: >-
BTsjGRI+AuALAQPlBj4CQAFAB+ALA0ABQBfgAwFAD8AD4AMB4BMTQBsF/507IykJIAcA/+ACBwIJPgI=
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.
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.
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.