core: Shelly 2.5 switches unavailable in HA when upgrading to 0.118.4 with Shelly vanilla firmware ⩾ 1.9.0
The problem
When upgrading from 0.117(.?)
to 0.118.4
, my Shelly 2.5 devices (FW 1.9.2
) became unavailable.
To be more precise:
- my fleet of Shelly Dimmers and Shelly 1/1PM still interfaces with HA like a charm;
- my Shelly 2.5 switches previously added in HA no longer work (unavailable), while being up and working perfectly in direct Shelly mode (web UI,
GET
to/status
…); - a new Shelly 2.5 switch I just added is being discovered in the Integrations screen and its IP address proposed, but adding it leads to a
Failed to connect
.
Environment
- Home Assistant Core release with the issue:
0.118.4
- Last working Home Assistant Core release (if known):
0.117(.?)
- Operating environment (OS/Container/Supervised/Core): Synology Hass.io package (https://community.home-assistant.io/t/hass-io-on-synology-dsm-native-package/125559); container version
homeassistant/qemux86-64-homeassistant:0.118.4
; supervisor containerhomeassistant/amd64-hassio-supervisor:2020.11.4
- Integration causing this issue: Shelly
- Link to integration documentation on our website: https://www.home-assistant.io/integrations/shelly/
Problem-relevant configuration.yaml
No specifics in configuration.yaml
at this stage.
Traceback/Error logs
2020-11-29 11:01:45 DEBUG (MainThread) [homeassistant.components.shelly] Manually updated <hidden> data
2020-11-29 11:01:56 DEBUG (MainThread) [homeassistant.components.shelly] Manually updated <hidden> data
2020-11-29 11:01:56 WARNING (MainThread) [homeassistant.config_entries] Config entry for shelly not ready yet. Retrying in 80 seconds
2020-11-29 11:01:56 WARNING (MainThread) [homeassistant.config_entries] Config entry for shelly not ready yet. Retrying in 80 seconds
2020-11-29 11:01:56 WARNING (MainThread) [homeassistant.config_entries] Config entry for shelly not ready yet. Retrying in 80 seconds
2020-11-29 11:02:00 DEBUG (MainThread) [homeassistant.components.shelly] Manually updated <hidden> data
2020-11-29 11:02:00 WARNING (MainThread) [homeassistant.config_entries] Config entry for shelly not ready yet. Retrying in 80 seconds
2020-11-29 11:02:00 DEBUG (MainThread) [homeassistant.components.shelly] Manually updated <hidden> data
2020-11-29 11:02:00 DEBUG (MainThread) [homeassistant.components.shelly] Manually updated <hidden> data
Manually updated
lines refer to Shelly devices that still work with HA (I just hide their names), while – I guess – the four Config entry for shelly not ready yet
lines refer to the failing interfacing of the 2.5 switches. Of course this log extract happens very periodically within the core container.
Additional information
Shelly 2.5 upgraded to last firmware 20201128-102046/v1.9.2
Working Shelly Dimmers & 1 upgraded to last firmware 20201124-092706/v1.9.0
Cannot say if 0.118.4
did work with previous version of the Shelly firmwares since I updated all at once (my bad).
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Comments: 32 (16 by maintainers)
@thecode, I confirm this now works with FW
1.9.3-rc2
, and will definitely investigate why these UDP fragmented packets are dropped (couldn’t find anything relevant at this stage linked to some Synology OS specifics).Thank you all for your help and time!
And some UDP traces (I dropped advertising frames):
antoine-radiateur
is w/ FW1.8.5
when clicking on Submit;parents-radiateur
is w/ FW1.9.3-rc1
when clicking on Submit.Could you downgrade firmware to 1.9.0 on one of the problematic devices?
You can update your Shelly 2.5 with the same URL as before, this should solve the problem for now, but I suggest to check why fragmented UDP packets are dropped on your system
I’ve found the root cause you are experiencing with firmware versions >1.8.5 for Shelly 2.5 The events from the device are based on UDP CoAP message, this message was increased in version 1.9.0 in order to provide future functionally for the device. Due to this increase this UDP packet is fragmented into two packets and reassembled, some systems does not reassemble this packet correctly. Please record traffic from device IP and port 5683. In addition try to check if this is a known issue for your system and what are the options to fix it. I’m discussing with Shelly Devs what can be done to overcome this problem in another way. If you have Shelly 3EM, it is already using a large CoAP packet and should not work for you.
I’ve prepared a modified integration for you. You can use it as a custom component or replace
config_flow.py
and__init__.py
in your HA installation. Repo: https://github.com/bieniu/ha-shelly-test-1.9.2You can downgrade using this url: http://
__ip__
/ota?url=http://archive.shelly-faq.de/version/v1.9.0/SHSW-25.zip Replace__ip__
with your device IP address.