Hi Kevin619, you’re not alone. I have two BroadLink RM4C Mini and it’s impossible for me to integrate with HA Supervisor 2022.7.7.
I wish someone could give a light about it.
In June there was a pull request merged in to add support for BestCon RM4C Mini with product id 0x520d. However it looks like the change was never released in a new version of the python-broadlink package.
I requested a new release here: https://github.com/mjg59/python-broadlink/issues/705
If you’re affected by this, you’d see “Unsupported device: 0x520d” in the Home Assistant Broadlink logs.
For anyone reading the thread It’s been almost 2 months and it looks like no updates to the library at all including this one.
At this stage installing the plugin and manually editing it is likely your best bet and what I’ll be attempting.
Exactly what do you mean by manually editing, I’m trying to do so, but I can’t find a way, I have HA in a VirtualBox, I access it using the vscode addon and ssh addon, but I don’t know what to edit.
Can you give a little bit more light to it, please.
Yes, Please provide more insight into what needs to be edited to add the 0x520d. Thank you!
As for HA Supervised:
-
Search for filename
__init__.py
under/var/lib/docker/overlay2/<some looooooong string>/merged/local/lib/python3.10/site-packages/
-
Inside that file find the string
rm4mini:
and below
0x520C: ("RM4 mini", "Broadlink"),
add:
0x520D: ("RM4C mini", "Broadlink"),
The rm4mini
-section should then look like:
rm4mini: {
0x51DA: ("RM4 mini", "Broadlink"),
0x5209: ("RM4 TV mate", "Broadlink"),
0x520C: ("RM4 mini", "Broadlink"),
0x520D: ("RM4C mini", "Broadlink"),
0x5212: ("RM4 TV mate", "Broadlink"),
0x5216: ("RM4 mini", "Broadlink"),
0x6070: ("RM4C mini", "Broadlink"),
0x610E: ("RM4 mini", "Broadlink"),
0x610F: ("RM4C mini", "Broadlink"),
0x62BC: ("RM4 mini", "Broadlink"),
0x62BE: ("RM4C mini", "Broadlink"),
0x6364: ("RM4S", "Broadlink"),
0x648D: ("RM4 mini", "Broadlink"),
0x6539: ("RM4C mini", "Broadlink"),
0x653A: ("RM4 mini", "Broadlink"),
},
- Save and close the file and restart HA.
Since tampering with system files is not trivial do this at your own risk only!
Sorry for the delay Tamsy and a big Thank you for your assistance. Note, I am not running HA on Docker so therefore the path provided is not relevant for my installation? My bad for not being more verbose in my attempt to obtain assistance. I am having difficulty finding the __init__.py
to modify and add the 0x520D. Thank you for any added assistance that you can provide.
Much appreciate any added input on what I am missing here?
Which installation method do you use?
Well, finding the correct __init__.py
belonging to the Broadlink integration is obviously mandatory since 0x520D
has to be added into that very file. Be careful which file you edit because there might be several files with the same name on the system.
Access your HA through SSH and find that file to edit it accordingly or simply wait for an update to the integration itself.
I will keep searching. thank you!
I am assuming that the reason that I can not find the init.py file so I can add the 0x520D is simply due to the fact that the Integration refuses to do the initial install due to the fact that the IP address/device that I am trying to point it to is a device that it barks “Not Supported”. Since this is the first Broadlink that I am trying to install and the Integration refuses to install then this places me in a catch 22 situation unless there is a way to fake it out to install the integration.
It is __init__.py
but not init.py (mind the two prepending and the two appending underscores).
Understood on the file name. Ignore my Typo in the previous statement. I am assuming right now that the file does not yet exist because I have not had success in installing a Broadlink prior to this. I also assume that if I had previously installed an RM4 Pro then the integration would exist and therefore the __init__.py
would exist to insert the 0x520D into the file. Feel free to correct me if you feel that my speculation is not viable. Again, Thank you Tamsy for your attempts to assist.
Although not yet installed (activated) Broadlink’s __init__.py
should be avaiable on a standart HA Supervised installation. The problem when searching is just those many __init__.py
's all over the place.
Do from cli:
sudo locate broadlink | less
and check the results line by line until you come across the directory “broadlink” like:
/var/lib/docker/overlay2/<looooong string>/diff/usr/local/lib/python3.10/site-packages/broadlink/
and:
/var/lib/docker/overlay2/<looooong string>/merged/usr/local/lib/python3.10/site-packages/broadlink/__init__.py
Inside those you will find the file __init__.py
to edit.
( since I have have not done this before I don’t know which of the above __init__.py
's you have to edit. Just try 1by1, it should work).
You can also do the following to find Broadlink’s __init__.py
:
cd /var/lib/docker/overlay2
sudo find . -type f -exec grep -l "rm4mini" {} +
Good luck and please let us know whether you have finally succeeded.
Getting closer Thanks to your hints and guidance. I found the __init__.py
file . It was located in the /usr/lib/python3.10/site-packages/broadlink directory.
The bad news is that the 0x520D entry is in the file. Now the next thing that I will need to validate is that the version of my IR Unit is indeed the 0x520D. My unit that was actually sent from AliExpress is the BestCon RM4C mini. I speculate that the unit is possibly not identifying as this BroadLink RM4C mini. Now off to address the next piece of this mystery in why the integration is reporting that the unit is “Not supported” Thanks again, Tamsy. I appreciate the time that you have spent with me on this issue.
UPDATE: The system Logs are reporting “Unsupported device: 0x520d” So, it appears it identifies the Unit as a 0x520D.
I’m in the same boat with a 0x520d:
Logger: homeassistant.components.broadlink.config_flow
Source: components/broadlink/config_flow.py:114
Integration: broadlink (documentation, issues)
First occurred: November 28, 2022 at 21:54:58 (3 occurrences)
Last logged: 08:59:43
Unsupported device: 0x520d. If it worked before, please open an issue at https://github.com/home-assistant/core/issues
I’ve got a BroadLink version on its way to determine if that is Soli the issue with the BestCon version. It’s worth investigating my speculation at this point until I can find a way to enter the BestCon version into the .py file. I will report back my findings when I get the BroadLink version in this week.
Just received the Broadlink (Not knockoff BestCon) and it integrated flawlessly. More to come later… I am not giving up on the BestCon; just simply not admit defeat However, I am glad that I have a solution moving forward while I continue to beat my head against the BestCon knockoff.
Just when I thought I was out of the woods over this. Now, I am getting the following errors in Home Assistant. I know the Broadlink device is working natively, because I was able to teach it a new remote and command in the Broadlink app. (Testing purposes only). Yes, I do have it unlocked in the Broadlink app.
Logger: homeassistant.components.broadlink.remote
Source: components/broadlink/remote.py:301
Integration: Broadlink (documentation, issues)
First occurred: 4:22:13 PM (2 occurrences)
Last logged: 5:40:12 PM
Failed to learn ‘power’: No infrared code received within 30.0 seconds