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
71.13k stars 29.8k forks source link

Shelly EM and Shelly1PM no longer working after 2024.1.1 #107325

Closed silviudc closed 8 months ago

silviudc commented 8 months ago

The problem

After 2024.1.1 both shelly em and shelly1pm stopped working, error logs below, and fw versions

Firmware: 20230913-113709/v1.14.0-gcb84623 Hardware: gen1 (SHSW-PM)

Firmware: 20230913-114150/v1.14.0-gcb84623 Hardware: gen1 (SHEM)

What version of Home Assistant Core has the issue?

core-2024.1.1

What was the last working version of Home Assistant Core?

core-2024.1.0

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

No response

Example YAML snippet

No response

Anything in the logs that might be useful for us?

2024-01-05 21:37:33.075 ERROR (MainThread) [homeassistant.config_entries] Error setting up entry shellyem-5E26F6 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 131, in async_setup_entry
    return await _async_setup_block_entry(hass, entry)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/shelly/__init__.py", line 201, in _async_setup_block_entry
    await _async_block_device_setup()
  File "/usr/src/homeassistant/homeassistant/components/shelly/__init__.py", line 168, in _async_block_device_setup
    shelly_entry_data.block.async_setup()
  File "/usr/src/homeassistant/homeassistant/components/shelly/coordinator.py", line 338, in async_setup
    super().async_setup()
  File "/usr/src/homeassistant/homeassistant/components/shelly/coordinator.py", line 139, in async_setup
    hw_version=f"gen{self.entry.data[CONF_GEN]} ({self.model})",
                     ~~~~~~~~~~~~~~~^^^^^^^^^^
KeyError: 'gen'
2024-01-05 21:37:33.098 ERROR (MainThread) [homeassistant.config_entries] Error setting up entry shelly1pm-E09806AA06BA 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 131, in async_setup_entry
    return await _async_setup_block_entry(hass, entry)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/shelly/__init__.py", line 201, in _async_setup_block_entry
    await _async_block_device_setup()
  File "/usr/src/homeassistant/homeassistant/components/shelly/__init__.py", line 168, in _async_block_device_setup
    shelly_entry_data.block.async_setup()
  File "/usr/src/homeassistant/homeassistant/components/shelly/coordinator.py", line 338, in async_setup
    super().async_setup()
  File "/usr/src/homeassistant/homeassistant/components/shelly/coordinator.py", line 139, in async_setup
    hw_version=f"gen{self.entry.data[CONF_GEN]} ({self.model})",
                     ~~~~~~~~~~~~~~~^^^^^^^^^^
KeyError: 'gen'

Additional information

No response

home-assistant[bot] commented 8 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)

git2021-ll commented 8 months ago

Wanted to second this issue. Upgraded to 2023.1.1 and OS 11.3 when I found same logs:

Error setting up entry EM-Main 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 131, in async_setup_entry return await _async_setup_block_entry(hass, entry) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/components/shelly/init.py", line 201, in _async_setup_block_entry await _async_block_device_setup() File "/usr/src/homeassistant/homeassistant/components/shelly/init.py", line 168, in _async_block_device_setup shelly_entry_data.block.async_setup() File "/usr/src/homeassistant/homeassistant/components/shelly/coordinator.py", line 338, in async_setup super().async_setup() File "/usr/src/homeassistant/homeassistant/components/shelly/coordinator.py", line 139, in async_setup hw_version=f"gen{self.entry.data[CONF_GEN]} ({self.model})",


KeyError: 'gen'
grantclem commented 8 months ago

+1

Final-Hawk commented 8 months ago

Having the same issue with identical logs.

rubenj06 commented 8 months ago

Same issue, same setup and firmware.

bucky2076 commented 8 months ago

same issue with shelly gen 1 devices... including shelly 2.5 pm. Rolling back to an earlier ha version.

Aresitoo commented 8 months ago

+1 and many more on the HA oficial Facebook Page

Khonshu commented 8 months ago

+1 here

sco0ts commented 8 months ago

+1

ciedema commented 8 months ago

Seeing this issue on some Shelly devices. I have 4 X Shelly 1 Gen 1 Two connect, Two do not. I also have 4 3EM Pros - these connect.

All are running firmware version 20230913-114244/v1.14.0-gcb84623 (i.e. the correct version). Deleting and re-adding does not work.

bdraco commented 8 months ago

Duplicate of #107275 which is fixed in 2024.1.2 and scheduled for release. You can watch the progress at https://github.com/home-assistant/core/milestone/641

nerdybynature commented 8 months ago

Can we please stop replying "+1", "same" or similar?

There is an option to react on other people's comments with a thumbs up. Let's use that instead of flooding the comment section.

frenck commented 8 months ago

🤚 I have the same issue! 👇 Read below

Hi there! Sorry to read you are experiencing the same issue as more people here. Nobody likes having issues 😞

Finding an issue on a GitHub issue tracker that matches your problem is kinda nice: At least you know you are not alone. So, let's leave a commit with: "Yeah, I have the same issue", or "+1!!!". 🚫 No!

Please do not create "I have the same issue" comments!

Not just this issue or this project, but anywhere on GitHub or any issue tracker on the internet even. It doesn't add to triaging the issue. It only generates noise when reading / triaging the case.

What to do instead?

Instead, go to the top of the issue, and add a 👍 emoji reaction. That way, we can still see that you (and how many others) experience this issue while keeping the issue threads nice and clean.

Thanks! ❤️

../Frenck

frenck commented 8 months ago

ℹ️ Status of this issue

The issue has been fixed in #107294 by @thecode, has been merged, and is pending release.

Considering the large number of people affected and this being a highly used integration (almost 18% of installs, according to our analytics), I will ship an extra release today.

../Frenck


Edit: 2024-01-06 13:20 (CET)

I've started shipping Home Assistant 2024.1.2, which should be available for install around ~14:45 (CET).

Zilog-80 commented 8 months ago

I would like to report that Shelly 3EM also stopped working after 2024.1.1. This is irrelevant but 2024.1.1 fixed Davis WeatherLink custom integration.

silviudc commented 8 months ago

@frenck Much appreciate the quick fix, we all know how much we hate not gathering data :)

frenck commented 8 months ago

You don't have to thank me for a fix, @thecode was the one fixing it ❤️

iGranDav commented 8 months ago

I would like to report that Shelly 3EM also stopped working after 2024.1.1.

All Gen 2 devices needs to be updated to a firmware >= 1.0 to continue working.

smartkrskrab commented 8 months ago

2024.1.2 - Working !

frenck commented 8 months ago

Will it appear in updates?, or how can you force a check?, as can't see it yet?

As per release notes, in the backward-incompatible changes section, you need to update your devices before upgrading to this Home Assistant version. If you already did upgrade, you can upgrade your devices using the Shelly apps.

All of this, is not related to this issue.

Hmm I guess you meant 2024.1.2 🤔

Go to the setting panel -> select the three-dotted menu in the top right, select Check for updates. Wait a few seconds, and that update for Home Assistant 2024.1.2 should show up.

silviudc commented 8 months ago

Working fine now after 2024.1.2, thanks @thecode

Zilog-80 commented 8 months ago

Everything works great on 2024.1.2. Thanks a lot.

robertomontinaro80 commented 8 months ago

the issue is not yet fixed for me with the update of HA to 2024.1.2

thecode commented 8 months ago

the issue is not yet fixed for me with the update of HA to 2024.1.2

New issue please, with logs and diagnostics

robertomontinaro80 commented 8 months ago

Sorry I had to update firmware version for my shelly em. Now it's working fine.

Zappelphilipp commented 8 months ago

same issue. 2024.1.3 core not working shelly 3em firmware: v1.14.0-gcb84623 can ping and curl shelly from homeassistant

DEBUG (MainThread) [aioshelly.block_device.device] host 10.0.20.100: error: DeviceConnectionError(TimeoutError())
chrisandsally commented 8 months ago

Hi @Zappelphilipp, all good with me when I upgraded to 2024.1.3. I have 2 Shelly EM's on version v1.14.0-gcb84623. However did suffer issues on first release as per thread above. Not sure if same issue.