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
74.02k stars 31.05k forks source link

Shelly's disconnecting more often after 2024.9.0 #126152

Open davidrpfarinha opened 2 months ago

davidrpfarinha commented 2 months ago

The problem

Hey there folks,

Since the 2024.9.0 version, I started to notice that I do see some of the Shelly devices disconnecting more often. I don't recall any change made to my wifi network, which could be the other potential root cause to this issue, but as far as I can tell, nothing changed.

image

The odd thing is that is intermittent. image

If any other information is needed, or you want me to check something, please let me know.

What version of Home Assistant Core has the issue?

core-2024.9.1

What was the last working version of Home Assistant Core?

core-2024.9.*

What type of installation are you running?

Home Assistant Container

Integration causing the issue

Shelly

Link to integration documentation on our website

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

Diagnostics information

diagnostics-shelly-plus1pm-data.txt home-assistant_2024-09-18T13-08-30.210Z.log

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 2 months 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)

talormanda commented 2 months ago

All of my devices are going through this. I have made no changes.

image

T81 commented 2 months ago

I had the same issue. In my case it was the router. After a restart it works as it should. It's being an hour since without any disconnects. I found out when I tried to use the device IP in order to access the web interface.

davidrpfarinha commented 2 months ago

I had the same issue. In my case it was the router. After a restart it works as it should. It's being an hour since without any disconnects. I found out when I tried to use the device IP in order to access the web interface.

I had the same thought and performed a power cycle on my router, but the issue persists. I'm uncertain if there have been any changes in the frequency of the requests or the timeout period that causes it to show as unavailable. I'm not ruling out my network as the problem, but it is peculiar that the frequency has significantly increased after the upgrade.

albundy0815 commented 2 months ago

maybe my information helps. I had the same error messages in HomeAssistant and I've noticed, that my shellys got a different IP by my router the last days. Than I tried to readd the shellys (I haven't deleted the devices before, I only clicked on "add new devices" and added here the current IP) in HA again and it's fixed since ~24 hours.

stelios26 commented 2 months ago

I am also struggling with many disconnections recently. I have a few wifi APs around the house, and it looks to me that shelly devices that can see more than one APs, read the RSSI of the furthest one and try to roam if that value is below the threshold set in their settings instead of the one that they are actually connected to. I have set the threshold to -94 for those ones and it seems that connection is reliable and no longer disconnect/roam.

Rikirevolver88 commented 2 months ago

I have same problem at the moment, all of Shelly are reporting same issue disconnecting and reconnecting, real problem is that for instance for Shelly 2PM in the case that is unavailable and an automation is running and should deactivate the switch0, is not able to complete the step and the switch0 remain "ON", in the case that automation subsequently try to run to activate switch1 , it would be possible to make a fault on my external tent engine, what a mess! Anyway, what I noticed is that everything has started with firmware 1.4.2, am trying to purchase another Shelly plug S with previous firmware on-board and see what happens on registering it on HA. Not sure which firmware version you are running. P.S. got following

Core 2024.9.2 Supervisor 2024.09.1 Operating System 13.1 Frontend 20240909.1

davidrpfarinha commented 2 months ago

I have same problem at the moment, all of Shelly are reporting same issue disconnecting and reconnecting, real problem is that for instance for Shelly 2PM in the case that is unavailable and an automation is running and should deactivate the switch0, is not able to complete the step and the switch0 remain "ON", in the case that automation subsequently try to run to activate switch1 , it would be possible to make a fault on my external tent engine, what a mess! Anyway, what I noticed is that everything has started with firmware 1.4.2, am trying to purchase another Shelly plug S with previous firmware on-board and see what happens on registering it on HA. Not sure which firmware version you are running. P.S. got following

Core 2024.9.2 Supervisor 2024.09.1 Operating System 13.1 Frontend 20240909.1

That information is useful, and I began to suspect of the latest Shelly firmware as well, considering the dates were not too far apart from my upgrades.

Rikirevolver88 commented 2 months ago

I have same problem at the moment, all of Shelly are reporting same issue disconnecting and reconnecting, real problem is that for instance for Shelly 2PM in the case that is unavailable and an automation is running and should deactivate the switch0, is not able to complete the step and the switch0 remain "ON", in the case that automation subsequently try to run to activate switch1 , it would be possible to make a fault on my external tent engine, what a mess! Anyway, what I noticed is that everything has started with firmware 1.4.2, am trying to purchase another Shelly plug S with previous firmware on-board and see what happens on registering it on HA. Not sure which firmware version you are running. P.S. got following Core 2024.9.2 Supervisor 2024.09.1 Operating System 13.1 Frontend 20240909.1

That information is useful, and I began to suspect of the latest Shelly firmware as well, considering the dates were not too far apart from my upgrades.

am really interested to see if someone has previous firmware version and ours HA same one, and see the result. Otherwise another idea was to rollback <1.4.2 and see the result, I guess a flash is required? I never tried and also not sure if Shelly would allow a rollback but can have a look, again quickest option for me is purchase Shelly Plug S with firmware inferior 1.4.2 in next days and see the result, I will try to share the result

hallard commented 2 months ago

I have same issue here also. not sure it will help but I don't think it's related to Shelly FW or Wifi because Shelly app is working fine on my smartphone without any service down, I can read values and drive Shelly device, it's only in HA that device is disconnected. I also have Shelly integration in Homey, so far so good in this one also.

talormanda commented 2 months ago

My devices started working again for awhile, and now they seem to disconnect for no reason at all, then randomly start working again on their own with no changes made by me.

superkekko commented 1 month ago

Same problem, I can't use HA becasuse I've all my home with shelly device and I see continuous disconnecting. When I "reload" the device is ok only for fiew hours.

There is a tool that reload the disconnected configuration periodically?

wessa66 commented 1 month ago

I had the same issue I was forced to lower the UDP session timeout in my firewall(I have my HA and Shelly´s in two separate subnets)

but agree after 2004.8.3 shelly is working poor, I just lost all my Shellys with out any error messages was forced to shutdown my HA OS that I running in VMware (it wasn´t enough to just restart HA)

update 1 I lost them again in 2024.10.1 now I rolled back to 2024.9.1 :-(

Maschkenator commented 1 month ago

I thought there was an issue on my end before I checked this page. I did restarts/resets on the wifi, set the Shelly units to static IP's because I thought maybe they were "roaming" in the mesh causing disconnects. But the shelly app, and the devices when accessing through IP address directly work fine outside of HA...sometimes I was able to "add new device" with the IP, and it would re-sync the unit and make it work. Other times it would say "can't connect" which I found odd. But it keeps dropping one, two or 6 of them which seems random. Pro EM50 and H&T shelly device are the only ones running all the time, mini 1 gen 3, 1PM and 2pm are the ones currently offline again. Same as Talormanda's screenshot. Also the ESP integration seems to have similar issues (which is why I thought it was router related) but now I'm wondering if there's a common thread there. Tried rolling back software, but now I get white pages in HA...such a mess...I'll just update everything again and hope there will be an update thats going to make this stable again soon...or roll back to when this was a fresh built...:/

bin101 commented 1 month ago

~~I downgraded one of my shellys for testing purpose back to fw 1.3.3 and now it seems to work fine again. Without any guarantee here the link for multiple devices: https://rojer.me/files/shelly/stock/1.3.3/ Don't forget to disable auto-update if you have it enabled.~~

Edit: nvm the problem returned after some hours, my guess now is the integration or haos...

davidrpfarinha commented 1 month ago

So, I was able to reduce this by disabling the WIFI Roaming, and now only happens when the Client Leasing Time of my router reaches that time (even considering that I have a static IP). I'll monitor it, and provide feedback.

Screenshot 2024-10-13 at 21 28 02 Screenshot 2024-10-13 at 21 28 49

This was before disabling the WIFI Roaming.

Screenshot 2024-10-13 at 21 29 05
bin101 commented 1 month ago

Had static IPs set in my router before, but now also set them on the shellys themselves. Also set roaming interval to 0 and RSSI threshold to -70. Works fine now for 24 hours.

manjump commented 1 month ago

For me:

image

But:

image

And:

image

So what is the problem? not wifi no?

davidrpfarinha commented 1 month ago

For me:

image

But:

image

And:

image

So what is the problem? not wifi no?

It does look like wifi itself, but can't guarantee it. What is the Wifi status? image

manjump commented 1 month ago
image
davidrpfarinha commented 1 month ago

That's odd, given that it is even better than mine. Could it be that your Orbi DHCP leasing time is too low? I have Linksys mesh, so I don't have much context about Orbi. Either that, or your issue is different than mine.

stelios26 commented 1 month ago

@manjump this looks very similar to what I was experiencing. It was as if shelly was triggering roaming based on power level of the wrong access point, not the one it was actually connected at. Try lowering/increasing power of the neighboring access points so that they either disappear or become stronger, just to test.

mahlers2 commented 3 weeks ago

is there still no fix?