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.68k stars 30.81k forks source link

Shelly integration does not re-discover plugs after network IP range changes #130684

Closed 0x53A closed 3 hours ago

0x53A commented 3 hours ago

The problem

I got a new router from my internet provider, and didn't notice that the IP range changed from 192.168.0.0/255.255.255.0 to 192.168.178.0/255.255.255.0 before it was too late.

(Well I guess I could still switch it back, but I took this as an opportunity to validate that there are no hardcoded IPs in my network)

I had to restart some of the devices to force them to get a new IP from DHCP, but eventually all of them did.

Some HA integrations didn't cope with the network change, though.

image


I did the following to fix this:

I opened /config/.storage/core.config_entries and changed only the third byte from 0 to 178. Even though the IP addresses were still wrong, fixing the subnet was enough to help the integration re-discover 4 out of 5 of them. (Or it might have just been because of the reboot, but I did restart HA previously)

What version of Home Assistant Core has the issue?

core-2024.11.1

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

Shelly

Link to integration documentation on our website

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

Diagnostics information

No response

Example YAML snippet

No response

Anything in the logs that might be useful for us?

No response

Additional information

No response

home-assistant[bot] commented 3 hours ago

Hey there @balloob, @bieniu, @thecode, @chemelli74, @bdraco, mind taking a look at this issue as it has been labeled with an integration (shelly) you are listed as a code owner for? Thanks!

Code owner commands Code owners of `shelly` can trigger bot actions by commenting: - `@home-assistant close` Closes the issue. - `@home-assistant rename Awesome new title` Renames the issue. - `@home-assistant reopen` Reopen the issue. - `@home-assistant unassign shelly` Removes the current integration label and assignees on the issue, add the integration domain after the command. - `@home-assistant add-label needs-more-information` Add a label (needs-more-information, problem in dependency, problem in custom component) to the issue. - `@home-assistant remove-label needs-more-information` Remove a label (needs-more-information, problem in dependency, problem in custom component) on the issue.

(message by CodeOwnersMention)


shelly documentation shelly source (message by IssueLinks)

thecode commented 3 hours ago

Shelly integration doesn't know anything about the subnet of the devices and a reboot is needed for the mDNS to happen again in this case. If you still think there is an issue and want to investigate this further please download the diagnostics from the device card in Home Assistant and attach it in a comment.

0x53A commented 3 hours ago

Then it was probably fixed by the reboot, but I could have sworn I had rebooted before.