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

Thanks, it;s well working and it bring some stablity to the system

i have removed the hashmap timeout with a constant one

1 Like

really glad it helped :slight_smile: it’s the first time i manage to contribute in some way :slight_smile:

1 Like

What fixed my No Entry for … in map file issue was ensuring there were NO spaces between the label and = and none between the = and the string of numbers.

Does someone also have the problem that the Broadlink disconnects from my WLAN every 5 minutes or so. It is offline for less than a minute and then reconnects to the WLAN. It does that all the time.

Me too… Unfortunately I have tried many things but without any result.

  • I tried constantly pinging, but that does not help:

64 bytes from 192.168.178.54: icmp_seq=886 ttl=255 time=2.18 ms
64 bytes from 192.168.178.54: icmp_seq=887 ttl=255 time=2.55 ms
64 bytes from 192.168.178.54: icmp_seq=888 ttl=255 time=1.73 ms
64 bytes from 192.168.178.54: icmp_seq=889 ttl=255 time=2.15 ms
64 bytes from 192.168.178.54: icmp_seq=890 ttl=255 time=2.36 ms
64 bytes from 192.168.178.54: icmp_seq=891 ttl=255 time=402 ms
64 bytes from 192.168.178.54: icmp_seq=892 ttl=255 time=4.47 ms
64 bytes from 192.168.178.54: icmp_seq=893 ttl=255 time=2.40 ms
64 bytes from 192.168.178.54: icmp_seq=894 ttl=255 time=3.89 ms
64 bytes from 192.168.178.54: icmp_seq=895 ttl=255 time=2.16 ms
64 bytes from 192.168.178.54: icmp_seq=896 ttl=255 time=2.18 ms

  • I checked that PMF (Protected Management Frames) is disabled in my router’s WLAN settings, but this didn’t help

Anything else I could try?

Binding not work on latest 2.5 M6

2019-12-03 09:41:57.714 [ERROR] [nal.common.AbstractInvocationHandler] - An error occurred while calling method ‘ThingHandler.handleCommand()’ on ‘org.openhab.binding.broadlink.handler.BroadlinkRemoteHandler@d99458’: bundleContext

java.lang.NoSuchFieldError: bundleContext

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

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

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

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

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

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

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.$Proxy409.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_222]

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

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

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

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_222]

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

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

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

@phui I have the exact same error introduced with M6. I spend all last night trying to solve it with no success.

I fall back to M5 then all error gone and work properly …

Looking at the changelog point 5 is the cause of the problem.
And it looks like the binding needs an update to work og 2.5M6 and forward.

Is it possible to disable add-in loggin? I have openhab.log file plenty of

2019-12-07 20:56:51.391 [WARN ] [nal.discovery.DeviceRediscoveryAgent] - DeviceRediscoveryAgent - Beginning Broadlink device scan for missing BroadlinkDeviceConfiguration [ipAddress=192.168.0.167 (static: false), port=80, mac=b4:43:0d:cb:f2:15, pollingInterval=30, mapFilename=null, authorizationKey=097628343fe99e23765c1513accf8b02, iv=562e17996d093d28ddb3ba695a2e6f58]
2019-12-07 20:56:51.393 [WARN ] [internal.discovery.DiscoveryProtocol] - Beginning async Broadlink device scan; will wait 5000ms for responses
2019-12-07 20:56:51.398 [WARN ] [internal.discovery.DiscoveryProtocol] - Broadlink device scan waiting for 5000 ms to complete …
2019-12-07 20:56:56.406 [WARN ] [internal.discovery.DiscoveryProtocol] - Device scan: wait complete …
2019-12-07 20:56:56.409 [WARN ] [internal.discovery.DiscoveryProtocol] - Ended Broadlink device scan…
2019-12-07 20:56:56.411 [INFO ] [link.internal.socket.BroadlinkSocket] - Socket closed
2019-12-07 20:56:56.421 [INFO ] [link.internal.socket.BroadlinkSocket] - Receiver thread ended

every minute. How can I disable it?

I forked the github project and (dirty) fixed the Broadlink binding for Openhab 2.5 M6: https://github.com/berni2288/openhab2-addons

The new jar can be downloaded from here: https://github.com/berni2288/openhab2-addons/releases/tag/2.5-M6

I basically added back the removed bundleContext to the BroadlinkRemoteHandler class. But I have read the bundleContext should not be used anymore. Maybe someone else wants to fix it properly according to this thread: [SOLVED] Cannot figure out how to avoid bundleContext.registerService()!
I didn’t want to invest too much time into this :stuck_out_tongue:

1 Like

Tried to install it several times on my 2.5-M6, unfortunately with no luck.
Maybe is just me.
fyi.

I was not luck as well. Maybe someone else help us?

Hello Berni,

I tried to use your jar but it does not work with currently version. I can see on openhab-cli

openhab> bundle:list | grep Broadlink
259 | Active | 80 | 2.5.0.201912081254 | Broadlink Binding
openhab>

but I can see on openhab paperui binding

2.5.0-SNAPSHOT
Build #1774

Did you solved it?

It works for me…
Did it work for you with the old binding? Do you have some error stacktrace?

I just compiled it again with Java 8 instead of Java 9, try this one: https://github.com/berni2288/openhab2-addons/releases/tag/2.5.0-java8

Unfortunately that’s the first time I touched the code of a Openhab binding, if this does not work for you I don’t know why.

I got no error come out with this one or previous work, but no response after, no IR send out from RM2, on RM2, red led should on when Tx IR, but no.

Albeit I am still running on 2.5M3 and everything works for me (so i’m not switching now), I just wanted to thank you for contributing. It feels like this binding really changes the use of many of our homes.

Hello,

how to choose the update for M3 or M4? I only was able to update to latest milestone and do not choose tM3 or m4