homebridge-broadlink-rm: Learn Code (Couldn't learn code, device not found)
Can’t get RM3 to connect, and I’ve tried everything I found online. I’m running Homebridge on a MacBook with its firewall turned off. I can control the RM3 with the native app with no issues.
Logs:
removed as irrelevant to the problem
My code, with couple of switches just as a placeholder:
removed as irrelevant to the problem
Having the “Hosts” section under the plaforms doesn’t help. I can ping the RM3 with no issues from the MacBook. Some posts suggested installing this: https://github.com/mjg59/python-broadlink, but I have no idea how to do that. Is this something related to running Homebridge on a MacBook or does my router (Linksys EA8100) require some config? Please help me out here.
About this issue
- Original URL
- State: open
- Created 4 years ago
- Reactions: 1
- Comments: 88
@Faisalthe01 @fizulnizam can you guys see if works to you?
I have tested without the hosts, when I set the host it’s getting a wrong device for me.
To tested it, just replace the
index.js
frombroadlinkrm-js
for this one:https://gist.github.com/rafaelncarvalho/44d21b718825f4327bbd7c0217b17a84
I’ve had some success. I then updated to @rafaelncarvalho’s code and confirmed that it works and could learn. Then I reset my RM Mini3 and configured it with the IHC app. I was then able to replicate this issue using homebridge-broadlink-rm-pro@4.2.3 - learn code times out. I then re-updating using the working code and confirmed it resolved the issue.
homebridge-broadlink-rm-pro@4.2.4 now uses kiwicam-broadlinkjs-rm@0.8.3 (which is essentially @rafaelncarvalho’s code) and appears to work.
I’ve only got the one device to test but 🤞 hopefully I’ve now got both compatibility with the newer devices and backwards compatibility with existing devices. Please let me know if you have any issues - maybe here to keep the conversation cleaner.
The only niggling part is I can’t see why the previous version didn’t work when it integrated all the changes I could find anyway.
Hey guys… I think it’s time to use a new repo with the updates
@kiwi-cam, the homebridge-broadlink-rm-pro has my code to work with 5f36?
If not, I make make a fork
Finally got it. The key was to reset the RM3, let the normal wifi setup fail (as it always seems to), go through the AP setting mode, but cancel the process when the Broadlink app asks for adding the device to a room. After that, success:
However, the learn code functionality doesn’t seem to be working. I also got the 5f36 - did you find a workaround for that issue?
Hi Faisalthe01, i have connection now with your help! IHC do the trick.
Hi Naqsaq, i have replaced the index.js and now i can “Learn” with success. Thank you both for your help 😃 Peter
@fizulnizam @Spanishu I will try to fix it in the weekend! I’m looking forward to use this too, since I have a 5f36 too
I may have found the problem. The broadlinkjs-rm package is very similar to the python-broadlink, even with the 5f36 listed in the index.js it’s missing part of the code. The 5f36 devices need a header to work.
https://github.com/mjg59/python-broadlink/blob/26e507abd74c83c50edb71de580f187f5e65c519/broadlink/__init__.py#L581-L583
This part is missing in broadlinkjs-rm index.js.
Yes I am so glad that you got it discovered! Cheers! But since your device code is as same as mine which is 5f36, the plugin needs to be updated to support our device code, which is the reason for the Learn functionality not working. It seems there is no other workaround to this problem apart from lprhodes updating this plugin for which I hope he will do it as soon as possible… I am doing this as a project and would like to be able to meet deadlines but there is no other way than to wait for he himself to solve this issue.
On a side note, the peeps in the python-broadlink section in github found a solution for the 5f36 but I don’t know if it can be applied to our problem regarding Homebridge. It seems to be working for Home Assistant as well.
Thanks @kiwi-cam for all the work! I really think we all should start using your repo from now on and creating the new issues on it.
Hi , I used your repo (pro) and recognizes my 5f26 device, however it cannot learn. I’ve tested before with this repo and the index.js from here and it worked: https://gist.github.com/rafaelncarvalho/44d21b718825f4327bbd7c0217b17a84 I’m not an expert and I wont mess it up. Can you check it ?
Edit: effectivelly I changed the file and it works! In this case the folder is located in /home/usr/local/lib/node_modules/homebridge-broadlink-rm-pro/node_modules/def-broadlinkjs-rm
Thanks @batatat. Unfortunately there are no clues in the logs and I don’t have an RM4 to reproduce the issue. The good news is you’re not alone. I’ll keep an eye on things and make sure my fork integrates a fix when one is found but, for now, there doesn’t seem to be one.
Hi @batatat. I’ve confirmed and 5f36 is in the code for the module I pull - so it certainly should work. Could you post your logs so we can see exactly what error you’re seeing?
@rafaelncarvalho Thank you ! Just tried this plugin too with 5f36, it’s not working too so I imagine @kiwi-cam didn’t integ specs you gave here. Don’t have coding experience too but if I can help too (for the test for example) I’m available 😉
It is definitely time. There’s multiple issues and people are genuinely worried that this plugin has been abbandoned after committing to the hardware. Support for new 5f26 devices, RM4 family support, fan and garage accessories showing up as thermostats, RF shiffing broken, etc., etc.
I got no coding experience, but happy to help in any other ways possible.
@OMGitsSimple, that looks like you’re using the TV fork (I’m one of the contributors there). Unfortunately the main dev has been a little AWOL there too so changes haven’t been getting to NPM. I’ve created a new NPM project which I’ve updated with the latest changes including new device support. You could try removing homebridge-broadlink-rm-tv and installing homebridge-broadlink-rm-pro.
Let me know how you get on.
ok do goto /var/lib/homebridge/plugin-persist/homebridge-broadlink-rm there should be a directory called helpers? in there there should be the directory called broadlinkjs-rm where you will find the file
Goto /var/lib/homebridge/plugin-persist/ do that as sudo -i then ls and let us know what you see there
ssh into your raspberry pi enter su -i then run find ~ -type d -iname “broadlinkjs-rm” that should give you where the folder is located
I’m sure someone with more knowledge on the Raspberry folder structure can quide you all the way, but if you’re trying to just navigate to that folder, you need to use “cd” (change directory) infront of the folder path. You can look up basic file handling with bash e.g. here: https://help.ubuntu.com/community/UsingTheTerminal#File_.26_Directory_Commands
I’m running Homebridge on a Macbook.
See https://github.com/lprhodes/homebridge-broadlink-rm/issues/600#issuecomment-615997151
I checked and it should pull that version. So the problem must be somewhere else
Hi, it works to get the device on the WiFi and discoverable. Nothing more 😦