Open webjester0 opened 4 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!
(message by CodeOwnersMention)
shelly documentation shelly source (message by IssueLinks)
I have the same problem with Shelly Plug 1
After upgrading my local router, the problems seams to be gone
Same here, Gen3 1pm mini , constantly becomes unavalible in HA.
Same here. One interesting note is the shelly is online and reachable through shelly app, and if I restart through the shelly app it reconnects just fine.
I am having a very similar issue that is documented in this thread but with a Shelly Plus 1UL. I have about 12 of them on my home network with all fixed IPs. Every now and then they become unavailable and I and seeing these 3 debugs with each error instance of code at every instance.
2024-07-29 07:49:13.610 ERROR (MainThread) [homeassistant.components.shelly] Error fetching shellyplus1-d48afc75d328 data: Device disconnected: DeviceConnectionError()
2024-07-29 07:49:13.610 DEBUG (MainThread) [homeassistant.components.shelly] Finished fetching shellyplus1-d48afc75d328 data in 10.001 seconds (success: False)
2024-07-29 07:49:13.610 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event state_changed[L]: entity_id=sensor.sh_1_uptime, old_state=<state sensor.sh_1_uptime=2024-07-28T18:53:56+00:00; device_class=timestamp, friendly_name=shellyplus1-d48afc75d328 uptime @ 2024-07-28T22:21:02.759027-05:00>, new_state=<state sensor.sh_1_uptime=unavailable; device_class=timestamp, friendly_name=shellyplus1-d48afc75d328 uptime @ 2024-07-29T07:49:13.610311-05:00>>
2024-07-29 07:49:13.610 DEBUG (Recorder) [homeassistant.components.recorder.core] Processing task: <Event state_changed[L]: entity_id=sensor.sh_1_uptime, old_state=<state sensor.sh_1_uptime=2024-07-28T18:53:56+00:00; device_class=timestamp, friendly_name=shellyplus1-d48afc75d328 uptime @ 2024-07-28T22:21:02.759027-05:00>, new_state=<state sensor.sh_1_uptime=unavailable; device_class=timestamp, friendly_name=shellyplus1-d48afc75d328 uptime @ 2024-07-29T07:49:13.610311-05:00>>
All my gen 3 mini 1s are disconnecting also, only started happening after the Shelly 1.4.0 firmware update. No other issues on my network. Resolves briefly if I reboot the device but always go offline again. Example logs below.
Logger: homeassistant.components.shelly Source: components/shelly/coordinator.py:171 integration: Shelly (documentation, issues) First occurred: August 2, 2024 at 10:04:29 AM (7698 occurrences) Last logged: 7:33:51 AM
Error connecting to Shelly device Shelly Front Deck, error: DeviceConnectionError(DeviceConnectionError(ClientConnectorError(ConnectionKey(host='2404:4400:41fc:3401: :::', port=80, is_ssl=False, ssl=True, proxy=None, proxy_auth=None, proxy_headers_hash=8289076281446336964), OSError(113, "Connect call failed ('2404:4400:41fc:3401: :::', 80, 0, 0)")))) Error connecting to Shelly device Back Deck, error: DeviceConnectionError(DeviceConnectionError(TimeoutError())) Error connecting to Shelly device Dining, error: DeviceConnectionError(DeviceConnectionError(TimeoutError())) Error connecting to Shelly device Dining, error: DeviceConnectionError(DeviceConnectionError(ClientConnectorError(ConnectionKey(host='2404:4400:41fc:3401: :::', port=80, is_ssl=False, ssl=True, proxy=None, proxy_auth=None, proxy_headers_hash=8289076281446336964), OSError(113, "Connect call failed ('2404:4400:41fc:3401: :::', 80, 0, 0)")))) Error connecting to Shelly device Back Deck, error: DeviceConnectionError(DeviceConnectionError(ClientConnectorError(ConnectionKey(host='2404:4400:41fc:3401: :::', port=80, is_ssl=False, ssl=True, proxy=None, proxy_auth=None, proxy_headers_hash=8289076281446336964), OSError(113, "Connect call failed ('2404:4400:41fc:3401::::', 80, 0, 0)"))))
@axlback Your problem is different and has already been fixed. The fix will be available in HA 2024.8.0.
@webjester0 @normalee1993 @makerwolf1 @CC-JION I recommend to restart HA in safe mode and check if problem still exists https://www.home-assistant.io/docs/troubleshooting_general/#restarting-home-assistant-in-safe-mode
@axlback Your problem is different and has already been fixed. The fix will be available in HA 2024.8.0.
Thanks very much. You guys are fantastic.
@webjester0 @normalee1993 @makerwolf1 @CC-JION I recommend to restart HA in safe mode and check if problem still exists https://www.home-assistant.io/docs/troubleshooting_general/#restarting-home-assistant-in-safe-mode
Ever since updating to 1.4.0 the issue has not happened again (since August 1st). Running safe mode is thus very impractical, as also before the issue could take a few days to re-appear.
Hi I have got the same issue with a Pro EM 50 after updating to 1.4.0. Here is the log:
> Logger: homeassistant.config_entries
> Source: config_entries.py:594
> First occurred: 01:38:01 (10 occurrences)
> Last logged: 22:38:05
>
> Error setting up entry shellyproem50-08f9e0e5c910 for shelly
> Error setting up entry shellyproem50-08f9e0e61d50 for shelly
> Traceback (most recent call last):
> File "/usr/local/lib/python3.12/site-packages/yarl/_url.py", line 191, in __new__
> port = val.port
> ^^^^^^^^
> File "/usr/local/lib/python3.12/urllib/parse.py", line 182, in port
> raise ValueError(f"Port could not be cast to integer value as {port!r}")
> ValueError: Port could not be cast to integer value as '676:aa82:0:af9:e0ff:fee5:c910:80'
>
> The above exception was the direct cause of the following exception:
>
> Traceback (most recent call last):
> File "/usr/src/homeassistant/homeassistant/config_entries.py", line 594, in async_setup
> result = await component.async_setup_entry(hass, self)
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> File "/usr/src/homeassistant/homeassistant/components/shelly/__init__.py", line 128, in async_setup_entry
> return await _async_setup_rpc_entry(hass, entry)
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> File "/usr/src/homeassistant/homeassistant/components/shelly/__init__.py", line 265, in _async_setup_rpc_entry
> shelly_entry_data.rpc.async_setup()
> File "/usr/src/homeassistant/homeassistant/components/shelly/coordinator.py", line 695, in async_setup
> super().async_setup(pending_platforms)
> File "/usr/src/homeassistant/homeassistant/components/shelly/coordinator.py", line 142, in async_setup
> device_entry = dev_reg.async_get_or_create(
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> File "/usr/src/homeassistant/homeassistant/helpers/device_registry.py", line 663, in async_get_or_create
> configuration_url = _validate_configuration_url(configuration_url)
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> File "/usr/src/homeassistant/homeassistant/helpers/device_registry.py", line 234, in _validate_configuration_url
> url = value if type(value) is URL else _cached_parse_url(url_as_str)
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> File "/usr/local/lib/python3.12/site-packages/yarl/_url.py", line 193, in __new__
> raise ValueError(
> ValueError: Invalid URL: port can't be converted to integer
>
It worked just fine for a few months before the update. It works for a few minutes if I do a manual reload or reconfigure from the shelly device list in HA. Any ideas?
I installed 3 x Shelly 1PM Mini Gen3 2 days ago (already have numerous Shelly Plus 1PM and Plus 2PM devices running fine) and am seeing the same issue. Interestingly, I only ever have 2 out of 3 go offline in HA; never all 3 at the same time. All of mine were updated to firmware v1.4.0 as soon as I set them up.
As others have observed,
I'm running: Version core-2024.7.4 Installation type Home Assistant OS Supervisor true Docker true User root Virtual environment false Python version 3.12.4 Operating system family Linux Operating system version 6.6.33-haos
I'll enable Debugging and grab Debug logs and Diagnostics later today.
EDIT: ah. I think I'm seeing the issue resolved by this fix in 2024.8 https://github.com/home-assistant/core/pull/123081
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.
Can confirm it works now
The problem
Shelly Gen3 devices (PM1 and 1 Mini) randomly go unavailable in HA. Sometimes for hours. Even though the devices are running fine in the Shelly app. Reloading the integration works, temporarily.
What version of Home Assistant Core has the issue?
core-2024.7.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 Gen3 PM1 and 1 mini
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?
Additional information
No response