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

Same device type and also not able to get it working now. It looks like there changed something if you read the topics you also shared, but no idea how to adapt to get it working :frowning:

hey guys,

i tried to implement the changes:

be warned:

  • i have not tested it yet as i’m currently not near my broadlink device
  • i am now targeting openhab 2.5.3-snapshot!

Great! I would be able to test it this weekend, but is it required to have OH 2.5.3? Normally I only switch to a new version when it is a stable release.

please don’t use that jar as it will break all broadlink things :stuck_out_tongue:
as for versioning: there probably won’t be a 2.5.3 stable if there are no bugs in openhab core - this version, especially the snapshot, is for the ability to update the addons: Development of openHAB 3.0.0 and 2.5.x

Good point, but for me, I don’t have any broadlink items yet. I’ve a RM3 waiting to be used as soon as the binding can work with it.

Where can i find the link for latest working jar file of this binding after upgrade to OH 2.5? i tried the 2.5.3 but there are communication issues.

1 Like

So is there a consensus on what version of the binding currently works? I’,m on OH 2.5.2 and have installed the 2.5.1 version of the binding which is stuck on initializing on the RM thing. Is there an older version that will work? The 2.1 version was working with my 2.3 install.

Thanks,

Squid

hi,

so i got it working now with my device - here is the release:

cheers
thomas

1 Like

Works like a charm! Thanks

1 Like

Thomas, I tried to use BETA_03 release and received the following error with my RM2:

2020-03-22 09:56:30.756 [ERROR] [handler.BroadlinkRemoteModel2Handler] - rm2:34-ea-34-f4-49-34[v]: java.net.ProtocolException: Response from device is not valid. (0x22=0xF9,0x23=0xFF,0x24=0xFF)
2020-03-22 09:56:30.758 [ERROR] [handler.BroadlinkRemoteModel2Handler] - rm2:34-ea-34-f4-49-34[v]: Attempting to authenticate prior to getting device status FAILED. Will mark as offline
2020-03-22 09:56:30.760 [ERROR] [handler.BroadlinkRemoteModel2Handler] - rm2:34-ea-34-f4-49-34[v]: updateItemStatus: Online -> Offline

So I returned back to BETA_01…

Hi,
I need to be able to control two IR devices in my living room: my subwoofer and my projector.
I am considering getting this device:

Two questions:

  1. There seem to be multiple versions of this. Do you know, which is the newest and if it will work with this work with this binding?
  2. (How) Can I train this with arbitrary IR remote? Especially the subwoofer remote is probably not in any database. An I also failed setting up my LG PF-1500 projector with LIRC.

Thanks,
Michael

as for device: i honestly can’t tell you, nobody probably will until you try it. it SHOULD work, that’s all that’s certain :slight_smile:

for learning codes you need git and python3:

apt-get install -y git python3 python3-setuptools python3-crypto
git clone https://github.com/tknaller/python-broadlink.git
cd broadlink-python
python3 setup.py build
python3 setup.py install
cd cli
python3 broadlink_discovery

then you can do:

python3 broadlink_cli --type <output from discovery> --host <output from discovery> --mac <output from discovery> --learn

which outputs the codes to the shell which you can enter into the broadlink.map
if it doesn’t work anyways then with an error of wrong length start adding two zeros (00) to the end of the code until it works.

PS: yes i am referencing my repo here which is a fork of a fork of the original work because it was the only way to get it to work for me using a current ubuntu, python3 and my 0x5f36 device. and all other tools also weren’t talking to my 0x5f36; the python lib was the only one with the fix (at the time of forking it was still a pull request which has been merged in the meanwhile)
maybe the original repo https://github.com/mjg59/python-broadlink works now but from what i can tell not with python3 and i was unable to get it working with another python in my ubuntu - but i am not really a python person :slight_smile: (neither am i a java person for that matter!)

@ip-ua: that happened to me as well (same error codes!) until i un-did a bugfix John Marshall committed on 7 Jan, then it suddenly started working. but: it occasionally happens again; then i take the thing offline and online again and it works for some time

i am neither a pro in openhab, nor java, nor python and very much not with that weird broadlink protocol, just trying to hack the stuff so it works for my needs and sharing my findings :slight_smile:

3 Likes

Hi,
i made some modifications and fix to add RM4 devices, i have a RM4 mini that now is correctly discovered and online. I created a pull request https://github.com/tknaller/openhab2-addons/pull/1

1 Like

Hello I download the latest release…placed it in the addons folder and my RM Mini 3 is immediately discovered .

I enter the key and the vector, as well as change the device type to 10178.

The thing shows a communication error:
image

The device is showing the same IP address in my network monitor…and is accessible via the iOS app.

Any thoughts?

Squid

@ynuyasha: we are discussing on github :slight_smile:

@KidSquid: why did you change your device type, was the field empty upon discovery? it should be automatically discovered and the type should be the same as if you did python3 broadlink_discovery (described above with python-broadlink), just in int not hex - not manually entered because of some list (usually)

plus which app did you use for setting up the wifi? these don’t work:
cn.com.broadlink.econtrol.international
com.broadlink.rmt
cn.com.broadlink.econtrol.plus

this does work:

at least for android, don’t know & don’t care about that californian fruits :slight_smile:

not working means: it sets up fine and is controllable via that app, but neither the binding nor the python scripts can communicate with it…

I changed it after 30 minutes of no connection in the hope that needed to be changed to connect. So I have thrown away the thing…and it was immediately rediscovered and I have left the device type as it…still says it can not find a device at the designated IP. I can ping the device from the OH server.

please provide some logs for further assistance

Looks like discovery happens at it shoud

2020-03-30 09:51:12.407 [WARN ] [.discovery.BroadlinkDiscoveryService] - BroadlinkDiscoveryService - Beginning Broadlink device scan...
2020-03-30 09:51:12.408 [WARN ] [internal.discovery.DiscoveryProtocol] - Beginning async Broadlink device scan; will wait 10000 ms for responses
2020-03-30 09:51:12.596 [WARN ] [internal.discovery.DiscoveryProtocol] - Broadlink device scan waiting for 10000 ms to complete ...
2020-03-30 09:51:12.681 [INFO ] [.discovery.BroadlinkDiscoveryService] - Data received during Broadlink device discovery: from 10.x.x.xxx:80 [78:0f:77:1a:13:38]
2020-03-30 09:51:12.682 [INFO ] [g.discovery.internal.PersistentInbox] - Added new thing 'broadlink:rm3:78-0f-xx-xx-xx-xx' to inbox.
2020-03-30 09:51:22.598 [WARN ] [internal.discovery.DiscoveryProtocol] - Device scan: wait complete ...
2020-03-30 09:51:22.598 [WARN ] [internal.discovery.DiscoveryProtocol] - Ended Broadlink device scan...
2020-03-30 09:51:22.598 [INFO ] [link.internal.socket.BroadlinkSocket] - Socket closed
2020-03-30 09:51:22.598 [INFO ] [.discovery.BroadlinkDiscoveryService] - Discovery complete. Found 1 Broadlink devices

I’m seeing this quite frequently in the log…

2020-03-30 09:56:51.621 [ERROR] [dlink.handler.BroadlinkRemoteHandler] - rm3:78-0f-77-1a-13-38[v]: updateItemStatus: Online -> Offline
2020-03-30 09:57:22.031 [ERROR] [dlink.handler.BroadlinkRemoteHandler] - rm3:78-0f-77-1a-13-38[v]: java.lang.IllegalArgumentException: Empty key
2020-03-30 09:57:22.032 [ERROR] [dlink.handler.BroadlinkRemoteHandler] - rm3:78-0f-77-1a-13-38[v]: Attempting to authenticate prior to getting device status FAILED. Will mark as offline

I did enter the key and the vector in the config.

it could be that the fixes by @ynuyasha will help you, here is the .jar: