In 0.115.0b9 I'm trying to configure a broadlink rm4 pro using ui but I recieve "Device not found".
I've reset the device multiple times. The host is correct, since it worked in 0.114.4 and my router confirms it. The described way in the documentation is not working for me.
To set up a Broadlink device, click Configuration in the sidebar and click Integrations. If you see your device there, click Configure. If not, click the + icon in the lower right, enter the hostname or IP address of the device and follow the instructions to complete the setup.
arch | x86_64
-- | --
dev | false
docker | true
hassio | false
installation_type | Home Assistant Container
os_name | Linux
os_version | 4.4.59+
python_version | 3.8.4
timezone | Europe/Stockholm
version | 0.115.0b9
virtualenv | false
configuration.yaml
[homeassistant.components.broadlink] Failed to connect to the device at 192.168.0.31: Device not found
# deprecated last working 0.114.4
remote:
- platform: broadlink
host: !secret broadlink_host
mac: !secret broadlink_mac
type: rm4_pro
broadlink documentation
broadlink source
(message by IssueLinks)
cc @felipediel
Thank you for reporting this.
Can you ping the device?
Please open a terminal on your computer, install the python-broadlink library (pip install broadlink), open Python 3 and type:
import broadlink as blk
devs = blk.discover(timeout=5)
print([(d.host[0], hex(d.devtype)) for d in devs])
devs = blk.discover(discover_ip_address=DEVICE_IP_ADDR, timeout=5)
print([(d.host[0], hex(d.devtype)) for d in devs])
What is the output?
Reset, slow flash, added wifi information using the ios app otherwise i can't ping it. I downgraded to 0.114.4 and I can't add it again Failed to send packet: Control key is expired. Is it a new firmware blocking something?
ping
PING 192.168.0.31 (192.168.0.31): 56 data bytes
64 bytes from 192.168.0.31: icmp_seq=0 ttl=255 time=84.182 ms
64 bytes from 192.168.0.31: icmp_seq=1 ttl=255 time=107.073 ms
64 bytes from 192.168.0.31: icmp_seq=2 ttl=255 time=126.294 ms
^C
--- 192.168.0.31 ping statistics ---
3 packets transmitted, 3 packets received, 0.0% packet loss
round-trip min/avg/max/stddev = 84.182/105.850/126.294/17.214 ms
output
Traceback (most recent call last):
File "/Users/matte/Desktop/debug.py", line 3, in <module>
devs = blk.discover(timeout=5)
File "/usr/local/lib/python3.7/site-packages/broadlink-0.14.1-py3.7.egg/broadlink/__init__.py", line 170, in discover
cs.sendto(packet, (discover_ip_address, discover_ip_port))
OSError: [Errno 49] Can't assign requested address
Edit: I think I used Intelligent Home Center app before but that doesn't work anymore. What is the "official" process for adding broadlink remotes to home assistant now?
Are you using a VPN?
The best way is:
See the troubleshooting section of the docs.
Reset, slow flash, added wifi information using the ios app otherwise i can't ping it. I downgraded to 0.114.4 and I can't add it again
Failed to send packet: Control key is expired. Is it a new firmware blocking something?
The latest Broadlink firmware is incompatible with Home Assistant. Take a look at this article, it has a workaround using Node-Red.
https://www.thesmarthomebook.com/2020/04/13/broadlink-firmware-update-takes-down-home-assistant-component-see-my-node-red-workaround/
THANK YOU @felipediel
Turned off vpn on the machine running home assistant, and I was able to add my broadlink on 0.115.
EDIT: This information should make its way to the documentation because I'm probably not the last to encounter this
Also stopped at this screen

I will restore support for VPNs, don't worry.
@pitah81 I already added support for the new firmware. The only active issue is VPN support, which I will address this week.
@bdraco Please do not send https://github.com/home-assistant/core/pull/36914 to production yet. I need to patch the library so that users can add devices using a VPN.
@bdraco Please do not send https://github.com/home-assistant/core/pull/36914 to production yet. I need to patch the library so that users can add devices using a VPN.
It's going out in 0.115 on Wednesday unless we do a revert.
What if I patch the library tonight?
If you get a PR in tonight we can get likely get it in before Wed.
me too. After it changes to integration, my mp1 is not recognized.
In integration, after type in the IP address of the mp1, it detects the plug name, but no device show up.
@mcdull I need to add your device type to the library.
https://github.com/home-assistant/core/issues/40077#issuecomment-692262368 What is the output?
Please open a terminal on your computer, install the python-broadlink library (
pip install broadlink), open Python 3 and type:import broadlink as blk devs = blk.discover(timeout=5) print([(d.host[0], hex(d.devtype)) for d in devs]) devs = blk.discover(discover_ip_address=DEVICE_IP_ADDR, timeout=5) print([(d.host[0], hex(d.devtype)) for d in devs])What is the output?
Log Details (ERROR)
Logger: homeassistant.config_entries
Source: components/broadlink/updater.py:29
First occurred: September 16, 2020, 1:27:27 AM (1 occurrences)
Last logged: September 16, 2020, 1:27:27 AM
Error setting up entry MP1 for broadlink
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/config_entries.py", line 228, in async_setup
result = await component.async_setup_entry(hass, self) # type: ignore
File "/usr/src/homeassistant/homeassistant/components/broadlink/__init__.py", line 28, in async_setup_entry
return await device.async_setup()
File "/usr/src/homeassistant/homeassistant/components/broadlink/device.py", line 97, in async_setup
update_manager = get_update_manager(self)
File "/usr/src/homeassistant/homeassistant/components/broadlink/updater.py", line 29, in get_update_manager
return update_managersdevice.api.type
KeyError: 'Unknown'
@mcdull I need to add your device type to the library.
#40077 (comment) What is the output?
I tried pip install the broadlink, but ends with error. Do you mean ssh to hassio virtual env or the host?
hassio virtual seems cannot install with lots of dependency not found.
Use your desktop for this. Just make sure it is connected to the local
network.
Em qua, 16 de set de 2020 13:46, mcdull notifications@github.com escreveu:
@mcdull https://github.com/mcdull I need to add your device type to the
library.40077 (comment)
https://github.com/home-assistant/core/issues/40077#issuecomment-692262368
What is the output?I tried pip install the broadlink, but ends with error. Do you mean ssh to
hassio virtual env or the host?
hassio virtual seems cannot install with lots of dependency not found.—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/home-assistant/core/issues/40077#issuecomment-693528860,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AJ5CGLYHHUM4ZEVEM5J44R3SGDTW7ANCNFSM4RL4MIOA
.
Use your desktop for this. Just make sure it is connected to the local network. Em qua, 16 de set de 2020 13:46, mcdull notifications@github.com escreveu:
…
@mcdull https://github.com/mcdull I need to add your device type to the library. #40077 (comment) <#40077 (comment)> What is the output? I tried pip install the broadlink, but ends with error. Do you mean ssh to hassio virtual env or the host? hassio virtual seems cannot install with lots of dependency not found. — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub <#40077 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJ5CGLYHHUM4ZEVEM5J44R3SGDTW7ANCNFSM4RL4MIOA .
devs = blk.discover(timeout=5)
print([(d.host[0], hex(d.devtype)) for d in devs])
[('192.168.100.203', '0x2712'), ('192.168.100.213', '0x4f1b')]
devs = blk.discover(discover_ip_address=DEVICE_IP_ADDR, timeout=5)
I have 2 devices. The mp1 is ('192.168.100.213', '0x4f1b')
devs = blk.discover(discover_ip_address=DEVICE_IP_ADDR, timeout=5)
This command out the same if I replace DEVICE_IP_ADDR with '192.168.100.213'
My mp1 is a rebranded one with 3 plugs and 2 usb. It works fine with old mp1 modules. Is it just the problem with mismatch device id?
@mcdull Thank you! Now we discover the devices to get the information we need.
I added your device to the library. It will be supported soon. You can follow up here.
the new "discovery-only" feature doesn't work for my MP1, result from blk.discover(discover_ip_address) => []
a udp datagram is sent to the port 80 of the MP1, no response from MP1
when using broadlink-cli with the mac address, MP1 does respond.
What is your device type? Is it recognized in the official app? Did you check the IP address? Did you try to discover the device directly (https://github.com/home-assistant/core/issues/40191#issuecomment-694804640)? Did you try to unlock it with e-Control app?
can't remember if the MP1 has been unlocked, is has been working in the past, it must be a 0x4eb5 or 0x4ef7.
I can't remember either if I ever used the official app :-)
I'll check this evening when I get back from work.
discovering the device with its ip doesn't work. as I said the MP1 doesn't respond back to the datagram, but I guess this is the local address selection not working on my host (it has two IPs, its fqdn doesn't resolve to the good ip to talk to the MP1).
I'll quickly hack python-broadlink to override the ip address selection with the correct to see if its makes it better.
EDIT => using blk.discover(local_ip_address= ! ;-) makes it better !
print([(d.host[0], hex(d.devtype)) for d in devs])
[('10.0.68.241', '0x4eb5')]
so it's a local ip address selection issue ! ;-)
Are you using a VPN? If so, your problem will be solved with this PR.
I'm not using a vpn, at least not at this level, and I'm surprised to see vpn has to be taken into account in this library, it looks like it just a matter of selecting the proper IP address when sending UDP datagrams. (if so, it has nothing to do with vpn, rather a matter of multi-homed host, an issue you could also have when playing with (source) routing)
My yeelights and my MP1 are in a separate vlan/ssid, they don't have any access to the internet, my HA node is just having 2 ifaces, the main one and the restricted one in order to directly "talk" to the restricted devices.
This needs to be taken into account when multicasting.
FYI, to confirm, I've edited my ./home-assistant.git/lib/python3.7/site-packages/broadlink/__init__.py and replaced def discover(timeout=None, local_ip_address=None by the correct local ip address (specific to my node), the integration has been able to discover my MP1 device straight away.
I'll try to find some time to submit a RFC wrt the source address selection.
without altering python-broadlink, you could simply expose local_ip_address as an advanced option and let user specify the correct source IP (won't work with dynamic IP address => in that case specifying a interface name could also be a way to find the address attached to it)
This is not necessary. https://github.com/home-assistant/core/pull/39228 will solve the problem.
Most helpful comment
FYI, to confirm, I've edited my
./home-assistant.git/lib/python3.7/site-packages/broadlink/__init__.pyand replaceddef discover(timeout=None, local_ip_address=Noneby the correct local ip address (specific to my node), the integration has been able to discover my MP1 device straight away.I'll try to find some time to submit a RFC wrt the source address selection.