StyraHem / ShellyForHASS

Shelly smart home platform for Home Assistant
MIT License
619 stars 111 forks source link

[BUG] All shellies unavailable after updating to 2021.12.1 #625

Closed NeonOby closed 2 years ago

NeonOby commented 2 years ago

Environment

Describe the bug

I updated home assistant and after that all shellies are offline. The used ip addresses are all correct and i can use the "Visit Device" button in home assistant devices to get to the web interface.

Steps to Reproduce

Expected behavior

Screenshots

Traceback/Error logs

Logger: homeassistant.config_entries
Source: custom_components/shelly/__init__.py:98
Integration: Shelly smart home (documentation)
First occurred: 18:33:29 (17 occurrences)
Last logged: 18:33:30

Error setting up entry Wohnzimmer - Media for shelly
Error setting up entry GästeWC for shelly
Error setting up entry Wohnzimmer - Strom 1 for shelly
Error setting up entry Esszimmer - Licht for shelly
Error setting up entry Küche - Strom for shelly
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 313, in async_setup
    result = await component.async_setup_entry(hass, self)  # type: ignore
  File "/config/custom_components/shelly/__init__.py", line 98, in async_setup_entry
    conf = CONFIG_SCHEMA_ROOT(data)
  File "/usr/local/lib/python3.9/site-packages/voluptuous/schema_builder.py", line 272, in __call__
    return self._compiled([], data)
  File "/usr/local/lib/python3.9/site-packages/voluptuous/schema_builder.py", line 594, in validate_dict
    return base_validate(path, iteritems(data), out)
  File "/usr/local/lib/python3.9/site-packages/voluptuous/schema_builder.py", line 432, in validate_mapping
    raise er.MultipleInvalid(errors)
voluptuous.error.MultipleInvalid: extra keys not allowed @ data['host']

Additional context

I think that i understand what "voluptuous.error.MultipleInvalid: extra keys not allowed @ data['host']" could mean, but i don't have any idea where this "host" entry could be in my configs.

I probably did forget to read the how to upgrade or whatever or missed something. I am thankfull for any help.

hakana commented 2 years ago

Try to restart HA

Steffe2 commented 2 years ago

Mine seems to work after reinstalling the Shelly integration, and not configuring it. Not sure it'll help for you though.

NeonOby commented 2 years ago

I did restart the pi, a lot of times, with power cycling or with the restart button in system menu. I also tried reverting to the automatic backup made by home assistant. Did not help.

I did not yet try to reinstall the integration because i am not sure if this will wipe the setup.

Steffe2 commented 2 years ago

For me it repopulated the dashboard as I had it before automatically (only a few Plug S though), so I can't say what will happen for you if you have other devices.

NeonOby commented 2 years ago

Wait i think i see something wrong. Before i added one integration for each shelly and I am pretty sure i had to select or set the Ip and name and all of this.

Now if i try to add the shelly integration it just asks me for prefix for all shellys and thats it. This new integration shows all shellys but without buttons, it only shows firmware update switch.

DamianosS commented 2 years ago

@hakana, any news on this? I have 75 shelly devices and 382 entities based on them, all names edited manually, plus tons of automations. I would be harsh to ditch all that work... :( Thanks!

DamianosS commented 2 years ago

[SOLVED]

@hakana, any news on this? I have 75 shelly devices and 382 entities based on them, all names edited manually, plus tons of automations. I would be harsh to ditch all that work... :( Thanks!

The most recent update via HACS fixed that apparently.

Big thanks! :)

NeonOby commented 2 years ago

For me it didn't fix it. I updated to: Home Assistant OS 7.0 Home Assistant 2021.12.2 ShellyForHASS 0.3.3

I still get this on startup (as soon as the shelly integrations are loaded)

Logger: homeassistant.config_entries
Source: custom_components/shelly/__init__.py:98
Integration: Shelly smart home (documentation)
First occurred: 07:36:06 (16 occurrences)
Last logged: 07:36:06

Error setting up entry Wohnzimmer - Media for shelly
Error setting up entry GästeWC for shelly
Error setting up entry Wohnzimmer - Strom 1 for shelly
Error setting up entry Esszimmer - Licht for shelly
Error setting up entry Küche - Strom for shelly
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 313, in async_setup
    result = await component.async_setup_entry(hass, self)  # type: ignore
  File "/config/custom_components/shelly/__init__.py", line 98, in async_setup_entry
    conf = CONFIG_SCHEMA_ROOT(data)
  File "/usr/local/lib/python3.9/site-packages/voluptuous/schema_builder.py", line 272, in __call__
    return self._compiled([], data)
  File "/usr/local/lib/python3.9/site-packages/voluptuous/schema_builder.py", line 594, in validate_dict
    return base_validate(path, iteritems(data), out)
  File "/usr/local/lib/python3.9/site-packages/voluptuous/schema_builder.py", line 432, in validate_mapping
    raise er.MultipleInvalid(errors)
voluptuous.error.MultipleInvalid: extra keys not allowed @ data['host']
justinmartin commented 2 years ago

I am getting the same error with Home Assistant and Shelly for HASS completely up to date.

seederp2p commented 2 years ago

Error setting up entry shellyem-109748 for shelly Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/config_entries.py", line 313, in async_setup result = await component.async_setup_entry(hass, self) # type: ignore File "/config/custom_components/shelly/init.py", line 98, in async_setup_entry conf = CONFIG_SCHEMA_ROOT(data) File "/usr/local/lib/python3.9/site-packages/voluptuous/schema_builder.py", line 272, in call return self._compiled([], data) File "/usr/local/lib/python3.9/site-packages/voluptuous/schema_builder.py", line 594, in validate_dict return base_validate(path, iteritems(data), out) File "/usr/local/lib/python3.9/site-packages/voluptuous/schema_builder.py", line 432, in validate_mapping raise er.MultipleInvalid(errors) voluptuous.error.MultipleInvalid: extra keys not allowed @ data['host']

I'm getting this error on 0.33

@hakana

Luckymoep commented 2 years ago

Hi, getting the same error on 2021.12.7

2022-01-04 23:06:54 INFO (MainThread) [custom_components.shelly] Starting shelly, 0.3.3 2022-01-04 23:06:54 ERROR (MainThread) [homeassistant.config_entries] Error setting up entry shelly_dimmer_schlafzimmer for shelly Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/config_entries.py", line 313, in async_setup result = await component.async_setup_entry(hass, self) # type: ignore File "/config/custom_components/shelly/init.py", line 98, in async_setup_entry conf = CONFIG_SCHEMA_ROOT(data) File "/usr/local/lib/python3.9/site-packages/voluptuous/schema_builder.py", line 272, in call return self._compiled([], data) File "/usr/local/lib/python3.9/site-packages/voluptuous/schema_builder.py", line 594, in validate_dict return base_validate(path, iteritems(data), out) File "/usr/local/lib/python3.9/site-packages/voluptuous/schema_builder.py", line 432, in validate_mapping raise er.MultipleInvalid(errors) voluptuous.error.MultipleInvalid: extra keys not allowed @ data['host']

Any updates on this?

Update: after downgrade to 2021.11.5 everything works like a charm...

scapman commented 2 years ago

I am getting the same error on 0.33 and HA 2021.12.9

File "/usr/src/homeassistant/homeassistant/config_entries.py", line 313, in async_setup result = await component.async_setup_entry(hass, self) # type: ignore File "/config/custom_components/shelly/init.py", line 98, in async_setup_entry conf = CONFIG_SCHEMA_ROOT(data) File "/usr/local/lib/python3.9/site-packages/voluptuous/schema_builder.py", line 272, in call return self._compiled([], data) File "/usr/local/lib/python3.9/site-packages/voluptuous/schema_builder.py", line 594, in validate_dict return base_validate(path, iteritems(data), out) File "/usr/local/lib/python3.9/site-packages/voluptuous/schema_builder.py", line 432, in validate_mapping raise er.MultipleInvalid(errors) voluptuous.error.MultipleInvalid: extra keys not allowed @ data['host']

grischard commented 2 years ago

@hakana you've marked this as fixed, but is it still on your radar? It looks like many people can still reproduce this in the latest versions. Let me know if you'd like me to do some debugging.

Joraeim commented 2 years ago

I'm getting this error with 0.3.5 and HA 2022.3.5

hakana commented 2 years ago

In some cases it look like HACS not upgrade ShellyForHass and it working after reinstall of ShellyForHass. Take a backup before will allow you to restore if you lost configuration.

Joraeim commented 2 years ago

Initially I tried just manually updating ShellyForHass, but it had the same issue. I ended up completely removing ShellyForHass and re-installing to get it working properly. I wasn't able to get the backup to work properly (probably because I was jumping from a release around mid-July). Thanks!