Broadlink binding for RMx, A1, SPx and MP. Any interest?

Hi, I bought the Broadlink RM4 TV Mate, it works great and I hope you will consider including it between the supported.
The identification code is this:

Device identifying itself as '21001' (0x5209) is not currently supported.

Sorry for my stupid question, but could someone give me directions on how to install the binding to OH3?

@Mokamobile You download latest build from here Releases · themillhousegroup/openhab2-addons · GitHub. The jar file you downloaded should be copied to shared folder
e.g. through Windows Explorer.
You wrote you use OH3, so please make sure you find latest build for your version 3.0, 3.1 or 3.2b. Latest 3.2b1 should also work with 3.1.
Then access OpenHAB’s Things section, add new Thing with “+”, select “Broadlink” binding, use “Scan” to auto-detect your device.


Thanks, all clear, but still unsuccessful. Tried 2 versions ( org.openhab.binding.broadlink-3.2.0-SNAPSHOT.jar, as well as 3.1.0) - no binding found when adding things… may it be due to my openhabian installation? file owner setting?

Any way, grateful for your help

@Mokamobile openhabian is not an issue, but a good precondition for a reliable openHAB deployment. I use it successfully. Some more hints:

  1. The jar file /srv/openhab-addons/org.openhab.binding.broadlink-3.2.0-SNAPSHOT_b1.jar is running under openhabian:openhab ownerhip, chmod 664.
  2. I hope you know how to log into sudo openhab-cli console? What’s the output of bundle:list | grep "TP-Link"? The binding should be reported.
  3. Try to install from console, instead of copying jar file (make sure you 1st delete it from the shared folder): install Then find it listed with (#2) above. Maybe it requires start <id> to activate?

Hello and thanks for binding. Is there a way to add MCB1 relay to OH with this binding? I’ve tried to add it as SP1 thing, but OH only shows it’s online, doesn’t switch nor read it’s status.

This post was flagged by the community and is temporarily hidden.


Is there a way to enqueue a series of infrared commands in a sequence handled automatically by the broadlink binding?

I noticed that whenever I send a sequence of IR commands, I need to use a sleep command of 300-1500 miliseconds, otherwise some of the commands are not interpreted correctly by the receiver (therefore are skipped). I came up with these values after a series of trial-and-error attempts.

If I run the same sequence with the eschava/broadlink-mqtt daemon (written in python), all commands are queued nicely, regardless of the thread::sleep duration between two consecutive commands - it can be zero!

I have an old 5.1 speaker system which I am controlling via a Broadlink RM2 Pro device.
In order to re-create the preferred audio settings (bass, treble, volume level on each speaker), I am running a sequence of infrared commands captured from the original remote.

I have created a “virtual item” called v_microlab which I am using together with a rule to run the sequence at every power on.
I always start the speaker by powering up a smart plug, then I execute the IR sequence (I do this because I noticed the main unit’s radiator is always warm even when the speaker is in stand by so I prefer to power off the mains instead of putting the speaker system in stand-by).

Here is the rule sequence:

rule "big speaker macro ON"
        Item v_microlab received command ON
logInfo("big speaker macro","Running big speaker macro; command ON; sequence START...")
for(var i=1; i<6; i++) {
        logInfo("big speaker macro","===================iteration #" + i)
logInfo("big speaker macro","Running big speaker macro; command ON; sequence END.")

rule "big speaker macro OFF"
        Item v_microlab received command OFF
        logInfo("big_speaker.rules","big speaker power OFF")

Is it possible to implement a “queue management” algorithm that would allow sending a batch of IR commands without having to insert a thread.sleep(x) instruction between every 2 IR commands?

Thanks in advance


I have trouble installing the newest binding in my new set up OH3.1 installation with Openhabian.
I put the binding into the addons folder, but on system restart I get the following error:

2021-12-13 15:24:11.595 [WARN ] [org.apache.felix.fileinstall        ] - Error while starting bundle: file:/usr/share/openhab/addons/org.openhab.binding.broadlink-3.2.0-SNAPSHOT.jar
org.osgi.framework.BundleException: Could not resolve module: org.openhab.binding.broadlink [29]
  Unresolved requirement: Import-Package: org.openhab.core

What can I do to get it running?
Looking into the Main-UI the binding is not there.

@tlc you could use a state machine to walk through the delays. For example, see Washing Machine State Machine. Instead of relying on conditions to go from one state to the next, you could have timers. Then detect the state transitions in another rule and send the appropriate command on each transition. In the end I don’t know that it will be much better than what you have, but it would avoid the sleeps. I’m sure there are other better ways that someone will suggest.

Thanks for your suggestion, @jswim788.
For me, the current setup works fine as is now, with thread::sleep commands.
The issue is more a design one to me. Considering that any IR sending device and its corresponding receiver should itself be capable of enqueing, sending and interpreting successive IR commands (the same as you would hold your finger on Volume Up on your IR remote to do a significant volume increase and expect the receiver to act accordingly), I would expect the binding to have this capability as well.
This issue is not at all posing any problem (to me), but I would rather think of this enhancement as a “nice to have” feature that would simplify a lot any configuration that implies running a sequence of IR commands in a row.
Don’t get me wrong, I really appreciate the effort of the developer and I would say that this binding is a huge asset to everyone using OH and Broadlink devices together.

@themillhousegroup Will this binding be part of the next OpenHAB release 3.2?

Edit: Now that OH 3.2 is released, I see that the answer is “no”…


Hi John,
I waited a bit on this because I know you’ve been busy with a lot of other devices. I had a look in the Python library and I think my device is a BG1. That doesn’t appear as an option in the binding currently. Any chance that it could please?

You might need to make the binding “Active”:

  1. Log into your openhab console
  2. Type bundle:list | grep "Broadlink" and review the output. If the output contains Installed rather than Active, then
  3. Type bundle:start followed by the number that was listed in the command above, in my case the bundle number was 342, so my command was bundle:start 342
  4. Go back to your openHAB webUI and into your inbox, click the “+” to add a new thing and the option to pick a Broadlink thing should be present.

Can anybody help me to get the rf codes with my rm4pro? tried so many things but nothing worked

perhaps share what you have tried to save going over things unnecessarily

I have installed pip with python3 after that, you can follow this: GitHub - mjg59/python-broadlink: Python module for controlling Broadlink RM2/3 (Pro) remote controls, A1 sensor platforms and SP2/3 smartplugs

i have same isssue - send many commands without “sleep” to my RM3PRO… and it go offline (not responds on ping) but later recovering. To fix that i use sleep 500 between commands (its very bad that broadlink can handle all my commands queue on fast speed). But I noticed if i send infinite ping (ping 192.168.137.x -t) to broadlink, it holds a lot better and not going offline even with sleep 250. Can some one *check this idea?

PS is there a way how i can check in Rule is broadlink sending NOW something or it in Idle?? i want create protection to disable new commands sending when it already sends something

Hi @michnovka were you able to make it work with rm4 mini and openhab 3?
If rm4 mini is connected using the official app, then even a hard reset won’t work for the binding?

Hi Friends,

I’ve been using a Broadlink RM4 Pro for a while now with OpenHAB and the Broadlink Binding to control various devices with RF remotes.

I used Python-Broadlink to learn all of my devices remote RF codes and I’m able to control the devices, most of the time.
There is just one RF remote code that sometime fails to work when I send it as a command with OpenHAB using the Broadlink binding.

This is the code:

Has anyone an idea why this command code might fail sometimes?