core icon indicating copy to clipboard operation
core copied to clipboard

timeout Shelly devices problem

Open raptr55 opened this issue 3 months ago • 6 comments

The problem

after upgrading from a raspberry pi3b to a raspberry pi 5 some shelly devices cant connect to home assistant

What version of Home Assistant Core has the issue?

core-2024.4.0 and core-2024.4.2

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

home-assistant_shelly_2024-04-09T21-24-31.340Z.log

Example YAML snippet

No response

Anything in the logs that might be useful for us?

2024-04-10 10:19:48.451 DEBUG (MainThread) [aioshelly.block_device.device] host 192.168.1.15: error: DeviceConnectionError(TimeoutError())

Additional information

in the raspberrypi upgrade i loaded a previous snapshot where everything worked. the shelly ip's did not change as well as nothing changed but the board. even the home assistant ip remained the same.

this morning after many hours the shellys connected but the even stranger thing is that all the automations disappeared even though they were written in the automation.yaml file. following a reboot the automations became available again but the shellys will not connect again

all shellys are reachable and usable via http link from browser

raptr55 avatar Apr 09 '24 21:04 raptr55

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)

home-assistant[bot] avatar Apr 09 '24 21:04 home-assistant[bot]

What is the IP address of the new PI?

some of your devices doesn't have unicast configured and some are configured to 192.168.1.187:5683, I assume that if you changed the hardware the server received a new IP.

thecode avatar Apr 10 '24 12:04 thecode

What is the IP address of the new PI?

some of your devices doesn't have unicast configured and some are configured to 192.168.1.187:5683, I assume that if you changed the hardware the server received a new IP.

no, same ip for the new raspberry. 100% sure about this

raptr55 avatar Apr 10 '24 14:04 raptr55

this is the log of one of the shellys that goes on timeout:

527217820 mgos_sys_config.c:323 Saved to conf9.json 527338316 mgos_http_server.c:180 0x3ffef824 HTTP connection from 192.168.1.22:62583 527378325 mgos_mongoose.c:66 New heap free LWM: 33632 530535160 shelly_sntp.c:441 minute tick at 14:26:00 530627362 mgos_http_server.c:180 0x3ffef824 HTTP connection from 192.168.1.187:55866 531727693 mgos_http_server.c:180 0x3fff227c HTTP connection from 192.168.1.187:55872 531943687 mgos_http_server.c:180 0x3fff227c HTTP connection from 192.168.1.22:62589 531965011 json.c:428 RAM: 51688 total, 37680 free 532856618 mgos_http_server.c:180 0x3fff227c HTTP connection from 192.168.1.187:50118 532873358 json.c:428 RAM: 51688 total, 38236 free 536949522 mgos_http_server.c:180 0x3fff227c HTTP connection from 192.168.1.22:62590 536974138 json.c:428 RAM: 51688 total, 38004 free 541934566 mgos_http_server.c:180 0x3fff1a84 HTTP connection from 192.168.1.22:62591 541954475 json.c:428 RAM: 51688 total, 38372 free 545262240 mgos_http_server.c:180 0x3fff1afc HTTP connection from 192.168.1.22:62593

192.168.1.22 is my pc refreshing the logs 192.168.1.187 its home assistant

raptr55 avatar Apr 11 '24 12:04 raptr55

Do you need any other info?

raptr55 avatar Apr 12 '24 21:04 raptr55

After quite some time the devices connect to home assistant. After a reboot the problem occurs again.

If the devices connect(even after hours) there’s no problem on network side… I think there’s an issue on homeassistant side.

How can i help in order to solve this problem?

raptr55 avatar May 05 '24 17:05 raptr55

I too am seeing this, I have my home assistant running on a dedicated PC and have noticed over the last few days that my shellys have stopped working with connection errors, the only change has been updating home assistant

mattrayner avatar May 08 '24 15:05 mattrayner

Could be the same issue as https://github.com/home-assistant/core/issues/115354

See the section Enabling asyncio debug mode at run time (preferred) in https://community.home-assistant.io/t/2024-5-tracking-down-instability-issues-caused-by-integrations/724441

bdraco avatar May 08 '24 15:05 bdraco

Could be the same issue as #115354

See the section Enabling asyncio debug mode at run time (preferred) in https://community.home-assistant.io/t/2024-5-tracking-down-instability-issues-caused-by-integrations/724441

ok something strange happened. right after activating the indicated setting the shelly connected...

look for the device [192.168.1.17]. i enabled the settings at: 2024-05-08 18:06:33.626 CRITICAL (MainThread) [homeassistant.components.profiler] Setting asyncio debug to True

home-assistant_2024-05-08T16-09-54.657Z.log

maybe the timeout time is too tight and when you enable the setting it slows down the system and the response comes before the timeout?

raptr55 avatar May 08 '24 16:05 raptr55