I have updated HA to 0.115.1, cleared broadlink in my yaml, reboot my pi, and have no suggestions about broadlink in integration, I pressed plus and try to add devices by IP. It can't connect. Ip of broadlink is constant. I have rm mini 3, rm pro, and broadlink a1
arch | armv7l
dev | false
docker | true
hassio | false
installation_type | Home Assistant Container
os_name | Linux
os_version | 4.19.66-v7+
python_version | 3.8.0
timezone | Europe/Moscow
version | 0.115.1
virtualenv | true
I also have VPN and local interface
configuration.yaml
I removed everything connected with broadlink from my config
Logger: homeassistant.components.broadlink
Source: components/broadlink/config_flow.py:100
Integration: broadlink (documentation, issues)
First occurred: 22:52:08 (2 occurrences)
Last logged: 22:54:37
Failed to connect to the device at 192.168.4.166: Device not found
Failed to connect to the device at 192.168.4.115: Device not found
Router microtik
broadlink documentation
broadlink source
(message by IssueLinks)
My raspberry pi also have two interfaces - VPN and local network.
The solution is for the config flow to expose broadlink-python's local_ip_address, which makes explicit selection of the interface to be used to communicate with the broadlink device.
In my setup ping works just fine. I also used a test script, and the script didn find any devices until i modified it to use local_ip_address
:
import broadlink as blk
devs = blk.discover(discover_ip_address='192.168.1.101', local_ip_address='192.168.1.5', timeout=5) # Your device IP address
print([(d.host[0], hex(d.devtype)) for d in devs])
The Xiaomi Aqara integration does that already:
A temporary and very dirty workaround is to manually add the correct IP address of your HASS in the broadlink module, changing lib/python3.7/site-packages/broadlink/__init__.py
line 120 to the IP address of your HASS interface which can communicate with your Broadlink.
I.e. if HASS has an IP address of 192.168.45.18
and your broadlink has IP address 192.168.45.55
the line becomes:
local_ip_address = '192.168.45.18'
Keep in mind that once the broadlink module gets updated this dirty hack will stop working!
yes, when I set local ip, it works
devs = blk.discover(discover_ip_address='192.168.4.166', local_ip_address='192.168.4.117', timeout=5)
print([(d.host[0], hex(d.devtype)) for d in devs])
[('192.168.4.166', '0x279d')]
This problem will be fixed when we release this.
Is there any estimation when your fix will be released in HA? Especially if this will be release in 115? As I was expecting such breaking issue should be fixed ASAP, but unfortunately it seems to missed 115.4 as I still observe this problem. Thank you
This issue is still not addressed in HA 0.115.6 even this was already fixed in python-broadlink:
https://github.com/mjg59/python-broadlink/pull/427
This issue prevents any HomeAssistant Broadlink based integration to work in multiple network interface configuration. All existing devices are rendered unavailable and new devices could not be detected and added using web based Broadlink integration.
I would be therefore great to fix this issue by pulling mentioned fix into HA as well.
existing broadlink devices report:
Logger: homeassistant.components.broadlink
Source: components/broadlink/config_flow.py:114
Integration: Broadlink (documentation, issues)
First occurred: 5:05:14 PM (3 occurrences)
Last logged: 5:05:14 PM
Failed to connect to the device at 192.168.3.92: Device not found
Failed to connect to the device at 192.168.3.61: Device not found
Failed to connect to the device at 192.168.3.89: Device not found
When trying to add new using webui Broadlink integration:
2020-09-30 17:07:41 ERROR (MainThread) [homeassistant.components.broadlink] Failed to connect to the device at 192.168.3.61: Device not found
I can confirm that the issue's gone on Home Assistant 0.116.0b2
Good to know it worked. Thank you!
Yes, it also works on my devices.
Most helpful comment
Yes, it also works on my devices.