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

The Broadlink Binding works fine … thanks to all who worked on this binding.

I have a question to the community:
Is there somewhere a mapfile for following devices for download?

  • TV Sony KDL-32NX800 (Bravia)
  • UPC Horizon TV Box

Hi guys

Please help me guys, i am driving a little bit crazy. i am sure that i am missing a small thing.

i have setup the items as below:

String TV_Salon 		"TV"			Switch			{ channel="broadlink:rm3:34-ea-34-c7-76-86:command" }
String Clim_Salon 		"Salon Clim"	Switch			{ channel="broadlink:rm3:34-ea-34-c7-76-86:command" }
String Terrasse			"Terrasse"		Switch			{ channel="broadlink:rm2:34-ea-34-c7-c9-15:command" }
String Appliques		"Appliques"		Switch			{ channel="broadlink:rm2:34-ea-34-c7-c9-15:command" }0
Switch Presence_Noya	"Noya Mobile" 	<network>		{ channel="network:device:192_168_1_7:online" }
Switch Presence_Gil		"Gil Mobile"	<network>		{ channel="network:device:192_168_1_3:online" }
Number TheTemperature	"TheTemperature					{ channel="zwave:device:636ab149:node2:sensor_temperature" }
Number Thebattery_level	"battery_level"					{ channel="zwave:device:636ab149:node2:battery-level" }
Switch Themotion		"Themotion"						{ channel="zwave:device:636ab149:node2:alarm_motion" }

and also the site map as below:

sitemap SMH label="it will work"
{
	Switch item=TV_Salon					label="TV" mappings=[TV_Salon_ON="On", TV_Salon_OFF="Off"]
	Switch item=Clim_Salon					label="Clim salon" mappings=[Clim_Salon_ON="On", Clim_Salon_OFF="Off"]
	Switch item=Terrasse					label="terrasse" mappings=[Terrasse_POWER_ON="On", Terrasse_POWER_OFF="Off"]
	Switch item=Appliques					label="applique" mappings=[Appliques_POWER_ON="On", Appliques_POWER_OFF="Off"]
	Switch item=TV_LIVINGROOM				label="Broadlink RF" mappings=["TEST_POWER_ON"="On", "TEST_POWER_OFF"="Off"]
	Switch item=Presence_Noya				label="Noya's Mobile"	
	Switch item=NetworkDevice19216817Noya_Online label="NetworkDevice19216817Noya_Online"
	Switch item=Presence_Gil 				label="Gils Mobile"
	Switch item=Gil1921681103_Online 		label="Gils Gil1921681103"
	Switch item=Themotion 					label="Themotion"	
	Text item=TheTemperature				label="Temperature en C"	
	Text item=Thebattery_leveL				label="Battery Sensor"
	Text item=ZWaveNode2FGMS001MotionSensor_BatteryLevel label="Battery Sensor"
	Text item=ZWave_SensorTemperature label="ZWave_SensorTemperature Temperature en C"
}

the Sitemap is well displayed

but for each click, i am getting :

2017-12-31 16:03:50.810 [WARN ] [basic.internal.render.SwitchRenderer] - Cannot determine item type of 'Clim_Salon’
org.eclipse.smarthome.core.items.ItemNotFoundException: Item ‘Clim_Salon’ could not be found in the item registry
at org.eclipse.smarthome.core.internal.items.ItemRegistryImpl.getItem(ItemRegistryImpl.java:148)[98:org.eclipse.smarthome.core:0.9.0.b3]
at org.eclipse.smarthome.ui.internal.items.ItemUIRegistryImpl.getItem(ItemUIRegistryImpl.java:610)[136:org.eclipse.smarthome.ui:0.9.0.b3]
at org.eclipse.smarthome.ui.basic.internal.render.SwitchRenderer.renderWidget(SwitchRenderer.java:57)[176:org.eclipse.smarthome.ui.basic:0.9.0.b3]
at org.eclipse.smarthome.ui.basic.internal.render.PageRenderer.renderWidget(PageRenderer.java:166)[176:org.eclipse.smarthome.ui.basic:0.9.0.b3]
at org.eclipse.smarthome.ui.basic.internal.render.PageRenderer.processChildren(PageRenderer.java:128)[176:org.eclipse.smarthome.ui.basic:0.9.0.b3]
at org.eclipse.smarthome.ui.basic.internal.render.PageRenderer.processPage(PageRenderer.java:92)[176:org.eclipse.smarthome.ui.basic:0.9.0.b3]
at org.eclipse.smarthome.ui.basic.internal.servlet.WebAppServlet.service(WebAppServlet.java:150)[176:org.eclipse.smarthome.ui.basic:0.9.0.b3]
at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:812)[81:org.eclipse.jetty.servlet:9.2.19.v20160908]
at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:587)[81:org.eclipse.jetty.servlet:9.2.19.v20160908]
at org.ops4j.pax.web.service.jetty.internal.HttpServiceServletHandler.doHandle(HttpServiceServletHandler.java:71)[172:org.ops4j.pax.web.pax-web-jetty:4.3.0]
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)[80:org.eclipse.jetty.server:9.2.19.v20160908]
at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:577)[79:org.eclipse.jetty.security:9.2.19.v20160908]
at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:223)[80:org.eclipse.jetty.server:9.2.19.v20160908]
at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127)[80:org.eclipse.jetty.server:9.2.19.v20160908]
at org.ops4j.pax.web.service.jetty.internal.HttpServiceContext.doHandle(HttpServiceContext.java:287)[172:org.ops4j.pax.web.pax-web-jetty:4.3.0]
at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515)[81:org.eclipse.jetty.servlet:9.2.19.v20160908]
at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185)[80:org.eclipse.jetty.server:9.2.19.v20160908]
at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061)[80:org.eclipse.jetty.server:9.2.19.v20160908]
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)[80:org.eclipse.jetty.server:9.2.19.v20160908]
at org.ops4j.pax.web.service.jetty.internal.JettyServerHandlerCollection.handle(JettyServerHandlerCollection.java:80)[172:org.ops4j.pax.web.pax-web-jetty:4.3.0]
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97)[80:org.eclipse.jetty.server:9.2.19.v20160908]
at org.eclipse.jetty.server.Server.handle(Server.java:499)[80:org.eclipse.jetty.server:9.2.19.v20160908]
at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:311)[80:org.eclipse.jetty.server:9.2.19.v20160908]
at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257)[80:org.eclipse.jetty.server:9.2.19.v20160908]
at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:544)[72:org.eclipse.jetty.io:9.2.19.v20160908]
at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635)[83:org.eclipse.jetty.util:9.2.19.v20160908]
at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555)[83:org.eclipse.jetty.util:9.2.19.v20160908]
at java.lang.Thread.run(Thread.java:748)[:1.8.0_141]
2017-12-31 16:03:50.857 [ERROR] [ui.internal.items.ItemUIRegistryImpl] - Cannot retrieve item ‘Clim_Salon’ for widget org.eclipse.smarthome.model.sitemap.Switch
2017-12-31 16:03:50.862 [ERROR] [ui.internal.items.ItemUIRegistryImpl] - Cannot retrieve item for widget org.eclipse.smarthome.model.sitemap.Switch
2017-12-31 16:03:50.868 [ERROR] [ui.internal.items.ItemUIRegistryImpl] - Cannot retrieve item for widget org.eclipse.smarthome.model.sitemap.Switch
2017-12-31 16:03:50.874 [ERROR] [ui.internal.items.ItemUIRegistryImpl] - Cannot retrieve item for widget org.eclipse.smarthome.model.sitemap.Switch
2017-12-31 16:03:50.879 [ERROR] [ui.internal.items.ItemUIRegistryImpl] - Cannot retrieve item ‘Clim_Salon’ for widget org.eclipse.smarthome.model.sitemap.Switch
2017-12-31 16:03:50.894 [ERROR] [ui.internal.items.ItemUIRegistryImpl] - Cannot retrieve item ‘Clim_Salon’ for widget org.eclipse.smarthome.model.sitemap.Switch
2017-12-31 16:03:50.899 [ERROR] [ui.internal.items.ItemUIRegistryImpl] - Cannot retrieve item ‘Clim_Salon’ for widget org.eclipse.smarthome.model.sitemap.Switch
2017-12-31 16:03:50.904 [WARN ] [basic.internal.render.SwitchRenderer] - Cannot determine item type of ‘Terrasse’
org.eclipse.smarthome.core.items.ItemNotFoundException: Item ‘Terrasse’ could not be found in the item registry

what i am missing ???

thanks!

the broadlink.map file?

1 Like

TEST_POWER_ON=e9144600df090916160909160916160909160916160916091609160909161609160909161609160916090916160909161609091616090916091616090916160916091609160909000148e9144600df090916160909160916160909160916160916091609160909161609160909161609160916090916160909161609091616090916091616090916160916091609160909000148e9144600df090916160909160916160909160916160916091609160909161609160909161609160916090916160909161609091616090916091616090916160916091609160909000148e9144600df090916160909160916160909160916160916091609160909161609160909161609160916090916160909161609091616090916091616090916160916091609160909000148
TEST_POWER_OFF=e9144600df090916160909160916160909160916160916091609160909161609160909161609160916090916160909161609091616090916091616090916160916091609160909000148e9144600df090916160909160916160909160916160916091609160909161609160909161609160916090916160909161609091616090916091616090916160916091609160909000148e9144600df090916160909160916160909160916160916091609160909161609160909161609160916090916160909161609091616090916091616090916160916091609160909000148e9144600df090916160909160916160909160916160916091609160909161609160909161609160916090916160909161609091616090916091616090916160916091609160909000148
WALL_POWER_ON =
e9144600df090916091609161609160916090916160909160916091609160916160916090916160909160916091609161609091616091609091609161609160916090916160909000148

WALL_POWER_OFF =
e9144600df090916160909160916160909160916160916091609160909161609160909161609160916090916160909161609091616090916091616090916160916091609160909000148

AC_ROOM_ON_MINI =
2600b800677f411f213e423d412020201f1f221e213e421e211f211f2020201f211f211e211f211e211f211f201f211f2020211f1f201e21211f21201d4141205f83411f1e4041403d211f211f21211f1f40411f1e2121201d2121201e211e211f2121201d211f211f21201f21201f20211f1f201e22201f1f41401f63813f1f213f403f421e201f211f21201d414120201e221e2020211e221e211f211e211f2020201f221e21201f1f211f211f211f211e211f213f401f82000d05

AC_ROOM_OFF_MINI =
2600b800677f411f213e423d412020201f1f221e213e421e211f211f2020201f211f211e211f211e211f211f201f211f2020211f1f201e21211f21201d4141205f83411f1e4041403d211f211f21211f1f40411f1e2121201d2121201e211e211f2121201d211f211f21201f21201f20211f1f201e22201f1f41401f63813f1f213f403f421e201f211f21201d414120201e221e2020211e221e211f211e211f2020201f221e21201f1f211f211f211f211e211f213f401f82000d05
Appliques_POWER_ON=b20734000c240c24240c240c240c0c240d23240d240d240c240c240c0d240d230d23240c0d240c00016a240c0c230d23240c240c240c240c00000000
Appliques_POWER_OFF=b20634000d240d23240c240c240c240c0d240c24240c240c240c0c240c23240c240c240d240d240c0c240c230d230d24240c0c00016a240c00000000
Terrasse_POWER_ON=
e9144600df090916160909161609160909160916091616090916091609160916160916090916091616090916160909161609091609161609091616090916091616090916160909000148
Terrasse_POWER_OFF=e9144600df090916091616091609091616090916160916090916160916090916091616091609091616090916160909160916160909161609160909160916091609161609160909000148
Clim_Salon_ON=
2600b8005d81404020202020202040202020202020202040404020204020202020202020202020202020202020202020202020202020202020202020204040205d81404020202020202040202020202020202040404020204020202020202020202020202020202020202020202020202020202020202020204040205d81404020202020202040202020202020202040404020204020202020202020202020202020202020202020202020202020202020202020204040207b000290
Clim_Salon_OFF=
2600b8005d81404020202020202040202020202020202040404020204020202020202020202020202020202020202020202020202020202020202020204040205d81404020202020202040202020202020202040404020204020202020202020202020202020202020202020202020202020202020202020204040205d81404020202020202040202020202020202040404020204020202020202020202020202020202020202020202020202020202020202020204040207b000290
TV_Salon_ON=2600460094921437133713371312131213121312131213371337133713121312131213121312131213371337131213121337133713371337131213121337133713121312131213000d050000
TV_Salon_OFF=26008c009392143415331533150f14101410140f140f153315341434150e150f150f140f15101433150f1410140f150f140f150f150f140f15331534153314341533153315331500063a9491153414341533150f140f150f150f140f153315341533150f140f150f140f150f1533150f1410140f150f1410140f150f1410143415331533153315331533153415000d05000000000000000000000000

Any ideas gentlemen?

Try to use only one Broadlink item per Broadlink device. I have only one String item, no definition as Switch:

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

The sitemap definition looks ok to me.

Holger

HI,
I updated to OH2.2 stable today… after that the thing is shown as ‘uninitialized’ in PaperUI. I made no changes to any of my config files nor updated any files… just

apt-get update && apt-get upgrade

on my debian stretch distro…

tried to manually edit the thing but with no success ;(

I’m not able to set Key and IV in PaperUI and if I start searching for things manually the broadlink binding isn’t even listed now.
Is there a never Version or any known issues why the binding stopped working now??
Please Help

Cheers,
Dan

Edit: I use

org.openhab.binding.broadlink-2.2.0-BETA2.jar

in my addons folder.
Openhab updated to 2.2.0.1.
with openhab 2.1 stable everything worked fine…

Hi carlos, how to get the bindings. Im new here and seems like this is a long thread already. Im trying to setup openhab on raspi3 thinking of binding broadlink rm pro+ then maybe link google home with open hab and control it from there. Any ideas?

google for broadlink key and you’ll find a github link where someone pasted the keys
like “0x09, 0x76, 0x28, 0x34…” and you’ll want the ‘09762834…’

Same here… mine isn’t working anymore…
How do I go back to previous version?

even in my old VM… same deal… the Broadlink Thing is offline

Let’s wait for CATO

EDIT : my RM2 and RM3 is now online again. just removed and added

IT’S ALIVE

Got this strange behaviar too here… after restarting OH several times the broadlink binding reappeared in PaperUI and I was able add the thing manually… WTF??? I’m testing right now - with no errors… hopefully persistant

cheers Dan

Hi Cato,

First of all, thanks a lot for your contribution, It’s really great to be able to include my existing SP3 plugs and my coming RM3 mini to the home system I’m starting to build. I thought I had to throw them and start over with new z wave ones, what are very expensive

Do you have any plan to add support for SC1 switch?

Carlos

1 Like

Thanks to the many people that have posted tips and advice in this post already. They really helped me getting this up and running. Works great out of the box in BasicUI, but the thing I struggled with is also getting it to work in PaperUI. Which was required so that I could control items via Homekit.

So this is what I ended up doing. OpenHAB 2.2 on RaspberryPi and RM3. Please note I’m still new to OpenHAB so it may not be the best way, but it works for me.

The setup instructions define a string in the .items file and a switch in the .sitemap file.
The problems I had were 1) switches defined in .sitemap are not displayed in PaperUI (the string defined in .items is but it cannot be interacted with) and 2) switches defined in .items only return “ON” or “OFF” which generates the error “2018-01-14 16:53:25.715 [WARN ] [rm.AbstractFileTransformationService] - Could not transform ‘OFF’ with the file ‘broadlink.map’ : Target value not found in map for ‘OFF’” when sent to the broadlink binding.

So the solution define a switch in .items and use a rule to transform the commands it sends to the corresponding commands in the broadlink.map file.

Example shows a single on/off switch. Clicking the switch in PaperUI triggers the script, which matches the command (e.g. ON to FogBox_ON) and sends that command to the main broadlink switch which sends the appropriate command from the broadlink.map file.

broadlink.map
FogBox_ON = 2600500000012b96 …
FogBox_OFF = 2600500000012b96141…

fogbox.map
ON = FogBox_ON
OFF = FogBox_OFF

default.items
String BroadlinkStudy “Broadlink” { channel=“broadlink:rm3:34-ea-34-40-8e-11:command” }
Switch BroadlinkStudySwitch “FogBox” { channel=“broadlink:rm3:34-ea-34-40-8e-11:command” }

default.sitemap
sitemap default label=“My Home” {
Frame label=“Broadlink” {
Switch item=BroadlinkStudy label=“Power” mappings=[FogBox_ON=“ON”, FogBox_OFF=“OFF”]
}
}

default.rules
rule "FogBox rule"
when
Item BroadlinkStudySwitch received command
then
var String new_command = transform(“MAP”,“fogbox.map”,receivedCommand.toString)
BroadlinkStudy.sendCommand(new_command)
end

It’s not an ideal solution for a complicated setup since it requires defining a switch specific map file and a switch specific rule for each binary switch. Plus I’m not sure if it’s extendable to multi-function control.

It also still generates the error noted above because the ON/OFF is still sent to the broadlink channel. Note that the switch defined in .items doesn’t have to be linked to the broadlink channel because the rule sends the actual commands, but there doesn’t seem to be a null channel and it has to be linked to some channel to work in PaperUI.

Hey @cybertec02 you must download the binding and search for things, I’ll contact you tomorrow by PM and send you the little tutorials that I made to keep around just in case.

BTW, I’m having a little trouble here, when I restart my OpenHab raspberry pi, I have to type the parameters (Authentication Key, IV and MAC) again each time, any way to add this manually so I don’t struggle with this every time I restart my system?

I need a little help from you guys, i was only using the broadlink to read some temp, while I have the time to sit down and put some new stuff, and I followed the instructions closely, and it´s not working :’(

so here are my scrips, please give me a hand!!!

Sitemap:

sitemap home label="HOME"
{
	Frame label="Sonoff Power Strip"
	{
       	Switch item=Room1MainLightSonoff
	}
	
	Frame label="Livingroom"
	{
		Text item=BLRMP_TEMP label="Temperature [%.2f °C]" icon="Temperature"
		Switch item=TV_LIVINGROOM label="Power" mappings=[PANASONIC_TV_ON="ON", PANASONIC_TV_OFF="OFF"]
	
       	Switch item=TPL1_Switch label="Hallway Light" icon="Light"
//      Text item=TPL1_RSSI label="Signal [%d dBm]" icon="network"
		
		Switch item=TPL2_Switch label="Kitchen Light" icon="Light"
 //     Text item=TPL2_RSSI label="Signal [%d dBm]" icon="network"
 
		Switch item=TPL3_Switch label="Livingroom Light" icon="Light"
//      Text item=TPL3_RSSI label="Signal [%d dBm]" icon="network"
		
		Switch item=TPL4_Switch label="Diningroom Light" icon="Light"
 //     Text item=TPL4_RSSI label="Signal [%d dBm]" icon="network"
	}
	
	
	
	
}

Items:

//Broadlink RM Pro
Number BLRMP_TEMP "Temperature [%.2f °C]" (gChart3) { channel="broadlink:rm2:xxxxxxxxxxxxxxxxx:temperature" }
String TV_LIVINGROOM "TV" { channel="broadlink:rm2:34-xxxxxxxxxxxxxxxx:command" }

broadlink.map

PANASONIC_TV_ON=00000071000000320080003F00100010001000300010001000100010001000100010001000100010001000100010001000100010001000100010001000100010001000300010001000100010001000100010001000100010001000100010001000100010001000100010003000100010001000100010001000100010001000100010001000100010001000100010001000100030001000300010003000100030001000300010001000100010001000100010003000100030001000300010003000100030001000100010003000100A98
PANASONIC_TV_OFF=00000071000000320080003F00100010001000300010001000100010001000100010001000100010001000100010001000100010001000100010001000100010001000300010001000100010001000100010001000100010001000100010001000100010001000100010003000100010001000100010001000100010001000100010001000100010001000100010001000100030001000300010003000100030001000300010001000100010001000100010003000100030001000300010003000100030001000100010003000100A98

thanks in advance

Hi @carloszacu,
would be great if you can send me also the pm for installing and configuring your great binding!
Thanks in advance
Ralph

I´m runing openhab 2.1 do you know maybe the right path to place the broadlink.map file?

Hi,
Im a newbie to openhab and am looking for this interessting binding. Can’t find it in Paper UI so where can I download it? I’m running the actual openHABIAN image on a PI2…
Thanks for any advise and thanks to @Cato_Sognen for the great work…
Regards
Ralph

1 Like

@Cato_Sognen, this binding works fantastic. Thank you very much for your great effort and enabling everyone to integrate broadlink devices with openhab2. I can now successfully use RM & RM Pro with openhab2. However any update about Broadlink S1C integration with openhab2. I am waiting for your next version of binding which enables S1C or S2-hub to be integrated with openhab2.

Thanks,
KChak

1 Like

FYI: google just added support for the Broadlink service and it works now with their devices through google home. Can’t an official binding tap into this also? https://i.redd.it/pvw9j9fuqqa01.jpg

1 Like