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

not sure if RF is working as IR
but you will need a MAP file

the map file is in the maps folder (that i cant find right now… but its in the same folder as the addon folder)

in the map file you will need to put somthing like

FAN_ON = 4353463763734 (RF CODE)
FAN_OFF = 345345345345354

then when aproching the thing in the site map or where ever else you can ask for the FAN_ON
there also a way of giving the complete code but this is not good for humens :slight_smile:

1 Like

I recently bought a new device for sending RF (BroadLink - RM4 Pro):

[ERROR] [nding.broadlink.internal.ModelMapper] - Device identifying itself as '25755' (0x649b) is not currently supported. Please report this to the developer!
[ERROR] [nding.broadlink.internal.ModelMapper] - Join the discussion at https://community.openhab.org/t/broadlink-binding-for-rmx-a1-spx-and-mp-any-interest/22768/616

Thanks for the binding. Could anybody help? I am getting the following problem:

I installed the latest .jar version “org.openhab.binding.broadlink-2.5.1-SNAPSHOT.jar”. I could install the binding and recognized my RM3 hardware correctly. Then I created the item line:

String FF_Library_TV_Power “TV” {channel=“broadlink:rm3:34-ea-34-40-93-68:command”}

and sitemap line:

    Switch item=FF_Library_TV_Power label="TV Power" mappings=[TV_POWER_ON="On", TV_POWER_OFF="Off"]

Everything seems ok… BUT, when I click in basic UI, I get the folloging error in the log:

2020-11-26 23:48:02.648 [ERROR] [nal.common.AbstractInvocationHandler] - An error occurred while calling method ‘ThingHandler.handleCommand()’ on ‘org.openhab.binding.broadlink.handler.BroadlinkRemoteHandler@18c0088’: hexString needs to have an even length:

java.lang.IllegalArgumentException: hexString needs to have an even length:

at org.eclipse.smarthome.core.util.HexUtils.hexToBytes(HexUtils.java:105) ~[bundleFile:?]

at org.eclipse.smarthome.core.util.HexUtils.hexToBytes(HexUtils.java:119) ~[bundleFile:?]

at org.openhab.binding.broadlink.handler.BroadlinkRemoteHandler.lookupCode(BroadlinkRemoteHandler.java:127) ~[?:?]

at org.openhab.binding.broadlink.handler.BroadlinkRemoteHandler.handleCommand(BroadlinkRemoteHandler.java:94) ~[?:?]

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_262]

at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_262]

at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_262]

at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_262]

at org.eclipse.smarthome.core.internal.common.AbstractInvocationHandler.invokeDirect(AbstractInvocationHandler.java:152) [bundleFile:?]

at org.eclipse.smarthome.core.internal.common.InvocationHandlerSync.invoke(InvocationHandlerSync.java:59) [bundleFile:?]

at com.sun.proxy.$Proxy200.handleCommand(Unknown Source) [?:?]

at org.eclipse.smarthome.core.thing.internal.profiles.ProfileCallbackImpl.handleCommand(ProfileCallbackImpl.java:74) [bundleFile:?]

at org.eclipse.smarthome.core.thing.internal.profiles.SystemDefaultProfile.onCommandFromItem(SystemDefaultProfile.java:48) [bundleFile:?]

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_262]

at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_262]

at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_262]

at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_262]

at org.eclipse.smarthome.core.internal.common.AbstractInvocationHandler.invokeDirect(AbstractInvocationHandler.java:152) [bundleFile:?]

at org.eclipse.smarthome.core.internal.common.Invocation.call(Invocation.java:52) [bundleFile:?]

at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:1.8.0_262]

at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:1.8.0_262]

at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:1.8.0_262]

at java.lang.Thread.run(Thread.java:748) [?:1.8.0_262]

Could anybody help? Thanks!

hello everyone!

question:
is the latest version of the binding (maybe any version is… dunno) compatible with OH 3.0.M4?

I might have to migrate from OH.2.4m3 due to some new Z-Wave database devices, but i don’t want to loose this binding’s functionality… it’s been really solid.

Thanks @themillhousegroup for the amazing work, you’ve improved my home :slight_smile:

Hi Dario
To my understanding it is not yet ready at least I didn’t find anything.
I also used it under v2.5

Hey Dario,
You’re welcome!
Absolutely intending for this binding to get OH3.0 compatibility. The best way (I think…) would be to get it into the main OH codebase before 3.0 is released so that someone with more experience and time than I could then migrate it with all the other officially-supported bindings.

To this end and with thanks to @Cossey I’m making some progress towards the binding being acceptable to the maintainers. I’ve just completed an update that resyncs the binding with the latest from the OH 2.5.x branch, meaning that the amount of work needed to merge it with the main codebase is minimised.

While there I’ve also added support for the following devices:

  • RM4c Mini (0x6539) thanks to a PR from Joshua Hampp
  • RM4 Pro (0x649b) as reported by @frest

You can grab this new version (release BETA 16) from here:

BTW @Rob_Pope I’d love to add support for your BG Electrical device 0x51e3 - can you tell me a bit more about it - specifically, which Broadlink device does it most resemble?

Cheers,
John

BTW @Rob_Pope I’d love to add support for your BG Electrical device 0x51e3 - can you tell me a bit more about it - specifically, which Broadlink device does it most resemble?

Physically it’s most similar to an M1 power strip, but with two sockets instead of four. Judging by the code implemented by others, it’s controlled differently. There’s a JSON body put together with the attributes that you want to change and sent as a payload to the device.

I started updating your code to work with it, but only got as for as an Auth, sending data failed - probably as I’m terrible at bit operations and the encoding failed. Then I got frustrated with the screen resolution on my laptop, bought a new one and wiped the code. I might have a backup that I’ll pop on my git over the weekend.

Hello,
Im trying to connect two SP3S. Im using the last addon org.openhab.binding.broadlink-2.5.9.jar. The problem is probably that it recognizes the Thing as SP2 or SP3 without ‘S’ because i dont have a Nightlight but Power consumption:

just got my RM4 pro and added the latest version (Beta 16). Added device manually (IP and MAC) and get this error.
Am I missing something as no docs on git that i can see.

==> /QPKGs/OpenHab/userdata/logs/openhab.log <==

2020-12-15 14:14:43.702 [ERROR] [handler.BroadlinkRemoteModel4Handler] - rm4:c0611c45[v]: Authentication failed: 

2020-12-15 14:14:43.703 [ERROR] [handler.BroadlinkRemoteModel4Handler] - Broadlink Exception: 

java.net.ProtocolException: Response from device is not valid. (0x22=0xFF,0x23=0xFF,0x24=0xFF)

	at org.openhab.binding.broadlink.internal.BroadlinkProtocol.decodePacket(BroadlinkProtocol.java:195) ~[bundleFile:?]

	at org.openhab.binding.broadlink.handler.BroadlinkBaseThingHandler.decodeDevicePacket(BroadlinkBaseThingHandler.java:180) ~[bundleFile:?]

	at org.openhab.binding.broadlink.handler.BroadlinkBaseThingHandler.authenticate(BroadlinkBaseThingHandler.java:140) [bundleFile:?]

	at org.openhab.binding.broadlink.handler.BroadlinkBaseThingHandler.transitionToOnline(BroadlinkBaseThingHandler.java:263) [bundleFile:?]

	at org.openhab.binding.broadlink.handler.BroadlinkBaseThingHandler.updateItemStatus(BroadlinkBaseThingHandler.java:216) [bundleFile:?]

	at org.openhab.binding.broadlink.handler.BroadlinkBaseThingHandler$1.run(BroadlinkBaseThingHandler.java:104) [bundleFile:?]

	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [?:1.8.0_241]

	at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308) [?:1.8.0_241]

	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180) [?:1.8.0_241]

	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294) [?:1.8.0_241]

	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:1.8.0_241]

	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:1.8.0_241]

	at java.lang.Thread.run(Thread.java:748) [?:1.8.0_241]

2020-12-15 14:14:43.704 [ERROR] [handler.BroadlinkRemoteModel4Handler] - rm4:c0611c45[v]: Attempting to authenticate prior to getting device status FAILED. Will mark as offline

2020-12-15 14:14:43.705 [WARN ] [handler.BroadlinkRemoteModel4Handler] - rm4:c0611c45[v]: Online -> Offline due to: Couldn't authenticate

2020-12-15 14:15:08.492 [INFO ] [ntesisbox.internal.IntesisBoxHandler] - keep alive sent

2020-12-15 14:15:08.512 [INFO ] [ntesisbox.internal.IntesisBoxHandler] - keep alive sent

2020-12-15 14:15:08.600 [INFO ] [ntesisbox.internal.IntesisBoxHandler] - keep alive sent

2020-12-15 14:15:13.728 [ERROR] [handler.BroadlinkRemoteModel4Handler] - rm4:c0611c45[v]: Authentication failed: 

2020-12-15 14:15:13.728 [ERROR] [handler.BroadlinkRemoteModel4Handler] - Broadlink Exception: 

java.net.ProtocolException: Response from device is not valid. (0x22=0xFF,0x23=0xFF,0x24=0xFF)

	at org.openhab.binding.broadlink.internal.BroadlinkProtocol.decodePacket(BroadlinkProtocol.java:195) ~[bundleFile:?]

	at org.openhab.binding.broadlink.handler.BroadlinkBaseThingHandler.decodeDevicePacket(BroadlinkBaseThingHandler.java:180) ~[bundleFile:?]

	at org.openhab.binding.broadlink.handler.BroadlinkBaseThingHandler.authenticate(BroadlinkBaseThingHandler.java:140) [bundleFile:?]

	at org.openhab.binding.broadlink.handler.BroadlinkBaseThingHandler.transitionToOnline(BroadlinkBaseThingHandler.java:263) [bundleFile:?]

	at org.openhab.binding.broadlink.handler.BroadlinkBaseThingHandler.updateItemStatus(BroadlinkBaseThingHandler.java:216) [bundleFile:?]

	at org.openhab.binding.broadlink.handler.BroadlinkBaseThingHandler$1.run(BroadlinkBaseThingHandler.java:104) [bundleFile:?]

	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [?:1.8.0_241]

	at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308) [?:1.8.0_241]

	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180) [?:1.8.0_241]

	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294) [?:1.8.0_241]

	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:1.8.0_241]

	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:1.8.0_241]

	at java.lang.Thread.run(Thread.java:748) [?:1.8.0_241]

2020-12-15 14:15:13.729 [ERROR] [handler.BroadlinkRemoteModel4Handler] - rm4:c0611c45[v]: Attempting to authenticate prior to getting device status FAILED. Will mark as offline

2020-12-15 14:15:13.729 [WARN ] [handler.BroadlinkRemoteModel4Handler] - rm4:c0611c45[v]: Online -> Offline due to: Couldn't authenticate

==> /QPKGs/OpenHab/userdata/logs/events.log <==

Hi All,

Running the beta 16 version of the binding on OH 2.5.11 Release and keep coming across the following errors. As far as I can tell, the devices aren’t dropping off the LAN so at a loss. Can anybody shed any light?

2020-12-23 11:38:37.008 [WARN ] [dlink.handler.BroadlinkRemoteHandler] - rm3:34:EA:34:58:C7:78[^]: Online -> Offline due to: Couldn’t find statically-IP-addressed device

2020-12-23 11:38:37.009 [hingStatusInfoChangedEvent] - ‘broadlink:rm3:34:EA:34:58:C7:78’ changed from ONLINE to OFFLINE: Couldn’t find statically-IP-addressed device

2020-12-23 11:38:58.070 [hingStatusInfoChangedEvent] - ‘broadlink:rm3:34:EA:34:58:C7:78’ changed from OFFLINE: Couldn’t find statically-IP-addressed device to ONLINE

2020-12-23 11:39:47.573 [WARN ] [dlink.handler.BroadlinkRemoteHandler] - rm3:34:EA:34:58:C7:78[^]: Online -> Offline due to: Couldn’t find statically-IP-addressed device

2020-12-23 11:39:47.574 [hingStatusInfoChangedEvent] - ‘broadlink:rm3:34:EA:34:58:C7:78’ changed from ONLINE to OFFLINE: Couldn’t find statically-IP-addressed device

Happy new year

Is there a version of the addin compatible to OH 3.0?

3 Likes

meneldor i didn’t see working solution for SP3S. Maybe some hardware problems, to get power consumption data?

Hi everyone,
As per @nakh_Home asked, is there any update about OH3 binding?
Thanks a lot and happy holidays!

Hi All,

see also OH3 UI IR widget

Thanks for all the good work
Happy holidays

Ronny

@Cato_Sognen Hey :slight_smile: I just upgraded to OH3, just missing custom .jars for Plex and the broadlink rm3. Do you think we will get a ported version for OH3? Does anybody else knows the current state of development?

Cheers and happy holidays :slight_smile:

Going to try and get an OH3.0 compatible build out in the next couple of weeks.
Sorry for people who’ve been waiting patiently for this! :frowning:

12 Likes

Hi, thank you for your efforts, I am happy to test the builds with you :slight_smile:

Happy holidays :slight_smile:

Thanks bro… have a nice holiday

I’m hoping to get some time to take a further look at the BG Electrical wall socket in the next few days. I’ve also bought two of their adaptors for cheap off Amazon. Seems to be compatible with the SP4b so I’ll try adding that as a merge request first (low hanging fruit and all that).

Log output:
2020-12-29 14:58:10.295 [ERROR] [nding.broadlink.internal.ModelMapper] - Device identifying itself as '20962' (0x51e2) is not currently supported. Please report this to the developer!

Google result from HomeAssist: SP2-UK broadlink smart plug Unsupported device: 0x51e2 · Issue #44216 · home-assistant/core · GitHub

Model Product Page: Smart Sockets | BG Electrical Accessories

Hello Friends,
When I turn ON a particular Zwave switch, I would like to create a rule that automatically sends a turn ON command to my RF devices using the Broadlink binding.

I tried these two commands format, but I failed to make them work:

[itemName].sendCommand([command])
sendCommand([itemName], [command])

For [itemName], I used the command string item I created for the Broadlink Command Thing (I called the item: rf_control).
For [command], I used one of the RF codes titles I entered in the Broadlink.map file to set the bedroom fan to speed 1 (bedroom_fan_1).

For example, When I switch ON the bedroom’s fan zwave wall switch, I would like the Broadlink binding to send out an rf command to turn ON the bedroom fan to speed 1, so I tried these commands but they didn’t work:
sendCommand(rf_control , bedroom_fan_1)
and
rf_control.sendCommand(bedroom_fan_1)

Any ideas how I should write the command for it to work properly?