# IR Blaster Tasmota openhab

**URL:** <https://community.openhab.org/t/ir-blaster-tasmota-openhab/130700>\
**Category:** Off-Topic\
**Tags:** irblaster, openhab3\
**Created:** [December 27, 2021, 7:23pm UTC](https://community.openhab.org/t/ir-blaster-tasmota-openhab/130700 "2021-12-27T19:23:12Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Othersider](https://community.openhab.org/user_avatar/community.openhab.org/othersider/32/84983_2.png) [@Othersider](https://community.openhab.org/u/Othersider)\
**Post date:** [December 27, 2021, 7:23pm UTC](https://community.openhab.org/t/ir-blaster-tasmota-openhab/130700/1 "2021-12-27T19:23:12Z")

</div>

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!!

---

<div class="post-metadata">

**Author:** ![Fleck](https://community.openhab.org/letter_avatar_proxy/v4/letter/f/5e9695/32.png) [@Fleck](https://community.openhab.org/u/Fleck)\
**Post date:** [December 27, 2021, 11:15pm UTC](https://community.openhab.org/t/ir-blaster-tasmota-openhab/130700/2 "2021-12-27T23:15:04Z")

</div>

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 Value`and `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}');`

---

<div class="post-metadata">

**Author:** ![Othersider](https://community.openhab.org/user_avatar/community.openhab.org/othersider/32/84983_2.png) [@Othersider](https://community.openhab.org/u/Othersider)\
**Post date:** [December 29, 2021, 11:31am UTC](https://community.openhab.org/t/ir-blaster-tasmota-openhab/130700/3 "2021-12-29T11:31:24Z")

</div>

Thank you very much !!!

---

<div class="post-metadata">

**Author:** ![system](https://community-openhab-org.s3-eu-central-1.amazonaws.com/original/2X/6/6a52f2ac5d00e4c7b50471a354b3a9221188be90.png) [@system](https://community.openhab.org/u/system)\
**Post date:** [February 10, 2022, 6:21am UTC](https://community.openhab.org/t/ir-blaster-tasmota-openhab/130700/5 "2022-02-10T06:21:56Z")

</div>

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