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

PaperUI -> Configuration -> Things -> “your device” -> Edit (the blue circle with a pen) :slight_smile:

?it’s not there?

Ah, it doesn’t seem to be specified for the RM3 device (https://github.com/themillhousegroup/openhab2-addons/blob/master/addons/binding/org.openhab.binding.broadlink/ESH-INF/thing/thing-types.xml#L474-L529)
Weird that @smhgit apparently found it!

@FreddyFox

I’ve found it in the ESH folder at the thing definition. You can use it in the thing file definition (if u are using files for things)

Thing broadlink:rm3:34-ea-34-e3-c1-ca "Broadlink RM3 2" [ ipAddress=".....",
  port=80,
  mac=".....",
  authorizationKey="097628343fe99e23765c1513accf8b02",
  iv="562e17996d093d28ddb3ba695a2e6f58",
  mapFilename=".....",
  pollingInterval=600
  ]
1 Like

Thanks @Dim, I think it would be good to start afresh - over 18 months of stop-start discussions can definitely be condensed down!

2 Likes

Anyone who is interested in hooking their Broadlink RM- or SP- device up to Google Home, there a couple of little tricks you may need to employ to get Switchable items to work, so I’ve written up a blog post about it.

It’s working well for me with an RM3 Mini sending IR commands to Daikin and Panasonic airconditioners:

Hope it helps

3 Likes

:+1:

we have 3 options:

  1. Split this thread to a new one starting from post #572 to keep the recent developments
  2. You create a new empty Thread titled “Broadlink Binding Next-Gen” (or something similar :slight_smile:)
  3. You select the posts that you want to be transferred to a new thread from here and we create a new one based on your selection

What do you prefer?

Of course, we will add a placeholder on the first post in this thread to point to the new thread

1 Like

I reckon we go with a completely clean slate - option 2. Then I’ll write one big post to head up the “Next-Gen” topic, with everything up-to-date as of now; installation, discovery, how to store IR codes on IR blaster devices, known issues, etc.

2 Likes

One (possibly!) last announcement on this thread - BETA-9 is now available:

https://dl.bintray.com/themillhousegroup/generic/org.openhab.binding.broadlink-2.4.0-BETA-9.jar

The main feature of this version is support for Dynamic IP Addresses.
There is a new switch available under the advanced Thing properties (open the SHOW MORE area in PaperUI) - it’s marked “Static IP” and it defaults to ON. If you are on a network where your Broadlink device might periodically be issued a different IP address, move it to the OFF position.

Now, if we lose communications with this Thing, rather than mark it OFFLINE, we’ll go into a mini-Discovery mode, and attempt to find the device on the network again, using its MAC address (which never changes).
If we find the device, we update its current IP address in its Thing config, and everything continues without a hiccup. If we fail to find it, it goes OFFLINE as normal.

I should give credit to the LIFX binding which uses a very similar scheme - by chance I happened to come across it and realised it would be great for Broadlink devices too. As an extra bonus, it prompted me to redesign the entire discovery system and make it asynchronous; as a result it is now MUCH more reliable at finding devices (particularly if you have multiple Broadlink devices on your network) without having to scan repeatedly.

I know there have been people in this thread who were looking for this feature - hopefully they can give this a try and give some feedback!

@themillhousegroup
Thx for your continues improvements!!! I have just downloaded the new version and will report

agree with DIM i want to help pepole here , and i am not even able to find the orginal instractions …

1 Like

Give John some time to complete his stuff and he will create a new, nice, clean thread for his developments :slight_smile: See here: Broadlink binding for RMx, A1, SPx and MP. Any interest?

I like his blog posts by the way :slight_smile: http://blog.themillhousegroup.com/2018/12/green-millhouse-ok-google-turn-on.html

@themillhousegroup

I still have issue with my second rm3 (rm3-2). I suspect it is related to the fact that the connection to the device is not “perfect” (see pings below). Is this something that can be handled in the binding (e.g., increase wit time for response etc.)?

2018-12-07 11:43:12.359 [TRACE] [nk.handler.BroadlinkBaseThingHandler] - broadlink:rm3:34-ea-34-e0-b2-44: updateItemStatus; checking host availability at rm3-1.lan
2018-12-07 11:43:18.497 [TRACE] [nk.handler.BroadlinkBaseThingHandler] - broadlink:rm3:34-ea-34-e3-c1-ca: updateItemStatus; checking host availability at rm3-2.lan
2018-12-07 11:53:12.369 [TRACE] [nk.handler.BroadlinkBaseThingHandler] - broadlink:rm3:34-ea-34-e0-b2-44: updateItemStatus; checking host availability at rm3-1.lan
2018-12-07 11:53:21.506 [TRACE] [nk.handler.BroadlinkBaseThingHandler] - broadlink:rm3:34-ea-34-e3-c1-ca: updateItemStatus; checking host availability at rm3-2.lan
2018-12-07 11:53:21.924 [DEBUG] [nk.handler.BroadlinkBaseThingHandler] - broadlink:rm3:34-ea-34-e3-c1-ca: We've never actually successfully authenticated with this device in this session. Doing so now
2018-12-07 11:53:21.926 [DEBUG] [nk.handler.BroadlinkBaseThingHandler] - broadlink:rm3:34-ea-34-e3-c1-ca: Authenticating with packet count = 52609
2018-12-07 11:53:21.931 [TRACE] [nk.handler.BroadlinkBaseThingHandler] - broadlink:rm3:34-ea-34-e3-c1-ca: Sending authentication to rm3-2.lan:80
2018-12-07 11:53:21.934 [TRACE] [nk.handler.BroadlinkBaseThingHandler] - broadlink:rm3:34-ea-34-e3-c1-ca: Sending authentication complete
2018-12-07 11:53:21.936 [TRACE] [nk.handler.BroadlinkBaseThingHandler] - broadlink:rm3:34-ea-34-e3-c1-ca: Receiving authentication
2018-12-07 11:53:21.976 [DEBUG] [nk.handler.BroadlinkBaseThingHandler] - broadlink:rm3:34-ea-34-e3-c1-ca: Authenticated with id '02000000' and key 'F991BF12F991BF122F0536026678AC71'.
2018-12-07 11:53:21.979 [DEBUG] [nk.handler.BroadlinkBaseThingHandler] - broadlink:rm3:34-ea-34-e3-c1-ca: Authenticated with newly-detected device, will now get its status
2018-12-07 11:53:21.980 [me.event.ThingUpdatedEvent] - Thing 'broadlink:rm3:34-ea-34-e3-c1-ca' has been updated.
2018-12-07 11:53:21.982 [DEBUG] [nk.handler.BroadlinkBaseThingHandler] - broadlink:rm3:34-ea-34-e3-c1-ca: updateStatus: Offline -> Online
2018-12-07 11:53:21.983 [me.event.ThingUpdatedEvent] - Thing 'broadlink:rm3:34-ea-34-e3-c1-ca' has been updated.
2018-12-07 11:53:21.994 [hingStatusInfoChangedEvent] - 'broadlink:rm3:34-ea-34-e3-c1-ca' changed from OFFLINE (COMMUNICATION_ERROR): Could not find device at IP address rm3-2.lan to ONLINE
2018-12-07 12:03:12.377 [TRACE] [nk.handler.BroadlinkBaseThingHandler] - broadlink:rm3:34-ea-34-e0-b2-44: updateItemStatus; checking host availability at rm3-1.lan
2018-12-07 12:03:21.987 [TRACE] [nk.handler.BroadlinkBaseThingHandler] - broadlink:rm3:34-ea-34-e3-c1-ca: updateItemStatus; checking host availability at rm3-2.lan
2018-12-07 12:03:24.999 [DEBUG] [nk.handler.BroadlinkBaseThingHandler] - broadlink:rm3:34-ea-34-e3-c1-ca: Statically-IP-addressed device not found at rm3-2.lan
2018-12-07 12:03:25.003 [ERROR] [nk.handler.BroadlinkBaseThingHandler] - broadlink:rm3:34-ea-34-e3-c1-ca: updateItemStatus: Online -> Offline
2018-12-07 12:03:25.013 [me.event.ThingUpdatedEvent] - Thing 'broadlink:rm3:34-ea-34-e3-c1-ca' has been updated.
2018-12-07 12:03:25.022 [me.event.ThingUpdatedEvent] - Thing 'broadlink:rm3:34-ea-34-e3-c1-ca' has been updated.
2018-12-07 12:03:25.031 [hingStatusInfoChangedEvent] - 'broadlink:rm3:34-ea-34-e3-c1-ca' changed from ONLINE to OFFLINE (COMMUNICATION_ERROR): Could not find device at IP address rm3-2.lan
2018-12-07 12:13:12.390 [TRACE] [nk.handler.BroadlinkBaseThingHandler] - broadlink:rm3:34-ea-34-e0-b2-44: updateItemStatus; checking host availability at rm3-1.lan
2018-12-07 12:13:25.028 [TRACE] [nk.handler.BroadlinkBaseThingHandler] - broadlink:rm3:34-ea-34-e3-c1-ca: updateItemStatus; checking host availability at rm3-2.lan
2018-12-07 12:13:25.441 [DEBUG] [nk.handler.BroadlinkBaseThingHandler] - broadlink:rm3:34-ea-34-e3-c1-ca: We've never actually successfully authenticated with this device in this session. Doing so now
2018-12-07 12:13:25.444 [DEBUG] [nk.handler.BroadlinkBaseThingHandler] - broadlink:rm3:34-ea-34-e3-c1-ca: Authenticating with packet count = 52610
2018-12-07 12:13:25.449 [TRACE] [nk.handler.BroadlinkBaseThingHandler] - broadlink:rm3:34-ea-34-e3-c1-ca: Sending authentication to rm3-2.lan:80
2018-12-07 12:13:25.452 [TRACE] [nk.handler.BroadlinkBaseThingHandler] - broadlink:rm3:34-ea-34-e3-c1-ca: Sending authentication complete
2018-12-07 12:13:25.455 [TRACE] [nk.handler.BroadlinkBaseThingHandler] - broadlink:rm3:34-ea-34-e3-c1-ca: Receiving authentication
2018-12-07 12:13:30.465 [DEBUG] [nk.handler.BroadlinkBaseThingHandler] - broadlink:rm3:34-ea-34-e3-c1-ca: No further authentication response received for device
2018-12-07 12:13:30.468 [ERROR] [nk.handler.BroadlinkBaseThingHandler] - broadlink:rm3:34-ea-34-e3-c1-ca: Authenticate - failed to receive.
2018-12-07 12:13:30.473 [ERROR] [nk.handler.BroadlinkBaseThingHandler] - broadlink:rm3:34-ea-34-e3-c1-ca: Attempting to authenticate prior to getting device status FAILED


PING rm3-2.lan (192.168.0.102): 56 data bytes
64 bytes from 192.168.0.102: icmp_seq=0 ttl=255 time=51.937 ms
Request timeout for icmp_seq 1
Request timeout for icmp_seq 2
64 bytes from 192.168.0.102: icmp_seq=3 ttl=255 time=59.792 ms
Request timeout for icmp_seq 4
Request timeout for icmp_seq 5
Request timeout for icmp_seq 6

Wow @smhgit that’s certainly going to be a challenge to handle!

In order to deal with such an unreliable connection, every single time we send a packet to the device, we’ll have to be able to retry it if we didn’t receive a reply.

I’ll admit my first instinct was “too hard, don’t do it” … but … my goal for this binding has always for it to be really robust and reliable. Dealing with lossy networks is definitely something that reliable software does. So leave it with me, and let’s see what I can do for BETA-10 :slight_smile:

2 Likes

@themillhousegroup

Great, thx! i thought of trying to improve the connection but I will keep it that way so you will have a debug site for your next version :slight_smile:

@themillhousegroup

One more thing, currently I check for broadlink device online with network binding:

Switch Rm3_1_Online "RM3 [MAP(online.map):%s]" { channel="network:pingdevice:34-ea-34-e0-b2-44:online" }

Can something like LIFX thing status can be added to the binding?

You are a myth John !
Thank you for your time and your interest!

Hi.
I have a strong connection and 2 rm3.
But randomly i lost connection with my black beans.
Maybe the problem is not only a poor connection.
:confused:

1 Like

Hey @themillhousegroup

I have a question that might be of use.

Once sorted the rules and groups, i shoudl be able to command 3 fans+3dimmable lights+3led nightlights with your binding.

Whereas if i issue a group command like “switch all the sockets on” that conearns z-wave devices, each with its own timing, but they will switch on, i wander what would happen if i was going to make a group of the rf433 fans and issue the command “turn all the fans on”.
Is there some kind of a buffer of queueing of commands included within the binding (as the RM3 suerly can’t send 3 rf433 signals at once) or would it be better to chain such a command in a rule with a staggered start?

thank you for your hard work, really appreciated.

I’ve got the same issue with the errors in the log file.
The SP3 works ok manually and with rules, also status of the device seems ok, but these communication errors stay in the logs…

2018-12-09 07:30:58.125 [.event.RuleStatusInfoEvent] - 02e707eb-7160-4b21-871e-2dab536ac5de updated: IDLE
2018-12-09 07:30:58.131 [vent.ItemStateChangedEvent] - BroadlinkSW_B changed from ON to OFF
2018-12-09 07:46:08.758 [hingStatusInfoChangedEvent] - 'broadlink:sp2:34-ea-34-f5-aa-72' changed from ONLINE to OFFLINE (COMMUNICATION_ERROR): Could not find device at IP address 192.168.178.13
2018-12-09 07:46:38.966 [hingStatusInfoChangedEvent] - 'broadlink:sp2:34-ea-34-f5-aa-72' changed from OFFLINE (COMMUNICATION_ERROR): Could not find device at IP address 192.168.178.13 to ONLINE
2018-12-09 09:16:57.097 [hingStatusInfoChangedEvent] - 'broadlink:sp2:34-ea-34-f5-aa-72' changed from ONLINE to OFFLINE (COMMUNICATION_ERROR): Could not find device at IP address 192.168.178.13
2018-12-09 09:17:27.232 [hingStatusInfoChangedEvent] - 'broadlink:sp2:34-ea-34-f5-aa-72' changed from OFFLINE (COMMUNICATION_ERROR): Could not find device at IP address 192.168.178.13 to ONLINE
2018-12-09 09:38:04.929 [hingStatusInfoChangedEvent] - 'broadlink:sp2:34-ea-34-f5-aa-72' changed from ONLINE to OFFLINE (COMMUNICATION_ERROR): Could not find device at IP address 192.168.178.13
2018-12-09 09:38:35.062 [hingStatusInfoChangedEvent] - 'broadlink:sp2:34-ea-34-f5-aa-72' changed from OFFLINE (COMMUNICATION_ERROR): Could not find device at IP address 192.168.178.13 to ONLINE
2018-12-09 11:14:22.922 [hingStatusInfoChangedEvent] - 'broadlink:sp2:34-ea-34-f5-aa-72' changed from ONLINE to OFFLINE (COMMUNICATION_ERROR): Could not find device at IP address 192.168.178.13
2018-12-09 11:14:53.081 [hingStatusInfoChangedEvent] - 'broadlink:sp2:34-ea-34-f5-aa-72' changed from OFFLINE (COMMUNICATION_ERROR): Could not find device at IP address 192.168.178.13 to ONLINE
2018-12-09 13:48:24.617 [hingStatusInfoChangedEvent] - 'broadlink:sp2:34-ea-34-f5-aa-72' changed from ONLINE to OFFLINE (COMMUNICATION_ERROR): Could not find device at IP address 192.168.178.13
2018-12-09 13:48:54.817 [hingStatusInfoChangedEvent] - 'broadlink:sp2:34-ea-34-f5-aa-72' changed from OFFLINE (COMMUNICATION_ERROR): Could not find device at IP address 192.168.178.13 to ONLINE
2018-12-09 14:38:06.372 [hingStatusInfoChangedEvent] - 'broadlink:sp2:34-ea-34-f5-aa-72' changed from ONLINE to OFFLINE (COMMUNICATION_ERROR): Could not find device at IP address 192.168.178.13
2018-12-09 14:38:36.582 [hingStatusInfoChangedEvent] - 'broadlink:sp2:34-ea-34-f5-aa-72' changed from OFFLINE (COMMUNICATION_ERROR): Could not find device at IP address 192.168.178.13 to ONLINE

2018-12-09 14:48:13.330 [hingStatusInfoChangedEvent] - 'broadlink:sp2:34-ea-34-f5-aa-72' changed from ONLINE to OFFLINE (COMMUNICATION_ERROR): Could not find device at IP address 192.168.178.13
2018-12-09 14:48:43.460 [hingStatusInfoChangedEvent] - 'broadlink:sp2:34-ea-34-f5-aa-72' changed from OFFLINE (COMMUNICATION_ERROR): Could not find device at IP address 192.168.178.13 to ONLINE
2018-12-09 16:30:10.081 [.event.RuleStatusInfoEvent] - b8777c82-9aa2-4b48-a410-ec6855f71e98 updated: RUNNING
2018-12-09 16:30:10.095 [ome.event.ItemCommandEvent] - Item 'BroadlinkSW_B' received command ON
2018-12-09 16:30:10.100 [.event.RuleStatusInfoEvent] - b8777c82-9aa2-4b48-a410-ec6855f71e98 updated: IDLE
2018-12-09 16:30:10.116 [vent.ItemStateChangedEvent] - BroadlinkSW_B changed from OFF to ON