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

@themillhousegroup could you please update the README.md of your binding to reflect these findings? This thread is quite long and confusing for new users and over time our findings will get lost and some other poor soul will waste their afternoon reinventing the wheel. Thanks!

4 Likes

@themillhousegroup Thanks for your work

i have seen a regression on the SP2.

The SP2 get turned off when the thing is becoming online.

Simple to reproduce it:

Disable the thing from paperui
Enable the thing from paper UI => The SP2 Get turned off

i have attached the trace logs
tracelog.txt (10.4 KB)

So I did some debugging. I have total of 5 RMX devices set up in my home, all of them worked fine for 1 day and today out of nowhere some issues started happening (I am not aware of any reboot, maybe there was a router downtime for few minutes, but not sure)

Only one device (the one I configured as the very first one in OpenHab) stays ONLINE ans can send commands. The rest go Offline: Couldn’t find statically-IP-addressed device within few seconds after startup. The behavior is very strange: If I turn any of the broken ones OFF, and turn it back ON, all others start working for about 30 seconds. After that they all go offline again (except for the one).

I can restart any one of those that appear as offline and suddenly all others show up as ONLINE and are functioning as expected. However within 30 seconds, they show as offline.

This is my setup:

RM3 Office - 192.168.1.50 - c8:f7:42:40:0c:f9 
RM4 Gym 192.168.1.180 - 24:df:a7:e8:62:b3
RM4 Bedroom 192.168.1.232 - 24:df:a7:e8:5c:6e
RM4 Guest room - 192.168.1.22 - 24:df:a7:e8:62:15
RM4 Living room - 192.168.1.202 - 24:df:a7:34:b7:5b

This is my items:

String                  BroadlinkRM3_Command                    "Broadlink RM3 Office"   (gACOffice)  { channel="broadlink:rm3:c8-f7-42-40-0c-f9:command" }
String                  BroadlinkRM4_Command                    "Broadlink RM4 Living room"   (gACLounge)  { channel="broadlink:rm4:cd278176:command" }
String                  BroadlinkRM4_MasterBedroom_Command      "Broadlink RM4 Master Bedroom"   (gACMasterBedroom)  { channel="broadlink:rm4:303436bd:command" }
String                  BroadlinkRM4_GuestRoom_Command          "Broadlink RM4 Guest Room"   (gACGuestRoom)  { channel="broadlink:rm4:f59f574e:command" }
String                  BroadlinkRM4_Gym_Command                "Broadlink RM4 Gym"     (gACGym)  { channel="broadlink:rm4:d2f2eed0:command" }

And this is my log:

2020-06-21 18:00:03.211 [WARN ] [handler.BroadlinkRemoteModel4Handler] - rm4:d2f2eed0[^]: Online -> Offline due to: Couldn't find statically-IP-addressed device
2020-06-21 18:00:04.887 [WARN ] [dlink.handler.BroadlinkRemoteHandler] - rm3:c8-f7-42-40-0c-f9[^]: Online -> Offline due to: Couldn't find statically-IP-addressed device
2020-06-21 18:00:06.220 [WARN ] [handler.BroadlinkRemoteModel4Handler] - rm4:f59f574e[^]: Online -> Offline due to: Couldn't find statically-IP-addressed device
2020-06-21 18:00:09.253 [WARN ] [handler.BroadlinkRemoteModel4Handler] - rm4:303436bd[^]: Online -> Offline due to: Couldn't find statically-IP-addressed device

This is for sure a binding error, did anybody experience similar issues whilst using more devices at once? Any ideas how to proceed? Thanks!

EDIT:

There is also something wrong when it comes to updating thing configuration. I changed the IP in Thing configuration via Paper UI, enabled trace logging and I see it still uses the old IP

2020-06-21 18:43:45.782 [TRACE] [dlink.handler.BroadlinkRemoteHandler] - rm3:c8-f7-42-40-0c-f9[v]: updateItemStatus; checking host availability at 192.168.1.50

Only after restarting openhab I got the correct IP in logs.

I also found based on logs that this is the line that fails. I have no idea why though, but it returns false for some of my devices. They are pingable though

EDIT2:

Why do I see

2020-06-21 18:55:00.987 [ERROR] [nding.broadlink.internal.ModelMapper] - Device identifying itself as '25276' is not currently supported. Please report this to the developer!
2020-06-21 18:55:00.988 [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

wasnt this supposed to be fixed in the last release?

Hi @michnovka,
Lots to look at in your post!

Firstly, device '25276' corresponds to 0x62bc which is not currently a supported device code. It appears that there are a large number of RM4-class devices with a range of device codes - I’m expanding the ModelMapper to match a range of codes from 0x610f to 0x62bf to try and catch them all - this will be in the next beta release (see below).

Secondly, I’m very suspicious about the fact that your RM3 device appears to work properly but none of your RM4s do. My first guess was that Broadlink have made RM4s un-pingable, but you say that they can be pinged, so I’m quite confused. You can see that the NetworkUtils.hostAvailabilityCheck() is very simple and uses the standard Java mechanisms for determining device reachability. I’d be very interested to see more detailed logs around what happens around that time - especially if you could enable TRACE-level logging for the binding if you still have problems after upgrading to the next beta version.

Thirdly, I’m still worried about the issue that seems to exist in (some recent versions of) PaperUI where configuration value changes (like IP address changes) are not getting passed down to the binding. I’ve added some code to this new version that explicitly “pulls” new configuration in - hopefully this helps.

Here’s Beta 11 with the above changes:
https://github.com/themillhousegroup/openhab2-addons/releases/download/BROADLINK_2.5.BETA_11/org.openhab.binding.broadlink-2.5.1-SNAPSHOT.jar

Cheers,
John

1 Like

Hi, I am new in openHAB and have just managed to install a simple AVM Fritz-Binding and some other very simple things. So please forgive me asking “stupid” noob questions… :wink:
Could one of you please tell me which Broadlink binding is the best one for my purposes and how to install it (since it does not seem to be listed in bindings for easy one click installation)?
I have a RM Pro, a RM Pro Plus and four RM Mini 3 devices and want to control RF plugs and some IR devices (receiver, TV etc.). Thanks a lot in advance!

PS: I am running openHAB 2.5.6 with PaperUI (which should be the best for beginners, right?) on a Windows 10 PC.

I have three broadlink rm3 mini that works almost always well, but sometimes they miss a command. I also notice in the openhab.log that the things go from Online to Offline (As it is an error), but there is no log line stating that they are online again. Is there a way to know if a command has been received by a device? Alternatively, I was looking for a status channel, but the paperUI does show only the “command” channel. In this case I could re-program a rule that issue the command only if the thing is online.

Thank you,
Lionello

have a new rm4 pro but getting

Plugin didn’t detect it so manual added

Status: OFFLINE - COMMUNICATION_ERROR Couldn’t authenticate

in paper UI any suggestions ?

==> /var/log/openhab2/openhab.log <==

2020-06-29 15:37:37.306 [ERROR] [handler.BroadlinkRemoteModel4Handler] - rm4:38512d12[v]: Authentication failed:

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:191) ~[bundleFile:?]

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

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

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

at org.openhab.binding.broadlink.handler.BroadlinkBaseThingHandler.updateItemStatus(BroadlinkBaseThingHandle

@Lionello_Marrelli

you need to store the thing status into a switch item with a rule like the one

rule "broadlink:sp2:34-ea-34-f5-ae-aa"
when Thing  "broadlink:sp2:34-ea-34-f5-ae-aa" changed
then
{

		var String thingStatusInfo = getThingStatusInfo("broadlink:sp2:34-ea-34-f5-ae-aa").getStatus.toString
		switch (thingStatusInfo) {
			case "ONLINE" : {thingStatusInfo="ON"}
			default : {thingStatusInfo="OFF"}
		}		
		
		
    logInfo("txtBroadlink SP2 [192.168.1.105] SP2_3-thingStatusInfo", thingStatusInfo.toString)
		SP2_3_LastUpdate.postUpdate(new DateTimeType())
		SP2_3_Status.sendCommand(thingStatusInfo.toString)
		

}
end  

you can persist the Switch item and use this timeline Timeline for Basic UI

1 Like

Did you block internet access for your broadlink devices? Mine always disconnected for a few seconds and then reconnected. This stopped when I allowed internet access for the broadling in the router settings.

Hi,
I’m new to openHAB, I use openHAB 2.5.6-2, I downloaded the latest available version of addon:

org.openhab.binding.broadlink-2.5.1-SNAPSHOT.jar

and installed it in the path:
/usr/share/openhab2/addons/
I blocked the internet access of the RM4 mini, I see the device in things but in error:

Broadlink RM4 Mini / RM4 Pro [192.168.2.26]
Broadlink RM4
The Broadlink RM 4 is an IR transmitter with Wi-Fi connectivity.
Status: OFFLINE - COMMUNICATION_ERROR Couldn’t authenticate

In the log I see:

2020-07-03 19: 03: 05.753 [ERROR] [handler.BroadlinkRemoteModel4Handler] - rm4: 24-df-a7-e8-6b-98 [v]: Attempting to authenticate prior to getting device status FAILED. Will mark as offline
2020-07-03 19: 03: 05.755 [WARN] [handler.BroadlinkRemoteModel4Handler] - rm4: 24-df-a7-e8-6b-98 [v]: Online -> Offline due to: Couldn’t authenticate
2020-07-03 19: 03: 35.781 [ERROR] [handler.BroadlinkRemoteModel4Handler] - rm4: 24-df-a7-e8-6b-98 [v]: Authentication failed:
java.net.ProtocolException: Response from device is not valid. (0x22 = 0xFF, 0xFF = 0x23, 0x24 = 0xFF)
at org.openhab.binding.broadlink.internal.BroadlinkProtocol.decodePacket (BroadlinkProtocol.java:191) ~ [bundleFile :?]
at org.openhab.binding.broadlink.handler.BroadlinkBaseThingHandler.decodeDevicePacket (BroadlinkBaseThingHandler.java:206) ~ [bundleFile :?]
at org.openhab.binding.broadlink.handler.BroadlinkBaseThingHandler.authenticate (BroadlinkBaseThingHandler.java:149) [bundleFile :?]
at org.openhab.binding.broadlink.handler.BroadlinkBaseThingHandler.transitionToOnline (BroadlinkBaseThingHandler.java:289) [bundleFile :?]
at org.openhab.binding.broadlink.handler.BroadlinkBaseThingHandler.updateItemStatus (BroadlinkBaseThingHandler.java:245) [bundleFile :?]
at org.openhab.binding.broadlink.handler.BroadlinkBaseThingHandler $ 1.run (BroadlinkBaseThingHandler.java:109) [bundleFile :?]
at java.util.concurrent.Executors $ RunnableAdapter.call (Executors.java:511) [?: 1.8.0_212]
at java.util.concurrent.FutureTask.runAndReset (FutureTask.java:308) [?: 1.8.0_212]
at java.util.concurrent.ScheduledThreadPoolExecutor $ ScheduledFutureTask.access $ 301 (ScheduledThreadPoolExecutor.java:180) [?: 1.8.0_212]
at java.util.concurrent.ScheduledThreadPoolExecutor $ ScheduledFutureTask.run (ScheduledThreadPoolExecutor.java:294) [?: 1.8.0_212]
at java.util.concurrent.ThreadPoolExecutor.runWorker (ThreadPoolExecutor.java:1149) [?: 1.8.0_212]
at java.util.concurrent.ThreadPoolExecutor $ Worker.run (ThreadPoolExecutor.java:624) [?: 1.8.0_212]
at java.lang.Thread.run (Thread.java:748) [?: 1.8.0_212]
2020-07-03 19: 03: 35.789 [ERROR] [handler.BroadlinkRemoteModel4Handler] - rm4: 24-df-a7-e8-6b-98 [v]: Attempting to authenticate prior to getting device status FAILED. Will mark as offline
2020-07-03 19: 03: 35.791 [WARN] [handler.BroadlinkRemoteModel4Handler] - rm4: 24-df-a7-e8-6b-98 [v]: Online -> Offline due to: Couldn’t authenticate

What can I do to make authentication work?
I tried with:
097628343fe99e23765c1513accf8b02
562e17996d093d28ddb3ba695a2e6f58

and

097628343fe99e23765c1513accf8b02
8c393262037dfc87fd511150db7133dd
but I always get the same error.

Can you help me ?
Kind regards,
Elia

It should be part of the Thing definition see below

Hello nakh_Home.
thanks for your answer, but I tried both strings.

I tried with:
097628343fe99e23765c1513accf8b02
562e17996d093d28ddb3ba695a2e6f58

and

097628343fe99e23765c1513accf8b02
8c393262037dfc87fd511150db7133dd

inserting the first in authenticationKey and the second in IV, but I always get the same error in the log.
I am using a mini RM4.
Do you have any other ideas?
Kind regards,
Elia

My RM4 connection to openhab using the broadlink binding was working fine until yesterday. I inadvertently responded to the Broadlink RM4 upgrade request and now - similar to Eliah I am now getting the “Status: OFFLINE - COMMUNICATION_ERROR Couldn’t authenticate”. Has the upgrade changed the authentication key?

Check this:

2 Likes

Love your work - thanks

Hello, I think there is a great job on this Project but I can’t find a complete guide to use the binding. I know how instal the binding on openhab but I don’t know how to set or configure my RM4 pro. I use raspberry and mac for configure the system so python is already installed.
Can someone help me?

Just to say thanks for this nice binding.
I am using RM mini 3 - FCC ID: 2ACDZ-RMMINI3-RM (firmware v44057). It worked smoothly. No issue.
I used an old IHC app not updated since 1 yr to connect my local network. Used broadlink manager to learn codes. All went like charm.
Broadlink binding version: Beta-11,
Openhabian version: 2.5.0-1.

Thanks once again.
Any plan to make it an official binding ?

Hi, I really tried to read this entire thread, but still can’t find a way to control my AC from Openhab, as a start from PaperUI.

Installed Beta 11:

Retrieve the AC codes using Broadlink Manager

Placed in broadlink.map, and placed the map at openhab2-conf\transform\

This is mine map for now (the command works from the broadlink manager)

Blockquote Tadiran_AC_OFF = 2600BC026C741C1E1C591C1E1C5A1E581B5A1C5A1E571F1B1C5A1C1E1B5A1E581C591C5A1C591C1E1F571E1C1E571F1B1C1F1B1E1C1E1C1E1C591C1E1C5A1C1E1C1E1C1E1B1E74711E1C1C591C1E1C5A1E571F571C591C5A1C1E1C591C1E1C5A1B5A1F571C591C5A1C1E1C591F1B1C5A1D1D1B1E1C1F1B1E1C1E1C5A1C1E1C591C1E1C1E1C1E1C1E73711C1F1B5A1C1E1B5A1C5A1B5A1C5A1B5A1F1C1B5A1B1F1B5A1F571E571C5A1B5A1F1B1C5A1B1E1F571C1E1C1E1C1E1B1F1B1E1C5A1C1E1C591C1E1C1F1B1E1C1E73711C0008A073711F571C1E1C1E1C1E1B5A1E1C1C1E1C591F571C1E1C1E1C1E1B5A1E1C1C1E1C591C5A1D581E1C1C1F1B5A1D581E1C1C1E1C591E581D1D1C1E1C591E581D1D1C1E72721D581C1E1D1D1D1D1C591D1D1D1D1D581D591D1D1D1D1D1D1D581D1D1D1D1D581D591D581D1D1D1D1D581D591D1D1D1D1D581D591D1D1D1D1C591D581D1E1C1E72711D591E1C1E1C1E1C1D581D1D1E1C1E571E581D1D1E1C1D1C1E581E1C1E1C1E571C5A1E571C1F1D1C1E571C5A1E1C1E1C1D581C5A1B1F1E1C1E571B5A1C1E1E1C71731F00089F00012691163516111612151216111611161116111635161116121634161216111611161116111612151216111611163516111611161116121512161116351611163513141611163516111600028F131415121611161116111611161215121611161116111611161215351612161116111611161116111612151216111611161116111612151216111635153616111600051C0001239416351611161215121611161116111611163516111810163515121611161116111611161116121611161116351611161116121611161116111635163513381314161116351611160002911014161116121611161116111611161116121512161116111611161116121512161116111611161116111612161116111611161116121512161116111635161116000D05000000000000000000000000

I can’t understand how I actually send the OFF command to the AC,
Tried like that, and it’s not working.

What I did wrong? what I missed?

Hi I found the values. In case someone need them , here they are:
Broadlink Initial Key:
097628343fe99e23765c1513accf8b02
Broadlink initial Vector:
562e17996d093d28ddb3ba695a2e6f58
Port:80

1 Like

Any help for me?