core: Failed to connect to device (Broadlink RM Mini3)
Home Assistant release with the issue: 0.92.1
Last working Home Assistant release (if known): N/A
Operating environment (Hass.io/Docker/Windows/etc.): Hass.io
Component/platform: /components/broadlink/
Description of problem: I am unable to connect to my Broadlink RM Mini3. The component itself loads correctly, but I get the following error when I call the broadlink.learn service.
2019-04-30 21:12:42 ERROR (MainThread) [homeassistant.components.broadlink] Failed to connect to device
Problem-relevant configuration.yaml entries and (fill out even if it seems unimportant):
switch:
- platform: broadlink
host: 192.168.1.19
mac: 'C8:F7:42:62:8A:37'
timeout: 30
I’ve double and triple checked the IP address and MAC address and it seems fine.
Additional information: The RM Mini 3 works fine when I use the IHC app on my phone. I can ping the IP address fine on my computer.
When I try to use Broadlink Manager, I get the following error too.
Found device : Unknown [192.168.1.19]
Writing compatible device not detected!
I’m not sure if it’s related.
It’s possible that the version of RM Mini 3 I have maybe slightly different to most, because I bought mine from Taobao, so the labelling on the bottom of it is in Chinese, while most of the ones I see on YouTube have English labelling. However, I’m not sure whether there is a way to fix it.
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Reactions: 6
- Comments: 89 (10 by maintainers)
When will this issue be fixed?
I already had the
crypotgraphylib installed, but I did discover that this is almost certainly caused by v0.11.1 of https://github.com/mjg59/python-broadlinkI was able to find the packets to turn off and on my TV on another HA forum post, and tested that they work through HA without having been learned through
broadlink.learnservice, which proved that HA could communicate with the device viabroadlink.send.The learn the rest of my IR codes, I downloaded v0.10 of https://github.com/mjg59/python-broadlink (
pip3 install broadlink==0.10), and ran the following sequence of command in a python shell:try this:
edit components/broadlink/__init__.py#auth = await hass.async_add_executor_job(device.auth)auth = device.authMy tests worked fineFor others reading this to try make sesne of it all here is the break down to its simplest form:
In order to have the broadlink.send and broadlink.learn functions you need to add the following to your configuration.yaml file
This is the minimum required to get the broadlink unit configured on HA you can add other info like unit type and friendly name if you want. To learn commands it is easiest to use a windows program called “Broadlink Manager” (you can google it) Once you have learnt commands you can add to the original config and add switches such as TV on and off, please note that having == on the end of the command is vital to it working
If you dont want switches but prefer to use a list of commands then add the following to your scripts.yaml file:
you can also combine commands, to change source on my TV i need to press ‘input’, ‘right’, ‘ok’ this can be lumped together to make things easier:
Massive thanks to @RobHofmann for working out the nitty gritty of it all
Well, here’s what I did:
Download all the files in this directory: https://github.com/home-assistant/home-assistant/tree/dev/homeassistant/components/broadlink
Then create a
custom_componentsfolder in the same directory as your configuration.yaml. Create abroadlinkfolder in thecustom_componentsfolder and copy the files from above into this folder. Make the necessary change to__init__.py, restart Home Assistant, and you should be good.Custom components created from an integration override the existing integration.
My broadlink rm mini 3 also has the same problem, it can only connect locally. It is also on firmware ver. 44057. Does anyone know how to flash the firmware to v55?
Hi guys. I need help to test a possible solution, would you mind?
Steps:
This worked for me too. Thanks! Would you mind submitting a PR for this @GitforZhangXL?
@emnik I’m using Home Assistant inside Docker. After jump to /bin/bash of Home Assistant (
docker exec -it home-assistant /bin/bash), my__init__.pyfile is in:/usr/src/homeassistant/homeassistant/components/broadlink/__init__.pyHaving installed home assistant in virtualenv, there is no
auth = await hass.async_add_executor_job(device.auth)incomponents/broadlink/__init__.pyThere is an auth function but nothing like the above in it… The Failed to connect still here… (the broadlink lib version is 0.11.1)I just tested it. Using the broadlink manager to learn the commands, I got it to work.
The sending of the commands works like a charm.
Here is my config:
PS. Don’t forget to add the “==” at the end of the commands. This got me searching for a while.