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

I have the same issues, previously I used the exec binding with the python script method so my rule simply called the item in question:
Switch Woods_1 "Woods Plug 1" {exec=">[ON:python /etc/openhab2/BlackBeanControl/BlackBeanControl.py -c Woods_1_ON] >[OFF:python /etc/openhab2/BlackBeanControl/BlackBeanControl.py -c Woods_1_OFF]"}

Now I have the mapping file/broadlink items and sitemap set up as suggested and I can use the broadlink to control an RF switch via the Sitemap (On and Off buttons).
item file:
String Tree_ON "Christmas Tree ON" { channel="broadlink:rm2:34-ea-34-89-15-68:command" }
map file:

WOODS1_ON = 780522003b173b17133e3b17133e133e133e3b16133e133e133e133e133e3b161300018b133e000000000000
WOODS1_OFF = 78062200143d143d143d3c15143d143d143d143d3c151400018a143d3c163c15143d3c16143d000000000000

sitemap:
Switch item=Tree_ON label="Tree On" mappings=[WOODS1_ON="On", WOODS1_OFF="Off"]

But when I try to integrate this into a rule, I get the following errors:
Could not transform ‘ON’ with the file ‘broadlink.map’ : Target value not found in map for 'ON’
No entry for ON in map file ‘broadlink.map’ for thing Broadlink RM2 [192.168.10.133]

The rule I’m trying is:

rule "Morning - TREE ON"
when
 Time cron "0 42 8 * * ? *"
then
Tree_ON.sendCommand(OFF)
end

What am I missing?

You have to send the real value, not a mapped one, so please try

Tree_ON.sendCommand("WOODS1_ON")

or

Tree_ON.sendCommand("WOODS1_OFF")

Please keep in mind, that you are using strings, so the command must be a string.

Thanks Udo, I tried that now but it still gives me the same error message:
Could not transform ‘ON’ with the file ‘broadlink.map’ : Target value not found in map for 'ON’
No entry for ON in map file ‘broadlink.map’ for thing Broadlink RM2 [192.168.10.133]

It seems like the binding is looking for a specific mapping called ON or OFF, even though nothing in my rule/item file mentions this exact reference.

hey new guy here, can anyone pm me the Authentication Key and the IV please, I´m having trouble finding them.

Thanks in advance!

I found it!!! thanks

there’s a discount on the RM3 at amazon.co.uk today - £15.19

Did you ever figure this out? I’m unable to use the broadlink items in a rule, they only respond in a sitemap.

I have successfully binded my RM2 and SP2 device to openhab. However, i noticed that the status of the Things always flip flop between Online and Offine status as show in the screen below.

Inside the openhab.log, i noticed the following:

2017-12-17 12:26:18.547 [ERROR] [nk.handler.BroadlinkBaseThingHandler] - IO error for device ‘broadlink:rm2:34-ea-34-c7-8a-4f’ during UDP command sending: Socket is closed
2017-12-17 12:26:18.551 [ERROR] [nk.handler.BroadlinkBaseThingHandler] - IO error: Broadlink Device: Socket is closed
2017-12-17 12:26:48.593 [ERROR] [nk.handler.BroadlinkBaseThingHandler] - IO error: Broadlink Device: Socket closed
2017-12-17 12:27:18.652 [ERROR] [nk.handler.BroadlinkBaseThingHandler] - IO error: Broadlink Device: Socket is closed
2017-12-17 12:27:48.708 [ERROR] [nk.handler.BroadlinkBaseThingHandler] - IO error: Broadlink Device: Socket is closed
2017-12-17 12:28:18.760 [ERROR] [nk.handler.BroadlinkBaseThingHandler] - IO error: Broadlink Device: Socket is closed

Does anyone faces similar issue or is it just me?

Can anyone let me know whether the Auth Key is the same for all devices or they are unique to each device?

It’s the same.

Thanks for creating this binding, I am using it successfully. The RM3 is a great little cheap device for sending IR codes to various devices. I noticed this binding is still not included in the distribution release of OH 2.2. Is it because of intellectual property uncertainties?

I have the same problem with a SP2 OEM. @dmrch: Did you find a solution for this?

Unfortunately no. I had to use customized python scripts and implement logic in Node-red.

Hey,

thanks for the great binding! It works fine from the sitemap, but I have issues to control the Broadlink via rules.
I get the error “The method or field Broadlink is undefined”, but “Broadlink” is defined as Item and receives propper commands from the sitemap. Why is it not recognized in the rules?

Item:

String Broadlink "Broadlink" {channel="broadlink:rm3:34-ea-34-e3-d6-f3:command"}

Rule:

rule "test Broadlink"
when Item Node1REL1 received command ON
then
	sendCommand(Broadlink,"YZ2_MINUS")
end

Also Broadlink.sendCommand(“YZ2_MINUS”) does not work.
Any ideas?

Greetings, Holger

1 Like

Anyone successfully use RF codes with RM Plus on this? Have an RM3 which works well but want to replace my raspberry pi used for RF

Hi,

Just wondering, is YZ2_MINUS defined in the broadlink.map file?

Yes, YZ2_MINUS is defined in the broadlink.map file.
Meanwhile the rule is working, without any change. I only restarted OH due to other reason, and since then it is working…

same for me

I get the error
"2017-12-28 14:47:12.056 [ERROR] [nk.handler.BroadlinkBaseThingHandler] - IO error: Broadlink Device: Socket is closed"

At each startup.
Other than the log entry, the binding works well.

Hi, I have the Binding installed an it’s shown in Paper UI.
Active │ 80 │ 2.2.0.201707060032 │ Broadlink Binding
But my SP2 Switch State turns in short time to Off the Device not.
Power Consumption will never updated.
I’am running OH2.2 on RPI3 with Raspian.
Log Level is Debug
org.openhab.binding.broadlink │ DEBUG
But only the manual Item State Change to ON is shown in Log amd a few time later the Item State Change to OFF