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

With the oh2 I would recommend to just remove the new exec binding and install the legacy one. It is rather complicated to have the new binding execute different things on switch on and off state.

1 Like

Hi
not sure how to do that.
I added the Exec binding though Paper UI.
Are you saying to disable that. and setup a manual binding.

How do I do that?

sorry still a OPenHab Noob

In Paper UI you have to enable legacy bindings under Configuration - System - Add-on Management. After that you can find the old exec binding in the addon manager. Install that after you have removed the new exec binding.

Thanks. Fixed it…

Hi,
Apologies for the delay. I had to focus on other more critical and important things for awhile.
I’ll be posting the beta broadlink addon later tonight after I have written down some instructions on how to get it working.

Cato

4 Likes

Hi all,
Under you can find the links to download a Broadlink binding together with instructions on how to get it working on your system. Supported devices in this version are:

• RM and RM2 - IR and RF transmitter with temperature sensor and Wi-Fi connectivity
• RM3 - IR transmitter with Wi-Fi connectivity
• A1 - multi sensor that can detect temperature, humidity, illumination, background noise and air quality

In addition, it includes code to support three kinds of smart sockets (listed under). Since I don’t have any of these they are untested and may not work.

Drop me a message if you have any of these devices and are interested in working with me to get them working with the binding.

• SP1 - smart socket with Wi-Fi connectivity
• SP2 - as above with addition features
• MP1 - four port power strip with Wi-Fi connectivity

Also, with this being the first version I do expect there will be issues. Please post whatever problems you are having and I will do my best to sort them out.
The binding can be downloaded here: (see later post for latest version) Once downloaded, place it in your openhab/addons folder.

Step by Step

Step 1: Inside openhab go to your Inbox and search for devices using the Broadlink binding. If the binding does not find your devices make sure that they are on the same network and are online.

Step 2: For each found device click on the “Add” button to add it as a thing.

Step 3: Go to your Thing screen under Configuration and click on the device you added above.

Step 4: For each device you are required to enter a common Authentication Key and IV parameter. These were obtained and shared by someone who reversed engineered the protocol and such due to legal reason I cannot post these two items here. If you do not have these two then Google is your friend. Both need to be entered in hex string format by omitting the 0x. For example, if the key is something like 0x09, 0x76, 0x28… you will enter this as 097628… Once done, you should have two hex strings, each with a length of 32 characters.

Step 5: For RMx devices only. The Map file refers to the file that holds the IR/RF codes. It defaults to broadlink.map but you can change it to something else if you prefer. Go to your openhab/transform folder and create a broadlink.map file using your favourite text editor.

Step 6: For RMx devices only. In this step, we will find IR/RF code to insert into the broadlink.map file. Go to http://rm-bridge.fun2code.de/rm_manage/code_learning.html to learn the various IR/RF codes. After learning a function you should see something like this:

{“api_id”:1004,“command”:“send_code”,“mac”:“B4:43:0D:38:FA:9D”,“data”:“260068000001289314101312143513121411131213111411133613361510143614351336143614351411133615101411131213111313131014361412123712361436133615351435140005230001274815000c4d0001284a12000c4d0001284915000c4b00012a4814000d05”}
Insert the data string into the broadlink.map file together with the function. For example, I inserted the following line into broadlink.map for turning on my tv.

TV_POWER_ON = 260068000001289314101312143513121411131213111411133613361510143614351336143614351411133615101411131213111313131014361412123712361436133615351435140005230001274815000c4d0001284a12000c4d0001284915000c4b00012a4814000d05

Insert a new line for each of the function you want openhab to control.

Step 7: For RMx devices only. Create an item in your items file and add it to your sitemap.

item file:
String TV_LIVINGROOM “TV” { channel=“broadlink:rm2:b4-43-0d-38-fa-9d:command” }

sitemap file:
Switch item=TV_LIVINGROOM label=“Power” mappings=[TV_POWER_ON=“On”, TV_POWER_OFF=“Off”]

Next Steps:
• Resolve reported bugs
• Get this thing on GitHub
• Implement support for Broadlink Alarm Kit

Drop me a message if you are having any problems with the binding.

Cato

32 Likes

Will try soon.

Very good Binding !!

1 Like

Hi,

I forgot to mentioned in my post that the possible values for illumination, background noise and air quality are as follows:

Illumination
DARK
DIM
NORMAL
BRIGHT

Background noise
QUIET
NORMAL
NOISY
EXTREME

Air quality
PERFECT
GOOD
NORMAL
BAD

Cato

1 Like

this is always the same?
googles leads me to some wiresharked stuff only that looks wrong

I use the same keys for RM3 PRO and A1.
You have to provide them once for each thing You would like to add.

Great work!!! Applause! :slight_smile:
At the moment I can see only one bug after adding A1 and RM3 PRO.
When You change some settings in Configuration->Things->Broadlink RM or A1, for example, activate channel or change Thing location, status changes to Status: OFFLINE - COMMUNICATION_ERROR Could not control device IP.

The only way to get rid of this error is to add Thing again from the scratch.
I use OpenHab temporarly installation on Windows so maybe it has something to do only with my configuration - I really can’t tell.

Anyway this binding rocks!!!

ps. If You need any logs or need some more information to replicate this error just let me know.

1 Like

Hi,

Thanks Bartosz.

I’ll see if I can re-produce it on my system tomorrow and let you know if logs would help.

Cato

1 Like

Very nice work! The only thing is i dont know how to obtain the keys to actually get it working. I don’t see why posting a link to another guide would get any trouble, since you’re not releasing the reverse engineered protocol, or releasing anything by yourself. I think what im saying is that its like looking for a needle in a haystack if you dont know what you’re looking for.

pm sent

request PM as well. Thanks

@tbart
I was able to reproduce the bug reported. As you stated, the status changes to OFFLINE if changes are made to a thing. I’ll have a look at it later tonight and upload a new version soon.

While waiting for a fix, the workaround is as you mentioned to delete and add re-add the thing.

Cato

I’m not finding this via googling … can anyone help, please?

I use a RM3 Mini (from memory) with OH, and it was a pain to setup but works a treat now. I don’t use the python script, nor the binding (though I will if/when it comes out). I use the tcp/udp binding and careful map files for the commands to send to the Mini (it was a royal pain to prepare the signals for the OH map file)

1 Like

This is looking really good, can’t wait for my equipment to arrive so I can test :slight_smile:

Hi,

I understand that some of you are having problems with getting the RM Bridge site to grab your IR codes for the RM3/mini. I believe it says somewhere on the site that only RM1/2 is supported. However, since RM3 uses the same protocol you can make the site work by adding your RM3 manually. This is what I did a few minutes ago to add my RM3.

Installed RM Bridge on my phone, and entered the IP address as shown on the mobile screen. Remember to click the circle once to make it start.
Clicked Load Devices on the site
Entered RM3 (name field), mac address (MAC field) and RM2 (type field)
Clicked Add Manually button, and it showed up in the device field under.

I had try a few times before it worked. I used Chrome on Windows 10.

Cato

1 Like