Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error setting up entry shellyuni-E8DB84D23B4B for shelly #107277

Closed
dynasticorpheus opened this issue Jan 5, 2024 · 5 comments
Closed

Error setting up entry shellyuni-E8DB84D23B4B for shelly #107277

dynasticorpheus opened this issue Jan 5, 2024 · 5 comments

Comments

@dynasticorpheus
Copy link
Contributor

dynasticorpheus commented Jan 5, 2024

The problem

After upgrading from 2024.1.0 to 2024.1.1 getting below error. Most likely related to #107019

2024-01-05 19:06:37.069 ERROR (MainThread) [homeassistant.config_entries] Error setting up entry shellyuni-E8DB84D23B4B for shelly
Traceback (most recent call last):
  File "/mnt/usb02/apps/home-assistant-master/lib/python3.11/site-packages/homeassistant/config_entries.py", line 406, in async_setup
    result = await component.async_setup_entry(hass, self)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/mnt/usb02/apps/home-assistant-master/lib/python3.11/site-packages/homeassistant/components/shelly/__init__.py", line 131, in async_setup_entry
    return await _async_setup_block_entry(hass, entry)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/mnt/usb02/apps/home-assistant-master/lib/python3.11/site-packages/homeassistant/components/shelly/__init__.py", line 201, in _async_setup_block_entry
    await _async_block_device_setup()
  File "/mnt/usb02/apps/home-assistant-master/lib/python3.11/site-packages/homeassistant/components/shelly/__init__.py", line 168, in _async_block_device_setup
    shelly_entry_data.block.async_setup()
  File "/mnt/usb02/apps/home-assistant-master/lib/python3.11/site-packages/homeassistant/components/shelly/coordinator.py", line 338, in async_setup
    super().async_setup()
  File "/mnt/usb02/apps/home-assistant-master/lib/python3.11/site-packages/homeassistant/components/shelly/coordinator.py", line 139, in async_setup
    hw_version=f"gen{self.entry.data[CONF_GEN]} ({self.model})",
                     ~~~~~~~~~~~~~~~^^^^^^^^^^
KeyError: 'gen'

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 Core

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?

No response

Additional information

Manually adding the missing gen key/value to core.config_entries file resolves the issue.

@home-assistant
Copy link

home-assistant bot commented Jan 5, 2024

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)

@crudolphy
Copy link

I am having a similar issue since updated to 2024.1.1. I have (5) shelly devices. (4) shelly 1pm and (1) shelly plus 1pm. The (4) shelly 1pm were unreachable. The shelly plus 1pm is fine and working. I checked connectivity via my router (OPNsense, active DHCP leases), my AP (tp-link EAP225, Omada SDN, "Connected"), and the shelly app on my phone. All 5 devices are controllable via the Shelly phone app. Note that I open the terminal add-on in HA and all 5 devices respond to a ping from the HA host.

I deleted the (4) problem devices and restarted HA. Then I went to re-add them. When adding the device I get this error message:

"Failed to connect"

I went to the logs and found these messages:

Logger: homeassistant.components.shelly
Source: helpers/debounce.py:114
Integration: Shelly (documentation, issues)
First occurred: 11:45:25 AM (4 occurrences)
Last logged: 11:47:17 AM

Unexpected exception from <bound method ShellyCoordinatorBase._async_reload_entry of <homeassistant.components.shelly.coordinator.ShellyBlockCoordinator object at 0x7f8727c19f90>>
Unexpected exception from <bound method ShellyCoordinatorBase._async_reload_entry of <homeassistant.components.shelly.coordinator.ShellyBlockCoordinator object at 0x7f872b837ed0>>
Unexpected exception from <bound method ShellyCoordinatorBase._async_reload_entry of <homeassistant.components.shelly.coordinator.ShellyBlockCoordinator object at 0x7f8727c20e10>>
Unexpected exception from <bound method ShellyCoordinatorBase._async_reload_entry of <homeassistant.components.shelly.coordinator.ShellyBlockCoordinator object at 0x7f8727257a90>>
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/debounce.py", line 114, in _handle_timer_finish
await task
File "/usr/src/homeassistant/homeassistant/components/shelly/coordinator.py", line 148, in _async_reload_entry
await self.hass.config_entries.async_reload(self.entry.entry_id)
File "/usr/src/homeassistant/homeassistant/config_entries.py", line 1283, in async_reload
raise UnknownEntry
homeassistant.config_entries.UnknownEntry

And this one:

Logger: homeassistant.components.shelly
Source: helpers/update_coordinator.py:332
Integration: Shelly (documentation, issues)
First occurred: 11:29:30 AM (6 occurrences)
Last logged: 12:13:49 PM

Error fetching Ceiling outlet data: Error fetching data: DeviceConnectionError()
Error fetching shelly1pm-F4CFA2747E78 data: Error fetching data: DeviceConnectionError()
Error fetching Back (west) Wall outlet data: Error fetching data: DeviceConnectionError()
Error fetching Bench (south wall) outlet data: Error fetching data: DeviceConnectionError()

Here is the pertinent data regarding my HA instance:
Core
2024.1.1
Supervisor
2023.12.0
Operating System
11.3
Frontend
20240104.0

Please fix as soon as you can. If you have any questions, ask I will do what I can to assist.

Regards
Chuck

@tescophil
Copy link

I have the same error with a Shelley EM and a Shelly 1 both on the latest firmware. Here is the diagnostic error log from the startup

error_log.txt

@lobolobo
Copy link

lobolobo commented Jan 5, 2024

I have the same error with a Shelley EM and a Shelly 1 both on the latest firmware. Here is the diagnostic error log from the startup

error_log.txt

Exact the same problem.

@thecode
Copy link
Member

thecode commented Jan 5, 2024

Duplicate of #107275

@thecode thecode marked this as a duplicate of #107275 Jan 5, 2024
@thecode thecode closed this as completed Jan 5, 2024
@github-actions github-actions bot locked and limited conversation to collaborators Feb 4, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

9 participants