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

Same procedure here, same seamless result. Thanks @Skumpic for the effort!

very cool thank you !

Hey everyone sorry for “going dark” for a while there - new job … :wink:

Thanks to everyone for pitching in to work around the incompatibilities of the 2.4 binding with OpenHAB 2.5. I’ll be merging @Skumpic’s changes onto my new 2.5 branch in GitHub, and will be hopefully posting a fully v2.5-compatible binding very shortly. I’ve just upgraded my own local OpenHAB installation to 2.5 so will ensure that it at least boots up and works in a basic way :slight_smile:

5 Likes

OK as promised, here’s the first “official” Broadlink binding that targets OpenHAB 2.5 specifically.
I’ve tried this on my 2.5 installation - it loads the binding, my A1 and SP3s work, and the discovery process found my RM3 fine too, so I’m calling it good enough to wear a BETA tag.

I’ve also taken the opportunity to switch the hosting of the released binaries to Github, so anyone can also easily download the exact source code bundle corresponding to the release.

https://github.com/themillhousegroup/openhab2-addons/releases/download/BROADLINK_2.5.BETA_01/org.openhab.binding.broadlink-2.5.1-SNAPSHOT.jar

Thanks again to @Skumpic for his contribution and as always, let me know how it goes for you :slight_smile:

7 Likes

Hi, is a “power meter” also work? or only on/off switch?

I believe the on/off functions of the combined switch/power meter device should work.

I don’t know if we’ve ever seen a Broadlink power meter work with this binding. I put in some support for it, but it was mainly guesswork as to the protocol. I don’t have one personally, so I think there was too much trial-and-error/back-and-forth to get it going.

Now if somebody wanted to donate one to me :wink: I’m sure I could get it to work :smiley:

3 Likes

Nice to know the patch is now integrated in the master branch.
It was a pleasure for me to help with this (little) contribution :slight_smile:
Now that we have a fully functional jar hosted on github i’m gonna remove the version hosted on my personal server.
Have a nice day,
Skumpic

3 Likes

@Skumpic @themillhousegroup
thank you guys for keeping this alive!!!
i am very invested in RM2 RM3 in my home, and since cato left I had the feeling someday this will go bad, but its 2020 almost three years since first post and we are live and kicking !!!

can anyone tell if we can put this bdining on the official repo?
i remember some issue with the way it was reversed enginerd
are we still on that point?

1 Like

maybe you can start a https://www.patreon.com/ page
i think sending you dirctly will cost a litle more :slight_smile:

i will be glad to donate for the name of science !!!
i am sure more here will feel the same!

i see allot of new broadlinks on the way :slight_smile:
two new RM4s,

Ohh and good luck in the new Job!

when official binding??

@themillhousegroup Thanks

it;s really stable for RM2, mini, SP2, MP1, and A1

the logs below

2020-01-04 22:18:40.258 [INFO ] [.discovery.BroadlinkDiscoveryService] - BroadlinkDiscoveryService - Constructed
2020-01-04 22:19:07.649 [ERROR] [.handler.BroadlinkStripModel1Handler] - mp1:34-ea-34-c9-9d-33[?]: Authentication failed: {}
java.net.ProtocolException: Incoming packet from device is null.
	at org.openhab.binding.broadlink.internal.BroadlinkProtocol.decodePacket(BroadlinkProtocol.java:191) ~[bundleFile:?]
	at org.openhab.binding.broadlink.handler.BroadlinkBaseThingHandler.authenticate(BroadlinkBaseThingHandler.java:124) [bundleFile:?]
	at org.openhab.binding.broadlink.handler.BroadlinkBaseThingHandler.transitionToOnline(BroadlinkBaseThingHandler.java:243) [bundleFile:?]
	at org.openhab.binding.broadlink.handler.BroadlinkBaseThingHandler.updateItemStatus(BroadlinkBaseThingHandler.java:199) [bundleFile:?]
	at org.openhab.binding.broadlink.handler.BroadlinkBaseThingHandler$1.run(BroadlinkBaseThingHandler.java:75) [bundleFile:?]
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [?:1.8.0_222]
	at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308) [?:1.8.0_222]
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180) [?:1.8.0_222]
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294) [?: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]
2020-01-04 22:19:07.662 [ERROR] [.handler.BroadlinkStripModel1Handler] - mp1:34-ea-34-c9-9d-33[?]: Attempting to authenticate prior to getting device status FAILED. Will mark as offline
2020-01-04 22:19:07.664 [ERROR] [.handler.BroadlinkStripModel1Handler] - mp1:34-ea-34-c9-9d-33[?]: updateItemStatus: Online -> Offline
2020-01-05 02:00:50.283 [ERROR] [dlink.handler.BroadlinkRemoteHandler] - rm3:78-0f-77-19-fe-31[^]: updateItemStatus: Online -> Offline
2020-01-05 03:00:41.467 [ERROR] [dlink.handler.BroadlinkRemoteHandler] - rm3:78-0f-77-19-fe-31[^]: updateItemStatus: Online -> Offline
2020-01-05 06:18:27.589 [ERROR] [.handler.BroadlinkStripModel1Handler] - mp1:34-ea-34-c9-9d-33[^]: updateItemStatus: Online -> Offline
2020-01-05 06:25:32.765 [ERROR] [.handler.BroadlinkStripModel1Handler] - mp1:34-ea-34-c9-9d-33[v]: Authentication failed: {}
java.net.ProtocolException: Incoming packet from device is null.
	at org.openhab.binding.broadlink.internal.BroadlinkProtocol.decodePacket(BroadlinkProtocol.java:191) ~[bundleFile:?]
	at org.openhab.binding.broadlink.handler.BroadlinkBaseThingHandler.authenticate(BroadlinkBaseThingHandler.java:124) [bundleFile:?]
	at org.openhab.binding.broadlink.handler.BroadlinkBaseThingHandler.transitionToOnline(BroadlinkBaseThingHandler.java:243) [bundleFile:?]
	at org.openhab.binding.broadlink.handler.BroadlinkBaseThingHandler.updateItemStatus(BroadlinkBaseThingHandler.java:199) [bundleFile:?]
	at org.openhab.binding.broadlink.handler.BroadlinkBaseThingHandler$1.run(BroadlinkBaseThingHandler.java:75) [bundleFile:?]
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [?:1.8.0_222]
	at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308) [?:1.8.0_222]
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180) [?:1.8.0_222]
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294) [?: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]
2020-01-05 06:25:32.770 [ERROR] [.handler.BroadlinkStripModel1Handler] - mp1:34-ea-34-c9-9d-33[v]: Attempting to authenticate prior to getting device status FAILED. Will mark as offline
2020-01-05 06:25:32.772 [ERROR] [.handler.BroadlinkStripModel1Handler] - mp1:34-ea-34-c9-9d-33[v]: updateItemStatus: Online -> Offline
2020-01-05 16:10:03.016 [ERROR] [dlink.handler.BroadlinkRemoteHandler] - rm3:78-0f-77-19-fe-31[^]: updateItemStatus: Online -> Offline
2020-01-05 16:16:20.918 [ERROR] [dlink.handler.BroadlinkRemoteHandler] - rm3:78-0f-77-19-fe-31[^]: updateItemStatus: Online -> Offline
2020-01-05 17:13:22.875 [ERROR] [dlink.handler.BroadlinkRemoteHandler] - rm3:78-0f-77-19-fe-31[^]: updateItemStatus: Online -> Offline
2020-01-05 18:33:03.138 [ERROR] [dlink.handler.BroadlinkRemoteHandler] - rm3:78-0f-77-19-fe-31[^]: updateItemStatus: Online -> Offline
2020-01-05 18:41:32.250 [ERROR] [dlink.handler.BroadlinkRemoteHandler] - rm3:78-0f-77-19-fe-31[^]: updateItemStatus: Online -> Offline
2020-01-05 18:45:39.902 [ERROR] [dlink.handler.BroadlinkRemoteHandler] - rm3:78-0f-77-19-fe-31[^]: updateItemStatus: Online -> Offline
2020-01-05 18:49:55.418 [ERROR] [dlink.handler.BroadlinkRemoteHandler] - rm3:78-0f-77-19-fe-31[^]: updateItemStatus: Online -> Offline
2020-01-05 18:56:15.814 [ERROR] [dlink.handler.BroadlinkRemoteHandler] - rm3:78-0f-77-19-fe-31[^]: updateItemStatus: Online -> Offline
2020-01-05 19:00:28.613 [ERROR] [dlink.handler.BroadlinkRemoteHandler] - rm3:78-0f-77-19-fe-31[^]: updateItemStatus: Online -> Offline
2020-01-05 19:46:08.627 [ERROR] [dlink.handler.BroadlinkRemoteHandler] - rm3:78-0f-77-19-fe-31[^]: updateItemStatus: Online -> Offline
2020-01-05 20:25:06.124 [ERROR] [dlink.handler.BroadlinkRemoteHandler] - rm3:78-0f-77-19-fe-31[^]: updateItemStatus: Online -> Offline
2020-01-05 21:00:53.636 [ERROR] [dlink.handler.BroadlinkRemoteHandler] - rm3:78-0f-77-18-3e-c4[^]: updateItemStatus: Online -> Offline
2020-01-05 21:14:40.585 [ERROR] [dlink.handler.BroadlinkRemoteHandler] - rm3:78-0f-77-19-fe-31[^]: updateItemStatus: Online -> Offline
2020-01-05 21:43:36.019 [ERROR] [dlink.handler.BroadlinkRemoteHandler] - rm3:78-0f-77-19-fe-31[^]: updateItemStatus: Online -> Offline
2020-01-05 22:36:05.041 [ERROR] [dlink.handler.BroadlinkRemoteHandler] - rm3:78-0f-77-19-fe-31[^]: updateItemStatus: Online -> Offline
2020-01-05 23:16:54.363 [ERROR] [handler.BroadlinkSocketModel2Handler] - sp2:34-ea-34-bd-47-9b[^]: updateItemStatus: Online -> Offline
2020-01-05 23:23:45.977 [ERROR] [handler.BroadlinkSocketModel2Handler] - sp2:b4-43-0d-ee-d6-04[^]: updateItemStatus: Online -> Offline
2020-01-06 01:19:49.737 [ERROR] [dlink.handler.BroadlinkRemoteHandler] - rm3:78-0f-77-19-fe-31[^]: updateItemStatus: Online -> Offline
2020-01-06 01:44:40.681 [ERROR] [dlink.handler.BroadlinkRemoteHandler] - rm3:78-0f-77-19-fe-31[^]: updateItemStatus: Online -> Offline
2020-01-06 02:03:18.351 [ERROR] [dlink.handler.BroadlinkRemoteHandler] - rm3:78-0f-77-19-fe-31[^]: updateItemStatus: Online -> Offline
2020-01-06 02:59:37.088 [ERROR] [dlink.handler.BroadlinkRemoteHandler] - rm3:78-0f-77-19-fe-31[^]: updateItemStatus: Online -> Offline
2020-01-06 03:08:22.031 [ERROR] [dlink.handler.BroadlinkRemoteHandler] - rm3:78-0f-77-19-fe-31[v]: Authentication failed: {}
java.net.ProtocolException: Incoming packet from device is null.
	at org.openhab.binding.broadlink.internal.BroadlinkProtocol.decodePacket(BroadlinkProtocol.java:191) ~[bundleFile:?]
	at org.openhab.binding.broadlink.handler.BroadlinkBaseThingHandler.authenticate(BroadlinkBaseThingHandler.java:124) [bundleFile:?]
	at org.openhab.binding.broadlink.handler.BroadlinkBaseThingHandler.transitionToOnline(BroadlinkBaseThingHandler.java:243) [bundleFile:?]
	at org.openhab.binding.broadlink.handler.BroadlinkBaseThingHandler.updateItemStatus(BroadlinkBaseThingHandler.java:199) [bundleFile:?]
	at org.openhab.binding.broadlink.handler.BroadlinkBaseThingHandler$1.run(BroadlinkBaseThingHandler.java:75) [bundleFile:?]
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [?:1.8.0_222]
	at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308) [?:1.8.0_222]
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180) [?:1.8.0_222]
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294) [?: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]
2020-01-06 03:08:22.037 [ERROR] [dlink.handler.BroadlinkRemoteHandler] - rm3:78-0f-77-19-fe-31[v]: Attempting to authenticate prior to getting device status FAILED. Will mark as offline
2020-01-06 03:08:22.039 [ERROR] [dlink.handler.BroadlinkRemoteHandler] - rm3:78-0f-77-19-fe-31[v]: updateItemStatus: Online -> Offline
2020-01-06 03:41:15.282 [ERROR] [dlink.handler.BroadlinkRemoteHandler] - rm3:78-0f-77-19-fe-31[^]: updateItemStatus: Online -> Offline
2020-01-06 04:10:19.733 [ERROR] [dlink.handler.BroadlinkRemoteHandler] - rm3:78-0f-77-19-fe-31[^]: updateItemStatus: Online -> Offline
2020-01-06 04:35:23.602 [ERROR] [dlink.handler.BroadlinkRemoteHandler] - rm3:78-0f-77-19-fe-31[^]: updateItemStatus: Online -> Offline
2020-01-06 04:49:59.806 [ERROR] [dlink.handler.BroadlinkRemoteHandler] - rm3:78-0f-77-19-fe-31[^]: updateItemStatus: Online -> Offline
2020-01-06 06:09:51.650 [ERROR] [handler.BroadlinkSocketModel2Handler] - sp2:34-ea-34-bd-47-9b[^]: updateItemStatus: Online -> Offline
2020-01-06 06:13:59.677 [ERROR] [dlink.handler.BroadlinkRemoteHandler] - rm3:78-0f-77-19-fe-31[^]: updateItemStatus: Online -> Offline
2020-01-06 06:33:39.987 [ERROR] [dlink.handler.BroadlinkRemoteHandler] - rm3:78-0f-77-19-fe-31[^]: updateItemStatus: Online -> Offline
2020-01-06 06:52:54.861 [ERROR] [handler.BroadlinkSocketModel2Handler] - sp2:34-ea-34-bd-47-9b[^]: updateItemStatus: Online -> Offline
2020-01-06 07:57:15.876 [ERROR] [dlink.handler.BroadlinkRemoteHandler] - rm3:78-0f-77-19-fe-31[^]: updateItemStatus: Online -> Offline
2020-01-06 07:59:35.349 [ERROR] [dlink.handler.BroadlinkRemoteHandler] - rm3:78-0f-77-19-fe-31[v]: Authentication failed: {}
java.net.ProtocolException: Incoming packet from device is null.
	at org.openhab.binding.broadlink.internal.BroadlinkProtocol.decodePacket(BroadlinkProtocol.java:191) ~[bundleFile:?]
	at org.openhab.binding.broadlink.handler.BroadlinkBaseThingHandler.authenticate(BroadlinkBaseThingHandler.java:124) [bundleFile:?]
	at org.openhab.binding.broadlink.handler.BroadlinkBaseThingHandler.transitionToOnline(BroadlinkBaseThingHandler.java:243) [bundleFile:?]
	at org.openhab.binding.broadlink.handler.BroadlinkBaseThingHandler.updateItemStatus(BroadlinkBaseThingHandler.java:199) [bundleFile:?]
	at org.openhab.binding.broadlink.handler.BroadlinkBaseThingHandler$1.run(BroadlinkBaseThingHandler.java:75) [bundleFile:?]
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [?:1.8.0_222]
	at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308) [?:1.8.0_222]
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180) [?:1.8.0_222]
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294) [?: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]
2020-01-06 07:59:35.355 [ERROR] [dlink.handler.BroadlinkRemoteHandler] - rm3:78-0f-77-19-fe-31[v]: Attempting to authenticate prior to getting device status FAILED. Will mark as offline
2020-01-06 07:59:35.357 [ERROR] [dlink.handler.BroadlinkRemoteHandler] - rm3:78-0f-77-19-fe-31[v]: updateItemStatus: Online -> Offline
2020-01-06 08:05:48.487 [ERROR] [dlink.handler.BroadlinkRemoteHandler] - rm3:78-0f-77-19-fe-31[^]: updateItemStatus: Online -> Offline
2020-01-06 09:00:25.661 [ERROR] [dlink.handler.BroadlinkRemoteHandler] - rm3:78-0f-77-19-fe-31[^]: updateItemStatus: Online -> Offline
2020-01-06 09:21:34.083 [ERROR] [dlink.handler.BroadlinkRemoteHandler] - rm3:78-0f-77-19-fe-31[^]: updateItemStatus: Online -> Offline
2020-01-06 13:35:26.106 [ERROR] [dlink.handler.BroadlinkRemoteHandler] - rm3:78-0f-77-19-fe-31[^]: updateItemStatus: Online -> Offline

Platform: OpenHAB 2.4
binding version: org.openhab.binding.broadlink-2.4.0-BETA-17.jar

Hello all, I’ve added a RM2 device using things text file with the following line

Thing broadlink:rm2:78:0f:77:4d:ec:9d "txtBL RM2_M804 [78:0f:77:4d:ec:9d]" @ "M804" [ ipAddress="10.230.0.140", port=80, mac="78:0f:77:4d:ec:9d",	mapFile="broadlink.map", authorizationKey="097628343fe99e23765c1513accf8b02", iv="562e17996d093d28ddb3ba695a2e6f58", pollingInterval=30, staticIp=false, retries=1, ignoreFailedUpdates=true ]

OpenHAB detects fine but shows
OFFLINE - COMMUNICATION_ERROR

I trace log and see the following

2020-01-07 11:12:15.251 [TRACE] [handler.BroadlinkRemoteModel2Handler] - rm2:78:0f:77:4d:ec:9d[v]: updateItemStatus; checking host availability at 10.230.0.140
2020-01-07 11:12:15.255 [DEBUG] [handler.BroadlinkRemoteModel2Handler] - rm2:78:0f:77:4d:ec:9d[v]: We've never actually successfully authenticated with this device in this session. Doing so now
2020-01-07 11:12:15.255 [DEBUG] [handler.BroadlinkRemoteModel2Handler] - rm2:78:0f:77:4d:ec:9d[v]: Authenticating with packet count = 62327
2020-01-07 11:12:15.255 [TRACE] [handler.BroadlinkRemoteModel2Handler] - rm2:78:0f:77:4d:ec:9d[v]: building message with count: 62328, id: 00000000, key: 097628343FE99E23765C1513ACCF8B02
2020-01-07 11:12:15.256 [TRACE] [handler.BroadlinkRemoteModel2Handler] - rm2:78:0f:77:4d:ec:9d[v]: Sending authentication to 10.230.0.140:80
2020-01-07 11:12:15.256 [TRACE] [handler.BroadlinkRemoteModel2Handler] - rm2:78:0f:77:4d:ec:9d[v]: No existing socket ... creating
2020-01-07 11:12:15.256 [ERROR] [handler.BroadlinkRemoteModel2Handler] - rm2:78:0f:77:4d:ec:9d[v]: IO error during UDP command sending: maximum number of DatagramSockets reached
2020-01-07 11:12:15.256 [TRACE] [handler.BroadlinkRemoteModel2Handler] - rm2:78:0f:77:4d:ec:9d[v]: Retrying sendAndReceive ONE time before giving up...
2020-01-07 11:12:15.256 [TRACE] [handler.BroadlinkRemoteModel2Handler] - rm2:78:0f:77:4d:ec:9d[v]: Sending authentication to 10.230.0.140:80
2020-01-07 11:12:15.257 [TRACE] [handler.BroadlinkRemoteModel2Handler] - rm2:78:0f:77:4d:ec:9d[v]: No existing socket ... creating
2020-01-07 11:12:15.257 [ERROR] [handler.BroadlinkRemoteModel2Handler] - rm2:78:0f:77:4d:ec:9d[v]: IO error during UDP command sending: maximum number of DatagramSockets reached
2020-01-07 11:12:15.257 [ERROR] [handler.BroadlinkRemoteModel2Handler] - rm2:78:0f:77:4d:ec:9d[v]: Authentication failed: {}
java.net.ProtocolException: Incoming packet from device is null.
	at org.openhab.binding.broadlink.internal.BroadlinkProtocol.decodePacket(BroadlinkProtocol.java:193) ~[238:org.openhab.binding.broadlink:2.4.0.201906030227]
	at org.openhab.binding.broadlink.handler.BroadlinkBaseThingHandler.authenticate(BroadlinkBaseThingHandler.java:126) [238:org.openhab.binding.broadlink:2.4.0.201906030227]
	at org.openhab.binding.broadlink.handler.BroadlinkBaseThingHandler.transitionToOnline(BroadlinkBaseThingHandler.java:245) [238:org.openhab.binding.broadlink:2.4.0.201906030227]
	at org.openhab.binding.broadlink.handler.BroadlinkBaseThingHandler.updateItemStatus(BroadlinkBaseThingHandler.java:201) [238:org.openhab.binding.broadlink:2.4.0.201906030227]
	at org.openhab.binding.broadlink.handler.BroadlinkBaseThingHandler$1.run(BroadlinkBaseThingHandler.java:77) [238:org.openhab.binding.broadlink:2.4.0.201906030227]
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:514) [?:?]
	at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:305) [?:?]
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:305) [?:?]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1135) [?:?]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) [?:?]
	at java.lang.Thread.run(Thread.java:844) [?:?]
2020-01-07 11:12:15.257 [ERROR] [handler.BroadlinkRemoteModel2Handler] - rm2:78:0f:77:4d:ec:9d[v]: Attempting to authenticate prior to getting device status FAILED. Will mark as offline
2020-01-07 11:12:15.257 [ERROR] [handler.BroadlinkRemoteModel2Handler] - rm2:78:0f:77:4d:ec:9d[v]: updateItemStatus: Online -> Offline

Strange that it shows “IO error during UDP command sending: maximum number of DatagramSockets reached”. Does anyone received the same error?

I must admit that this binding is excellent and thank you so much to all contributors!

Hi @dennisshum - that’s a really odd error.

On most systems the max number of UDP sockets is about 32000. The Broadlink binding only uses n + 1 sockets, one for device discovery (i.e. broadcasting) and n normal sockets, one per Broadlink Thing, so unless you have a vast number of Things, or something has gone horrifically wrong somewhere, I don’t know if the cause is actually within the Broadlink binding.

I hate to suggest the old “turn it off and back on again” solution, but that will almost certainly help. If you see this error again even after a reboot, then I’ll need a lot more info from you, like what type of system you’re on and also the other bindings/addons you’re running.

Cheers,
John

@themillhousegroup thanks for your reply. A simple service restart really solve the problem. The thing is up and running properly now!

Just another minor question. When I change the parameters in things file, the log stated “Refreshing model ‘broadlink.things’” but I cannot see the changes happened in PaperUI. Although again, a simple service restart can solve the problem, but does anyone encounter this issue also?

Continuing the discussion from Broadlink binding for RMx, A1, SPx and MP. Any interest?:

Hi guys,

I’m quite new to home automation and also to openhab. I’ve managed to configured my RPI (openhabian) and also installed the broadlink binding (2.5.1). the binding is signalized as connected and working properly. Now, I’m trying to fill in the items, but I’m having troubles getting the codes. Based on the documentation I’m using RM Bridge, which is able to detect my RM2 device, but once I click the learn code button, the server returns the error “Error learning code: mac:78:0F:77:63:1B:F1 not rm2”. I’ve double checked everything, the IP, the MAC everything is correct, openhab also recognized the device as RM2. Do you have any idea, what could be the issue? Or is there any other way, how to get the needed things for the RM2 items?

Thanks,
Attila

Hi @abal,
I had the same issue when getting the codes, tried Broadlink Manager that seems to be very handy but as I’m on macOS I couldn’t try it out.
Finally I got it working with the following (you will need an Android device, original source):

  1. Install Broadlink e-control app from Play store
  2. Learn your remotes as per normal instructions using e-control.
  3. Tap the burger settings and tap ‘Share’. Tap 'Share to other phones in WLAN. Tap Cancel.
  4. Install RM Plugin Lite from Play Store
  5. Tap on Device List to import Broadlink device config that was previously shared.
  6. Enable HTTP bridge
  7. Navigate to http://androidipaddress:9876/
  8. Find Code List and click on the link.

In the original source you they need to use a step 9, with openHab is not necessary.

Then you can continue the procedure as described in #56 for integrating them into OH.

Cheers

1 Like

Hi @pablogil,

Thank you very much for your answer. I’ve tried the e-control app, but I’m having some troubles with it (I’m using the new BroadLink app instead, which is working fine) , it is not able to find my BroadLink. Then, I’ve tested the BroadLink manager you’ve mentioned (I’m a windows user), which looks promising, it is able to recognize the IR codes, but not the RF ones. I’ve found some other guys having a similar issue, so I’m going to investigate that further. If that will not work, then I’ll get back to your solution.
BTW: is there any way to get the codes from the new BroadLink app? It seems, that the e-control is not developed anymore, it did not get any update since a year or more …

Cheers,
Attila

try enterring MAC address with lower case

Maybe you need to stick to the e-control app… for instance try with other Android device.

Maybe some one can tell, what is the last version of broadlink binding and what version of openhub it support? thx