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

I’m also keen for this binding, can test on a Synology NAS with OpenHAB2 and RM Mini3.

Is this project dead? Im considering buying a rm mini 3 but i’d like to know if i can get it to work with openhab?

Hello!

If you are considering buying it, you can use Python script I’ve made via Exec binding. It’s not as easy to use as binding, but it allows you to include RM3 mini into OH setup. Since RM3 mini is really cheap, it’s the best way to include IR devices into OH.

You can find a topic about the Python script here:

and the code is located here:

Hope this helps.

Best regards,
Davor

1 Like

Thanks @davorf i’ll definitely check it out. Though it seems a little bit too complicated for me but that doesn’t mean i shouldn’t try.

Any news about the binding?
i would like to test it :slight_smile:

1 Like

would be interested

Hi, I’m very interested in the binding as currently I use RM Pro to control Livolo switches. The Broadlink’s app is not user friendly! I want to use OpenHAB to control the switches via RM Pro but binding is missing.

Pls share your work with us!
thanks!
Pedro

Hi @Cato_Sognen,

after initial enthusiasm you seem to have gone silent. Please let us know if you are still pursuing this and people can join your beta or if you are unable to for some reason. I’m sure we’ll understand if not but the unknowing is the problem. Thanks.

Today I got my RF blinds working with OH2+Broadlink RM Pro.

It is possible to control Broadlink Pro using this Python library https://github.com/mjg59/python-broadlink and the exec binding (http://docs.openhab.org/addons/bindings/exec/readme.html).

Next step is to use the IR to control AC and TV. As it is the same process, I think it´ll be easy to accomplish.

If someone has interest I can detail the steps and try to help.

2 Likes

@Botura as you got the RMPro working I’m very interested! I plan on using its RF capabilities to send commands to various devices. Obviously I have it working using the Broadlink app. Any help in the initial RMPro/OpenHab set up is most welcome.

@Botura finally managed to get your library installed. My openhabian version didn’t seem to recognise setuptools which I fixed by installing pip.

Setup went well and I used 3 python scripts from the domoticz board for RM to scan, learn codes, and play back codes. Both IR and RF. So far only in the shell. Openhab next.

So what’s left is

  1. figure out how to set up the Exec binding
  2. capture the codes from the Broadlink TC2.
  3. see if I can get homekit to recognise the Exec bindings. Although iOS home app sees a Samsung TV I set up and Siri recognises the name, Home will switch it off but Siri won’t. Got to figure that out.

Thanks a ton for your code. Note a native binding but very cool and can be used elsewhere due to Python.

Hi @r4m235, this library is not mine, I just found it and realize that it can be used with OH…

Great that you have everything working in the shell.

Here is an example of how to setup OH. I had to use rules because I´m using rollershutter.

// things
Thing exec:command:openBlind1 [command="python /etc/openhab2/broadlink/cli/broadlink_cli --device @/etc/openhab2/broadlink/cli/mb/broadlink1.device --send @/etc/openhab2/broadlink/cli/mb/blind1.open", interval=0]
Thing exec:command:closeBlind1 [command="python /etc/openhab2/broadlink/cli/broadlink_cli --device @/etc/openhab2/broadlink/cli/mb/broadlink1.device --send @/etc/openhab2/broadlink/cli/mb/blind1.close", interval=0]
Thing exec:command:stopBlind1 [command="python /etc/openhab2/broadlink/cli/broadlink_cli --device @/etc/openhab2/broadlink/cli/mb/broadlink1.device --send @/etc/openhab2/broadlink/cli/mb/blind1.stop", interval=0]


// items
Switch openBlind1 { channel="exec:command:openBlind1:run"}
Switch closeBlind1 { channel="exec:command:closeBlind1:run"}
Switch stopBlind1 { channel="exec:command:stopBlind1:run"}
Rollershutter Blind1 "Blind 1"

// Sitemap
Switch item=Blind1


//rules
rule "Send commands to blind 1" 
when 
Item Blind1 received command
then
if (receivedCommand == UP)
	openBlind1.sendCommand(ON)
else if (receivedCommand == DOWN)
	closeBlind1.sendCommand(ON)
else
	stopBlind1.sendCommand(ON)
end
2 Likes

To capture codes I´m using the broadlink_cli file that is included in the github link.

sudo python /etc/openhab2/broadlink/cli/broadlink_cli --device @broadlink1.device --learnfile ./samsung.ch_up

Where broadlink1.device is a text file containing type, IP and MAC of broadlink:

0x2712 192.168.0.4 34EA34F43AC0p
1 Like

@Botura I’m using the scan, learn, and send scripts from here: http://www.domoticz.com/forum/viewtopic.php?f=17&t=6929&hilit=broadlink&start=100#p103517

I’ve added the Things and Items as per your info and they appear in PaperUI in Things, but each with a name of “Command”. If I try to edit the name (or location) I get an error “ERROR: 409 - conflict” and the update doesn’t stick. Do you have the same issue? Same error if I try to change the repeat interval. I wanted to change the interval because otherwise the command seems to repeat eg. a command is send to switch LED lights on, another command is sent to switch LED lights off, and these repeat every 60 seconds (default setting). I’m interested if you also had this and solved it.

edit: the conflict was because you can’t use text files and the UI for configuring the same items - live and learn :slight_smile: SO I configured the names, locations, intervals in the text file and it works.

Hello!

You can try my script to control Broadlink devices. It started as RM3 Mini script, but it could be used with RM Pro, and some other Broadlink devices too. It incorporates learning and sending codes in one script, and it uses python-broadlink library:

https://github.com/davorf/BlackBeanControl

There is a topic about controlling broadlink devices located here:

https://community.openhab.org/t/broadlink-black-bean-rm-3-mini-ir-controller-integration-in-openhab/11453?u=davorf

Best regards,
Davor

2 Likes

HI,
I am new to OpenHab and have gone through the steps here
http://blinkingled.cc/broadlink-black-bean-rm-3-mini-ir-controller-with-openhab/

to set up the Broadlink device.
I can execute the python script to turn on and off the device this is all working fine. I have installed Exec Binding.
However, I can’t get the python script to be executed by OpenHab. Not sure what I am doing wrong

Items file has this line
Switch HeaterSwitch "Heater" <fire> {exec=">[ON:python /usr/share/openhab2/exec/BlackBeanControl/BlackBeanControl.py -c HeaterON] >[OFF:python /usr/share/openhab2/exec/BlackBeanControl/BlackBeanControl.py -c HeaterOFF]"}

My sitemaps file has this
Switch item=HeaterSwitch

I can execute the
python /usr/share/openhab2/exec/BlackBeanControl/BlackBeanControl.py -c HeaterON

From any directory on the PI so it is not a path or permissions issue.

Installed the Exec binding through PaperUI.

Not sure if I am missing a step here

thanks

Thanks very much!
Works great!

Assuming you are using oh2, I think you must use things with the exec binding. It was not necessary with oh1.

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