home-assistant / core

:house_with_garden: Open source home automation that puts local control and privacy first.
https://www.home-assistant.io
Apache License 2.0
73.4k stars 30.65k forks source link

Broadlink Integration Unable To Detect Broadlink Device After Restart Router and Broadlink Get New Assigned IP #74042

Open jerrychong25 opened 2 years ago

jerrychong25 commented 2 years ago

The problem

After Broadlink device is connected to Home Assistant successfully via the integration, the Broadlink is working fine all the time with IP 192.168.0.101.

For example setup screenshot: Screenshot 2022-06-27 at 8 24 38 PM

However if there is any electricity issue or ISP issue causing router to restart, the router will auto assign Broadlink device from 192.168.0.101 to 192.168.0.105.

In this case, the original binding of Broadlink integration no longer working because it trying to connect with old ip 192.168.0.101, not new ip 192.168.0.105.

This Broadlink integration should support binding by MAC Address, thus in the future will forever connect Broadlink regardless what IP assigned by router. It will not affect functionality of Broadlink device in Home Assistant.

For your info, Broadlink integration already supported DHCP discovery mentioned in https://github.com/home-assistant/core/pull/66528 and https://github.com/home-assistant/core/pull/48408, so similar MAC address flow is achieveable.

What version of Home Assistant Core has the issue?

2022.6.7

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant OS

Integration causing the issue

Broadlink

Link to integration documentation on our website

https://www.home-assistant.io/integrations/broadlink

Diagnostics information

Broadlink integration only supports binding by IP, as per screenshot below: Screenshot 2022-06-27 at 8 24 38 PM

This Broadlink integration should support binding by MAC Address, thus in the future will forever connect Broadlink regardless what IP assigned by router. It will not affect functionality of Broadlink device in Home Assistant.

For your info, Broadlink integration already supported DHCP discovery mentioned in https://github.com/home-assistant/core/pull/66528 and https://github.com/home-assistant/core/pull/48408, so similar MAC address flow is achieveable.

Example YAML snippet

No response

Anything in the logs that might be useful for us?

No response

Additional information

No response

probot-home-assistant[bot] commented 2 years ago

broadlink documentation broadlink source (message by IssueLinks)

probot-home-assistant[bot] commented 2 years ago

Hey there @danielhiversen, @felipediel, @l-i-am, mind taking a look at this issue as it has been labeled with an integration (broadlink) you are listed as a code owner for? Thanks! (message by CodeOwnersMention)

jerrychong25 commented 2 years ago

Since Broadlink integration already supported DHCP discovery, similar MAC address flow should be apply to prevent this kind of issue happens.

Related issues:

jerrychong25 commented 2 years ago

Any updates on this?

kbrown01 commented 2 years ago

I have two identical devices from Broadlink. I even reserved IP address in the router for them as an attempt to counter this issue. One device works without fail and always gets the reserved IP address. The other always gets a new address no matter what I do. It is a pain in the you-know-what because I open the app and get the address, then remove and re-add that one Broadlink.

jerrychong25 commented 2 years ago

I have two identical devices from Broadlink. I even reserved IP address in the router for them as an attempt to counter this issue. One device works without fail and always gets the reserved IP address. The other always gets a new address no matter what I do. It is a pain in the you-know-what because I open the app and get the address, then remove and re-add that one Broadlink.

Yes, same issue here even with reserved IP on my end.

Hope Home Assistant Core Team will resolve this problem as soon as possible.

Thanks!

jerrychong25 commented 2 years ago

Any updates on this?

jerrychong25 commented 1 year ago

Any latest updates on this issue?

Thank you!

kbrown01 commented 1 year ago

Just need to post again ... and again ... and ... maybe some day?

jerrychong25 commented 1 year ago

Just need to post again ... and again ... and ... maybe some day?

Yeah, it will solve "one day"

kbrown01 commented 1 year ago

@jerrychong25 I actually deleted all devices from my brodlink app and just only re-added them with same names. I deleted them from HA and re-added with the new IP addresses. The Changing IP address seems to have gone away

jerrychong25 commented 1 year ago

@jerrychong25 I actually deleted all devices from my brodlink app and just only re-added them with same names. I deleted them from HA and re-added with the new IP addresses. The Changing IP address seems to have gone away

For HA steps, is this means that your end delete HA integration with old IP address, and re-add the same integration with new IP address?

As this issue should fix issue binding by MAC Address regardless what IP assigned by router. It should not affect functionality of Broadlink device in Home Assistant if any new assigned IP address by router.

kbrown01 commented 1 year ago

Agreed re MAC address. Just two separate things. It was totally unclear to me why I continually got a new IP address even when the router was not reset. I was only pointing out that I removed the devices in the phone app and readded them, but not any linked devices as I had already mapped many commands. I readded them with the new IP addresses and the same names. They now work and it has been multiple weeks and the device has not changed IP. I believe that It is possible my router had some error and was assigning the same IP to two devices, not sure.

But yes you are correct, the issue should be not to use IP addresses.

jerrychong25 commented 1 year ago

Agreed re MAC address. Just two separate things. It was totally unclear to me why I continually got a new IP address even when the router was not reset. I was only pointing out that I removed the devices in the phone app and readded them, but not any linked devices as I had already mapped many commands. I readded them with the new IP addresses and the same names. They now work and it has been multiple weeks and the device has not changed IP. I believe that It is possible my router had some error and was assigning the same IP to two devices, not sure.

But yes you are correct, the issue should be not to use IP addresses.

I see, thanks for sharing =)

Hoep it will change to re MAC address soon.

issue-triage-workflows[bot] commented 1 year ago

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.

jerrychong25 commented 1 year ago

Problem still not yet solved, kindly keep this issue open.

@Danielhiversen For your info.

Thank you.

issue-triage-workflows[bot] commented 1 year ago

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.

jerrychong25 commented 1 year ago

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.

Hi,

This issue still presists

kbrown01 commented 1 year ago

Yep. Still exists. Even worse now as I moved to Starlink and unless I remove the Starlink router and put in a different one I cannot even reserve addresses as the Starlink router does not support. Can;t change lease time. Nothing.

Result = every three days have to delete and re-add the integration.

Garbage. Should not be this way

tolnai commented 1 year ago

I also have related trouble, but a bit differently. I also experience daily problems with my router, when I need to restart it (restarting it with an automation triggering power cycle when ping doesn't work).

Sometimes the connection to the broadlink device is broken after this power cycle. The device has a fixed IP set in the router, and I was using that IP to add to HA. But when it becomes unavailable, I noticed that the IP changed in core.config_entries file's broadlink entry (data.host changing to bad IP). Device is still reachable on the proper IP, ping works for proper IP, but HA detects a different new IP for the device by mistake. Perhaps this DHCP discovery not working properly?

gdesmott commented 10 months ago

. Perhaps this DHCP discovery not working properly?

I think that's the problem indeed. I checked /config/.storage/core.config_entries and the IP of the device was totally wrong (192.168.0.* while my network is 192.168.1.*). Changing it to the right IP and rebooting fixed it.

alejovea9 commented 7 months ago

I have the same problem, i have 4 diferent installations of home assistant in diferent places, all of these installations with broadlink devices, and i think i have discovered the following:

The first conclusion i have is that the installation fails if I have more than one broadlink device in HA, i don't know if is problem of HA, or dhcp integration, i don't know, i hope the HA team can fix this.

issue-triage-workflows[bot] commented 4 months ago

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.

Montreal666 commented 4 months ago

Still an issue. Reconnection mechanism needs improvement.

mremedi2023 commented 2 months ago

Same here. [Errno -4000]

mremedi2023 commented 2 months ago

Screenshot_20240813-223914

jerrychong25 commented 2 months ago

Screenshot_20240813-223914

Mind to share which HA version for this?

mremedi2023 commented 2 months ago

image

But the problem has existed for months