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


(Jörg Mahmens) #593

Hi there, I have a simmilar problem with a SPmini2, After a short time the Itemstate changes from ‘on’ to ‘off’.
Only the shown state not the SPmini2. I will take later the new Beta and report.
Btw. the SPmini2 dosn’t support the second ‘Item PowerConsumtion’ only PowerSwitch.
I think all SPmini dosn’t do this. So the SPmini maybe created as a new ‘Thing’.


(Jorg Coevert) #594

Hi,
Thank you for your quick response.
I’m more than willing to help you us finding and solving this problem.
It’s been bugging me for over a year now.
Yesterday I even ordered a RM3 Pro to get around this problem (I hope).

I will test it out soon and give you all the info.


(Jorg Coevert) #595

This is the LOG from the test that I did for my SP3.
Through the "INBOX -> Devices Scan " the binding sees my SP3 as an SP2.
I can add it as a SP2 from this auto-scan or as a manual SP3 thing, but the issue stays the same. I tried both.

==> /var/log/openhab2/openhab.log <==
2018-11-27 14:19:44.019 [INFO ] [.discovery.BroadlinkDiscoveryService] - BroadlinkDiscoveryService - Constructed
2018-11-27 14:20:03.931 [WARN ] [.discovery.BroadlinkDiscoveryService] - BroadlinkDiscoveryService - Beginning Broadlink device scan...
2018-11-27 14:20:03.964 [WARN ] [.discovery.BroadlinkDiscoveryService] - BroadlinkDiscoveryService - Broadlink device scan waiting for 10 seconds to complete ...
2018-11-27 14:20:03.994 [INFO ] [.discovery.BroadlinkDiscoveryService] - Data received during Broadlink device discovery: from 192.168.178.13:80[34:ea:34:f5:aa:72]
2018-11-27 14:20:04.022 [INFO ] [g.discovery.internal.PersistentInbox] - Added new thing 'broadlink:sp2:34-ea-34-f5-aa-72' to inbox.

==> /var/log/openhab2/events.log <==
2018-11-27 14:20:04.022 [home.event.InboxAddedEvent] - Discovery Result with UID 'broadlink:sp2:34-ea-34-f5-aa-72' has been added.

==> /var/log/openhab2/openhab.log <==
2018-11-27 14:20:13.968 [WARN ] [.discovery.BroadlinkDiscoveryService] - BroadlinkDiscoveryService - 10 second wait complete ...
2018-11-27 14:20:13.973 [WARN ] [.discovery.BroadlinkDiscoveryService] - BroadlinkDiscoveryService - Ended Broadlink device scan...
2018-11-27 14:20:13.978 [INFO ] [link.internal.socket.BroadlinkSocket] - Socket closed
2018-11-27 14:20:13.984 [INFO ] [link.internal.socket.BroadlinkSocket] - Receiver thread ended
2018-11-27 14:20:23.919 [WARN ] [.discovery.BroadlinkDiscoveryService] - BroadlinkDiscoveryService - Beginning Broadlink device scan...
2018-11-27 14:20:23.926 [WARN ] [.discovery.BroadlinkDiscoveryService] - BroadlinkDiscoveryService - Broadlink device scan waiting for 10 seconds to complete ...
2018-11-27 14:20:24.003 [INFO ] [.discovery.BroadlinkDiscoveryService] - Data received during Broadlink device discovery: from 192.168.178.13:80[34:ea:34:f5:aa:72]
2018-11-27 14:20:33.930 [WARN ] [.discovery.BroadlinkDiscoveryService] - BroadlinkDiscoveryService - 10 second wait complete ...
2018-11-27 14:20:33.934 [WARN ] [.discovery.BroadlinkDiscoveryService] - BroadlinkDiscoveryService - Ended Broadlink device scan...
2018-11-27 14:20:33.938 [INFO ] [link.internal.socket.BroadlinkSocket] - Socket closed
2018-11-27 14:20:33.942 [INFO ] [link.internal.socket.BroadlinkSocket] - Receiver thread ended

==> /var/log/openhab2/events.log <==
2018-11-27 14:20:50.656 [me.event.InboxRemovedEvent] - Discovery Result with UID 'broadlink:sp2:34-ea-34-f5-aa-72' has been removed.
2018-11-27 14:20:50.681 [hingStatusInfoChangedEvent] - 'broadlink:sp2:34-ea-34-f5-aa-72' changed from UNINITIALIZED to UNINITIALIZED (HANDLER_CONFIGURATION_PENDING)
2018-11-27 14:21:58.714 [hingStatusInfoChangedEvent] - 'broadlink:sp2:34-ea-34-f5-aa-72' changed from UNINITIALIZED (HANDLER_CONFIGURATION_PENDING) to INITIALIZING
2018-11-27 14:21:58.844 [hingStatusInfoChangedEvent] - 'broadlink:sp2:34-ea-34-f5-aa-72' changed from INITIALIZING to ONLINE
2018-11-27 14:22:07.748 [.ItemChannelLinkAddedEvent] - Link 'BroadlinkSW_B-broadlink:sp2:34-ea-34-f5-aa-72:powerOn' has been added.
2018-11-27 14:23:37.796 [ome.event.ItemCommandEvent] - Item 'BroadlinkSW_B' received command ON
2018-11-27 14:23:37.809 [vent.ItemStateChangedEvent] - BroadlinkSW_B changed from OFF to ON
2018-11-27 14:24:00.199 [vent.ItemStateChangedEvent] - BroadlinkSW_B changed from ON to OFF
2018-11-27 14:24:09.061 [ome.event.ItemCommandEvent] - Item 'BroadlinkSW_B' received command ON
2018-11-27 14:24:09.087 [vent.ItemStateChangedEvent] - BroadlinkSW_B changed from OFF to ON
2018-11-27 14:24:14.059 [ome.event.ItemCommandEvent] - Item 'BroadlinkSW_B' received command OFF
2018-11-27 14:24:14.092 [vent.ItemStateChangedEvent] - BroadlinkSW_B changed from ON to OFF
2018-11-27 14:24:21.854 [ome.event.ItemCommandEvent] - Item 'BroadlinkSW_B' received command ON
2018-11-27 14:24:21.874 [vent.ItemStateChangedEvent] - BroadlinkSW_B changed from OFF to ON
2018-11-27 14:24:30.213 [vent.ItemStateChangedEvent] - BroadlinkSW_B changed from ON to OFF
2018-11-27 14:24:40.558 [ome.event.ItemCommandEvent] - Item 'BroadlinkSW_B' received command ON
2018-11-27 14:24:40.572 [vent.ItemStateChangedEvent] - BroadlinkSW_B changed from OFF to ON
2018-11-27 14:25:00.234 [vent.ItemStateChangedEvent] - BroadlinkSW_B changed from ON to OFF
2018-11-27 14:25:05.614 [ome.event.ItemCommandEvent] - Item 'BroadlinkSW_B' received command ON
2018-11-27 14:25:05.635 [vent.ItemStateChangedEvent] - BroadlinkSW_B changed from OFF to ON
2018-11-27 14:25:11.696 [ome.event.ItemCommandEvent] - Item 'BroadlinkSW_B' received command OFF
2018-11-27 14:25:11.716 [vent.ItemStateChangedEvent] - BroadlinkSW_B changed from ON to OFF

(maras) #596
2018-11-27 20:53:09.510 [WARN ] [.discovery.BroadlinkDiscoveryService] - BroadlinkDiscoveryService - Beginning Broadlink device scan...

2018-11-27 20:53:09.522 [WARN ] [.discovery.BroadlinkDiscoveryService] - BroadlinkDiscoveryService - Broadlink device scan waiting for 10 seconds to complete ...

2018-11-27 20:53:09.703 [INFO ] [.discovery.BroadlinkDiscoveryService] - Data received during Broadlink device discovery: from 192.168.0.125:80[78:0f:77:5a:4a:2f]

At Paper UI I still have “Thing not found”

2018-11-27 20:53:19.524 [WARN ] [.discovery.BroadlinkDiscoveryService] - BroadlinkDiscoveryService - 10 second wait complete ...
2018-11-27 20:53:19.528 [WARN ] [.discovery.BroadlinkDiscoveryService] - BroadlinkDiscoveryService - Ended Broadlink device scan...
2018-11-27 20:53:19.533 [INFO ] [link.internal.socket.BroadlinkSocket] - Socket closed

(Dario) #597

Hello all.

I’ve read this over 1 year long post and i’m overwhelmed by the amount of options, not being sure anymore what is obsolete and what isn’t, nor what to go for.

I have a RMpro+, i use it to command RF fans and few other things that won’t report statuses back.
I’d like to include those devices in my OH automation.

I see that the original binding postd by @Cato_Sognen has been abandoned.
Am i right in understanding that the most up to date projects are the ones carried forward by @themillhousegroup and the https://github.com/fbacker/broadlink-mqtt-bridge @backer?
what about https://github.com/psyciknz/broadlink-mqtt ?

or was any of the above abandoned but left stable and in working order?

Are any of the tools mentioned earlier, like https://sourceforge.net/projects/broadlink-manager/
or
https://github.com/NightRang3r/Broadlink-e-control-db-dump
still of any use?

I just really would like to understand which way to go, i’m not an expert, so most likely any direction will take a lot of studying, hence i’d prefer to make an informed decision.

I should mention that i’m stuck on OH 2.2 due to the binding with z-way working and my sistem relying mostly on it


(John Marshall) #598

Hey @Jorg, I’ve just released BETA-6 which hopefully will fix both the misidentification of SP3 devices as SP2s, and the incorrect ON/OFF polling.

More details over on my blog but I should give credit here to the python-broadlink project - they seem to have gone through many of the same issues (and it appears to have probably been the starting point for a lot of Cato’s original code).


(John Marshall) #599

Hi @lagging,
I can’t speak for any of the other projects/tools but my port/reverse-engineer of @Cato_Sognen’s OpenHAB Broadlink binding is under active development and I encourage as many people as possible to use it with as many diverse Broadlink devices as possible.

I myself have it in daily use with an A1 and an RM3 Mini and it is completely stable and reliable. It would be great if you could try it with your RMpro+ and let me know a) if it gets discovered and identified correctly b) if sending commands works when set up as per the guides further up this thread.

Thanks!


(Dario) #600

hi @themillhousegroup
Thanks for the prompt response - will start with it by the end of the week then!:grimacing:

May i ask- is there a guide i should follow (…maybe a post in this thread… or maybe operations have stayed the same from the beginning)?
any known pitfalls?
Should i acquire the signals of the remotes first via the broadlink app and then start with the binding?

----edit

i’ll just quote 2 bits of info i found sifting through the thread again:

from aug 17 by @X-Ray181 (ofc some of the info is obsolete, but the process of installation i guess is still relevant)

and by @themillhousegroup

Still trying to put order to the info given before getting to it.


(Jorg Coevert) #601

Hi @themillhousegroup,
Thank you for the quick release of a new BETA.

I removed the BETA-5 file and placed the BETA-6 file in the same /srv/openhab2-addons directory.
I tested the SP3 but unfortunately the device will again show status OFFLINE after a few seconds, after switching the SP3 ON.

A question, just to be sure…
Do I only have to replace the files, or do I also have to remove the THING and add it as a new THING?
Or are there other steps to take, besides replacing the files? Rebooting maybe?

Edit:
Here’s the new log…

==> /var/log/openhab2/events.log <==
2018-11-28 14:45:36.166 [hingStatusInfoChangedEvent] - 'broadlink:sp2:34-ea-34-f5-aa-72' changed from ONLINE to UNINITIALIZED
2018-11-28 14:45:36.178 [hingStatusInfoChangedEvent] - 'broadlink:sp2:34-ea-34-f5-aa-72' changed from UNINITIALIZED to UNINITIALIZED (HANDLER_MISSING_ERROR)

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

2018-11-28 14:45:56.664 [INFO ] [.discovery.BroadlinkDiscoveryService] - BroadlinkDiscoveryService - Constructed

==> /var/log/openhab2/events.log <==
2018-11-28 14:45:56.877 [hingStatusInfoChangedEvent] - 'broadlink:sp2:34-ea-34-f5-aa-72' changed from UNINITIALIZED (HANDLER_MISSING_ERROR) to INITIALIZING
2018-11-28 14:45:57.035 [hingStatusInfoChangedEvent] - 'broadlink:sp2:34-ea-34-f5-aa-72' changed from INITIALIZING to ONLINE

2018-11-28 14:47:11.639 [ome.event.ItemCommandEvent] - Item 'BroadlinkSW_B' received command ON
2018-11-28 14:47:11.670 [vent.ItemStateChangedEvent] - BroadlinkSW_B changed from OFF to ON
2018-11-28 14:47:28.289 [vent.ItemStateChangedEvent] - BroadlinkSW_B changed from ON to OFF

2018-11-28 14:48:23.490 [ome.event.ItemCommandEvent] - Item 'BroadlinkSW_B' received command ON
2018-11-28 14:48:23.506 [vent.ItemStateChangedEvent] - BroadlinkSW_B changed from OFF to ON
2018-11-28 14:48:28.357 [vent.ItemStateChangedEvent] - BroadlinkSW_B changed from ON to OFF

2018-11-28 14:48:28.492 [ome.event.ItemCommandEvent] - Item 'BroadlinkSW_B' received command OFF
2018-11-28 14:48:38.361 [ome.event.ItemCommandEvent] - Item 'BroadlinkSW_B' received command ON
2018-11-28 14:48:38.373 [vent.ItemStateChangedEvent] - BroadlinkSW_B changed from OFF to ON
2018-11-28 14:48:58.373 [vent.ItemStateChangedEvent] - BroadlinkSW_B changed from ON to OFF

2018-11-28 14:49:16.175 [ome.event.ItemCommandEvent] - Item 'BroadlinkSW_B' received command ON
2018-11-28 14:49:16.189 [vent.ItemStateChangedEvent] - BroadlinkSW_B changed from OFF to ON
2018-11-28 14:49:24.119 [ome.event.ItemCommandEvent] - Item 'BroadlinkSW_B' received command OFF
2018-11-28 14:49:24.139 [vent.ItemStateChangedEvent] - BroadlinkSW_B changed from ON to OFF
2018-11-28 14:49:44.482 [ome.event.ItemCommandEvent] - Item 'BroadlinkSW_B' received command ON
2018-11-28 14:49:44.499 [vent.ItemStateChangedEvent] - BroadlinkSW_B changed from OFF to ON
2018-11-28 14:49:54.160 [ome.event.ItemCommandEvent] - Item 'BroadlinkSW_B' received command OFF
2018-11-28 14:49:54.174 [vent.ItemStateChangedEvent] - BroadlinkSW_B changed from ON to OFF



(Jörg Mahmens) #602

Hi there, I tested the BETA-6 with following result.
Frist drop SPMini2 thing then start inbox and add Bloadlink thing.

2018-11-28 19:00:16.621 [me.event.ThingUpdatedEvent] - Thing 'broadlink:sp2:34-ea-34-f4-f5-9b' has been updated.
2018-11-28 19:00:16.625 [hingStatusInfoChangedEvent] - 'broadlink:sp2:34-ea-34-f4-f5-9b' changed from UNINITIALIZED (HANDLER_CONFIGURATION_PENDING) to INITIALIZING
2018-11-28 19:00:16.845 [me.event.ThingUpdatedEvent] - Thing 'broadlink:sp2:34-ea-34-f4-f5-9b' has been updated.
2018-11-28 19:00:17.220 [me.event.ThingUpdatedEvent] - Thing 'broadlink:sp2:34-ea-34-f4-f5-9b' has been updated.
2018-11-28 19:00:17.532 [me.event.ThingUpdatedEvent] - Thing 'broadlink:sp2:34-ea-34-f4-f5-9b' has been updated.
2018-11-28 19:00:18.019 [me.event.ThingUpdatedEvent] - Thing 'broadlink:sp2:34-ea-34-f4-f5-9b' has been updated.
2018-11-28 19:00:18.032 [hingStatusInfoChangedEvent] - 'broadlink:sp2:34-ea-34-f4-f5-9b' changed from INITIALIZING to ONLINE
2018-11-28 19:00:26.257 [.ItemChannelLinkAddedEvent] - Link 'broadlink_sp2_34_ea_34_f4_f5_9b_powerOn-broadlink:sp2:34-ea-34-f4-f5-9b:powerOn' has been added.
2018-11-28 19:00:48.948 [vent.ItemStateChangedEvent] - broadlink_sp2_34_ea_34_f4_f5_9b_powerOn changed from NULL to OFF
2018-11-28 19:01:30.581 [ome.event.ItemCommandEvent] - Item 'broadlink_sp2_34_ea_34_f4_f5_9b_powerOn' received command ON
2018-11-28 19:01:30.596 [nt.ItemStatePredictedEvent] - broadlink_sp2_34_ea_34_f4_f5_9b_powerOn predicted to become ON
2018-11-28 19:01:30.612 [vent.ItemStateChangedEvent] - broadlink_sp2_34_ea_34_f4_f5_9b_powerOn changed from OFF to ON
2018-11-28 19:01:49.048 [vent.ItemStateChangedEvent] - broadlink_sp2_34_ea_34_f4_f5_9b_powerOn changed from ON to OFF

Lastline is don by it self


(Dario) #603

Installed the jar! (tiny personal success there, it was the first time)
…however my Braodlink device isn’t detected during the things discovery. I’ve re-run the discovery few times but to no avail.
It’s the RM pro+ :scream::sob: oh wait but the serial starts with RM3!!! i see how this is.

I have the IP and the MAC address or the RM3, but i can’t find the initalization vector and authentication to add it manually . Googling for those 2… well aside for this thread i’ve found a github repo for a python program to control broadlink devices… hmm.

any hint?


(Ray) #604

#516

Key = 097628343fe99e23765c1513accf8b02

Vector =562e17996d093d28ddb3ba695a2e6f58


(Dario) #605

i thought that #516 meant check the post 516 in this thread … but no.

so- out of curiosity and for my studying:where did you find the info?

also:
i’m guessing the port is gonna be 80?


(Ray) #606

I searched this thread for “vector” and it came up with post #516, checking that, it was something like #504 so i copied the info


(Dario) #607

reposting another bit of information i had overlooked


(Ray) #608

I 'm using the rm plugin on an android device as an http bridge for my mp1’s and sp3’s, since they don,t work reliable in the binding yet,
Binding version off John works ok with my rm3 minis and 2 rm2 pro’s
Only when they go offline they dont come back online till i restart oh


(Dario) #609


i am missing something here.

  • i’ve installed the jar. - success
  • i’ve installed the broadlink bridge app, and i start running it as server on my phone within the same wlan, in the settings i don’t see ports or vctor or anything alike of the rm3
  • i’ve also downloaded their in browser interface on my pc
  • I can’t locate the port on which the rm3 is communicating -(ip and mac are known to me from my router).

I’ve run comprehensive scans of all tcp and udp ports on it from nmap. the results coudl be interesting to anyone who knows what to look for… i can’t wrap my head around it much:

TCP:
Nmap scan report for 192.168.1.21
Host is up (0.0051s latency).
All 65535 scanned ports on 192.168.1.21 are closed



UDP:
Not shown: 1997 closed ports


PORT      STATE         SERVICE VERSION
80/udp    open          snmp    SNMPv3 server

| fingerprint-strings: 
|   SIPOptions: 
|     OPTIONS sip:nm SIP/2.0
|     Via: SIP
|_    nm;branch=foo;r
|_snmp-info: ERROR: Script execution failed (use -d to debug)

49154/udp open|filtered unknown

49161/udp open          snmp    SNMPv3 server
| fingerprint-strings: 
|   SIPOptions: 
|     OPTIONS sip:nm SIP/2.0
|     Via: SIP
|_    nm;branch=foo;r

|_snmp-info: ERROR: Script execution failed (use -d to debug)

2 services unrecognized despite returning data. If you know the service/version, please submit the following fingerprints at https://nmap.org/cgi-bin/submit.cgi?new-service :

==============NEXT SERVICE FINGERPRINT (SUBMIT INDIVIDUALLY)==============

SF-Port80-UDP:V=7.70%I=7%D=11/28%Time=5BFF0BF0%P=i686-pc-windows-windows%r
SF:(SIPOptions,38,"OPTIONS\x20sip:nm\x20SIP/2\.0\r\nVia:\x20SIP\r\xd1\xf9\
SF:xff/U\xc8S\x20nm;branch=foo;r")%r(SNMPv3GetRequest,38,"0:\x02\x01\x030\
SF:x0f\x02\x02Ji\x02\x03\0\xff\xe3\x04\x01\x04\x02\x01\x03\x04\x100\x0e\x0
SF:4\0\x02\x01\0\x02\x13\xc7\xf9\xff\x04\0\x88\x030\x12\x04\0\x04\0\xa0\x0
SF:c\x02\x027\xf0\x02\x01\0\x02");

==============NEXT SERVICE FINGERPRINT (SUBMIT INDIVIDUALLY)==============

SF-Port49161-UDP:V=7.70%I=7%D=11/28%Time=5BFF0BEB%P=i686-pc-windows-window
SF:s%r(SIPOptions,38,"OPTIONS\x20sip:nm\x20SIP/2\.0\r\nVia:\x20SIP\r\xd1\x
SF:f9\xff/U\xc8S\x20nm;branch=foo;r")%r(SNMPv3GetRequest,38,"0:\x02\x01\x0
SF:30\x0f\x02\x02Ji\x02\x03\0\xff\xe3\x04\x01\x04\x02\x01\x03\x04\x100\x0e
SF:\x04\0\x02\x01\0\x02\x13\xc7\xf9\xff\x04\0\x88\x030\x12\x04\0\x04\0\xa0
SF:\x0c\x02\x027\xf0\x02\x01\0\x02");

Anyone got anything out of this?
Wasn’t there some MQTT under the hood of this binding? Is it possible that the thing doesn’t open TCP ports for it?
I’ve anyhow tried all 3 UDP open ports in the binding settings, but it doesn’t come online.

any help?
–asking a question that scares me:
Is it possible that this device particularly can be controlled via https://www.openhab.org/addons/bindings/snmp1/ and not via this binding?


(Jorg Coevert) #610

This is also the one that I bought yesterday to get around the SP3 offline problem.
I hope we get this binding to work OK with this device!


(Ray) #611

Have you added the iv & vector key in paperui thing?


(Dario) #612

yup. sure did

another thought: Uninitialised handler… HMM.
i am runing an apt based install on raspbian stretch, so is it possible that iam missing some package?