IR Blaster Tasmota openhab

Hello guys i just bought a BW-RC1 IR Blaster and i want to connect it with my openhab.My irblaster has tasmota and i have configure mqtt…i think, but i dont know how to make a thing -channel that send the right ir code .The console on tasmota when i push the power button it shows me something like that
{“IrReceived”:{“Protocol”:“NEC”,“Bits”:32,“Data”:“0x20DF48B7”,“DataLSB”:“0x4FB12ED”,“Repeat”:0}}
Can someone tell me how to create an item-channel that will trigger my ir to send this command??

Thank you!!

There are multiple ways you can achieve this:

  1. Create a channel which only sends this one command and nothing else. Can be used in combination with a switch item, linked to this channel. For a power button this is probably the best approach.
    In the Thing configuration, in the “Channels” Tab, click Add channel, make it an On/Off switch type and tick the Show advanced checkbox.
    Leave the MQTT state Topic empty. Enter something like cmnd/YourTasmotaDevice/IRsend in the MQTT command Topic. Enter the text to send (in your case: {“Protocol”:“NEC”,“Bits”:32,“Data”:“0x20DF48B7”,“DataLSB”:“0x4FB12ED”,“Repeat”:0} in both Custom ON/Open Valueand Custom Off/Closed Value. (If you have different IR codes for ON and OFF you can use those. Some TVs have that, some don’t)
    That’s all for the Thing definition. Now bind a switch item to the channel and you should be able to toggle the item to send the IR command via your Tasmota blaster.

  2. For sending IR commands from a rule (as opposed to e.g. a switch item as above) you do not even need a channel. Send commands from a rule of type “Javascript” with the command:
    actions.get("mqtt", "mqtt:broker:<YourMQTTThingName>").publishMQTT("cmnd/<YourTasmotaName>/IRSend", '{"Protocol":"NEC","Bits":32,"Data":"0x20DF48B7","DataLSB":"0x4FB12ED","Repeat":0}');

2 Likes

Thank you very much !!!

This topic was automatically closed 41 days after the last reply. New replies are no longer allowed.