Closed GertJanArts closed 10 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)
Have the same problem since 2024.1
Same here since 2024.1. Shelly Smoke and H&T Plus affected. Firmware 1.1.0. Both battery powered... Other Shelly Plus devices (like Plus Plug S or i4 Plus) are not affected.
All Shelly Plus devices are using outbound web socket.
Logger: homeassistant.config_entries
Source: config_entries.py:406
First occurred: 23:13:12 (4 occurrences)
Last logged: 23:13:12
Error setting up entry GEO-IOT-HT1 for shelly
Error setting up entry GEO-IOT-HT2 for shelly
Error setting up entry GEO-IOT-SM1 for shelly
Error setting up entry GEO-IOT-SM2 for shelly
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/config_entries.py", line 406, in async_setup
result = await component.async_setup_entry(hass, self)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/shelly/__init__.py", line 129, in async_setup_entry
return await _async_setup_rpc_entry(hass, entry)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/shelly/__init__.py", line 296, in _async_setup_rpc_entry
await _async_rpc_device_setup()
File "/usr/src/homeassistant/homeassistant/components/shelly/__init__.py", line 251, in _async_rpc_device_setup
shelly_entry_data.rpc.async_setup()
File "/usr/src/homeassistant/homeassistant/components/shelly/coordinator.py", line 615, in async_setup
super().async_setup()
File "/usr/src/homeassistant/homeassistant/components/shelly/coordinator.py", line 138, in async_setup
hw_version=f"gen{self.device.gen} ({self.model})",
^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/aioshelly/rpc_device/device.py", line 378, in gen
raise NotInitialized
aioshelly.exceptions.NotInitialized
Thanks for reporting, no need for further information for, the log shows the error
@thecode any chance to get a fix before the official 2024.1.1 release? I would like to exchange the file :)
P.S. I really need to get started with python ... :bulb:
For people that cannot wait (like me), I have patched my home assistant container. When using HA OS, open the host terminal and enter the home assistant container using docker exec -it homeassistant bash
. Then edit the aioshelly rpc file that is throwing the error using vi /usr/local/lib/python3.11/site-packages/aioshelly/rpc_device/device.py
. Adjust the gen
property to always return 2, as it did before https://github.com/home-assistant-libs/aioshelly/commit/ef3d29a4c6be7bdabaed0ef4c925784d1111fb56. You should obviously only use this if you do not have gen3 devices. Restart Home Assistant, and it magically works again :)
@property
def gen(self) -> int:
"""Device generation: GEN2/3 - RPC."""
+ return 2
if self._shelly is None:
raise NotInitialized
return cast(int, self._shelly["gen"])
Just a note that I updated the firmware on all my Shelly devices and that solved it for me, so that might be an option for those who don't want to mess with manual patching.
@NickiNiclas That would work for the non-battery devices, this particular issue happens only with the battery devices (which already have the latest 1.1.0 firmware installed).
I updated and readded all my Shelly Plus Smoke devices to Firmware 1.1.0 and they startet working again until restart of Home Assistant. The devices must always readded completely new after HA restart. Any other solution possible ? Or is it better to downgrade HA to 2023 version?
Any other solution possible ? Or is it better to downgrade HA to 2023 version?
Fix will be available in HA 2024.1.1.
@bieniu When will the version be released?
When will the version be released?
Just to note here that the MQTT integration is not impacted by this issue and so I switched to using that as the source so my stuff keeps working.
Have tried 2024.1.0 and 2024.1.1 and in both I lose most of my Shelly devices such as 1PM and Plus 1PM. All are on latest firmware, eg Plus 1PM 20231219-133934/1.1.0-g34b5d4f
Only fix is to roll back to 2023.12.4 in which all the devices work again
Have tried 2024.1.0 and 2024.1.1 and in both I lose most of my Shelly devices such as 1PM and Plus 1PM. All are on latest firmware, eg Plus 1PM 20231219-133934/1.1.0-g34b5d4f
Only fix is to roll back to 2023.12.4 in which all the devices work again
2024.1.2 is being build right now and should resolve your issue, if not please open a new issue, not commenting on this one as it is mostly likely another issue and closed issues are not being followed. Thanks & sorry for the trouble.
While it may not help I now don't have any issues. I have 9 shelly devices.. 1PM plus, TRV's, plug, H&T's.. installing 12.1 resulted in 4 devices stoping as described in this ticket. Investigating I found 2 of them (1PM and plug) had 1.0 beta installed so assume they stopped auto updating. Updating firmware brought those back on line. The two h&t's remaind red in the shelly app .. I added mqtt and got them working again. Having now installed 12.1.1 the H&T's are back working in the shelly app
The 1PM Device info Shelly Plus 1PM Firmware: 20231219-133934/1.1.0-g34b5d4f Hardware: gen2 (SNSW-001P16EU)
The problem
After upgrading to HA v2024.1.0 my two Shelly Smoke Plus (Gen 2) devices do not become active. Firmware is already on the latest version 1.1.0
What version of Home Assistant Core has the issue?
2024.1.0
What was the last working version of Home Assistant Core?
previous version 2023
What type of installation are you running?
Home Assistant OS
Integration causing the issue
Shelly
Link to integration documentation on our website
No response
Diagnostics information
No response
Example YAML snippet
No response
Anything in the logs that might be useful for us?
Additional information
tried to wake up the devices. no problem with the webinterface. Connection to HA via Outbound websocket