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

My RMPro, which was configured via UI, looks like this in the UI code page:

UID: broadlink:rm2:78-0f-77-63-6a-01
label: Broadlink RM Pro
thingTypeUID: broadlink:rm2
configuration:
  mapFilename: broadlink.map
  macAddress: 78:0f:77:63:6a:01
  port: 80
  staticIp: true
  ipAddress: 192.168.178.54
  pollingInterval: 30
  ignoreFailedUpdates: false

A textual configuration could look like this: (untested, I’m just guessing :wink: )

Thing broadlink:rm2:78-0f-77-63-6a-01 "Broadlink RM Pro" [ mapFilename="broadlink.map", macAddress="78:0f:77:63:6a:01", port=80, staticIp="true", ipAddress="192.168.178.54", pollingInterval="30", ignoreFailedUpdates="false" ]

Of couse you have to change mac-address, ip-address and thing type to your needs.
Thing types can be found her:

1 Like

OK, just tried this approach for my RM4 and now I have a new thing that is online :slight_smile:

Thing broadlink:rm4:e8:16:56:26:2b:21 "Broadlink RM 4" [ mapFilename="broadlink.map", macAddress="e8:16:56:26:2b:21", port=80, staticIp="true", ipAddress="192.168.178.50", pollingInterval="30", ignoreFailedUpdates="false" ]
1 Like

@Bernd_Ritter Many thanks for this. I tried that and, the RM4 mini is now working on 4.0.3 :slight_smile:

Hi @Bernd_Ritter,

How did get around authentication? I get authentication errors after connecting the rm4mini to wifi via app and integration into openhab as a things. file

2023-11-26 18:46:39.476 [WARN ] [handler.BroadlinkRemoteModel4Handler] - Authentication failed: 
java.net.ProtocolException: Response from device is not valid. (0x22=0xFF,0x23=0xFF)
	at org.openhab.binding.broadlink.internal.BroadlinkProtocol.decodePacket(BroadlinkProtocol.java:192) ~[?:?]
	at org.openhab.binding.broadlink.handler.BroadlinkBaseThingHandler.decodeDevicePacket(BroadlinkBaseThingHandler.java:187) ~[?:?]
	at org.openhab.binding.broadlink.handler.BroadlinkBaseThingHandler.authenticate(BroadlinkBaseThingHandler.java:144) ~[?:?]
	at org.openhab.binding.broadlink.handler.BroadlinkBaseThingHandler.transitionToOnline(BroadlinkBaseThingHandler.java:266) ~[?:?]
	at org.openhab.binding.broadlink.handler.BroadlinkBaseThingHandler.updateItemStatus(BroadlinkBaseThingHandler.java:222) ~[?:?]
	at org.openhab.binding.broadlink.handler.BroadlinkBaseThingHandler$1.run(BroadlinkBaseThingHandler.java:109) ~[?:?]
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539) ~[?:?]
	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:1136) ~[?:?]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) ~[?:?]
	at java.lang.Thread.run(Thread.java:833) ~[?:?]

Which the stock broadlink binding or old snapshot binding from OH3?
Did you use the app to connect to wifi and then discover via native broadlink binding?

With the old snapshot binding. No discovery, just manual thing configuration via things text file

Okay, great I have just configured the same. I did the same but get an authentication error. Did you set it the rm4mini via app and connect it to wifi? Assumption is authentication is blocked because of the app. How did you get around that?

I had the RM4 mini already working with oh3.4 and just migrated to oh4.0.4.

So it was already configured via the app quite some time ago, when I initially set it up in oh3.4. Which is quite some time ago and I don’t really remember how I did it then, sorry

I did not use the app to connect my Broadlink RM4 to Wifi, but “Python Broadlink”.

The configuration via the app seems to cause this problem.
This sounds like your problem:

Does Broadlink binding are working on OH4?

It does work, but you cannot add devices via UI, because it it not 100% compatible.

@hmerk Can you give an update?
Are you still on this or did you give up?

I did not give up, but as there is another open PR in the meantime, I did not even start.

2 Likes

I have created a new topic on the addon marketplace for this binding: Broadlink binding [4.1.0;4.2.0)

Please continue the discussion there.

3 Likes

Hi friends,

I updated my OpenHAB docker container to 4.1.2 today and, unfortunately, now I’m seeing an ERROR: HANDLER message for my previously working Broadlink RM4 Pro Thing and my pre-configured commands don’t work.

Can anyone suggest a fix?

I did the same upgrade on OpenHAB Docker container and received the same error. Follow Broadlink binding [4.1.0;4.2.0) download the jar file save it to the addons folder, also rename or remove old versions of Broadlink jar files if any, then from the GUI select things, your Broadlink device the click the pause or initialize the it should go online.

Thank you.

That’s what I thought I should do, but the new Broadlink Binding is not showing up in the list of available bindings on my OpenHAB – even though I deleted the old binding file, copied the new JAR file into the docker appdata/openhab/addons folder and restarted OpenHAB.

I also didn’t have the option to initialize the “old” Thing I created for the RM4 with the older binding.

The only option I was shown was to delete the Thing. So I deleted it.
And now, for some reason, the “new” 4.1.0;4.2.0 binding isn’t loading by OpenHAB and I can’t add a new Thing.

Any thoughts why the new binding isn’t loading with the system?

Do I need to set the JAR’s file ownership to “UNKNOWN” for OpenHAB to be able to use it?
From what I see, all other files in the OpenHAB appdata folder are set to “UNKNOWN” and “-rwxrwxrwx” permissions.

[EDIT] Seems like changing the ownership and permissions isn’t the cause of the problem.
My openHAB instance still doesn’t run the Broadlink binding even if the JAR file is in the addons folder with JAR file ownswership set to “UNKNOWN” and permissions set to “-rwxrwxrwx”.

Check Add On Store in GUI for Broadlink Binding is installed if not installed you need to add it.

From what I understand, the Broadlink binding on the add-on store is not required for this binding to work.