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
73.31k stars 30.62k forks source link

Shelly Plus battery operated devices fail after update to 2024.1.0 #106995

Closed GertJanArts closed 10 months ago

GertJanArts commented 10 months ago

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

Integration firmware

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?

Logger: homeassistant.config_entries
Source: config_entries.py:406
First occurred: 22:07:29 (4 occurrences)
Last logged: 22:08:19

Error setting up entry shellyplussmoke-80646fe479fc for shelly
Error setting up entry shellyplussmoke-d4d4da340b6c 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
2024-01-03 22:07:18.000 WARNING (SyncWorker_0) [homeassistant.loader] We found a custom integration afvalinfo which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant
2024-01-03 22:07:18.002 WARNING (SyncWorker_0) [homeassistant.loader] We found a custom integration iphonedetect which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant
2024-01-03 22:07:18.004 WARNING (SyncWorker_0) [homeassistant.loader] We found a custom integration hacs which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant
2024-01-03 22:07:18.005 WARNING (SyncWorker_0) [homeassistant.loader] We found a custom integration toon_climate which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant
2024-01-03 22:07:18.007 WARNING (SyncWorker_0) [homeassistant.loader] We found a custom integration buienradar_2h_forecast which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant
2024-01-03 22:07:28.428 WARNING (MainThread) [homeassistant.components.device_tracker.const] SOURCE_TYPE_ROUTER was used from iphonedetect, this is a deprecated constant which will be removed in HA Core 2025.1. Use SourceType.ROUTER instead, please create a bug report at https://github.com/mudape/iphonedetect/issues
2024-01-03 22:07:29.810 ERROR (MainThread) [homeassistant.config_entries] Error setting up entry shellyplussmoke-80646fe479fc 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
2024-01-03 22:07:29.819 ERROR (MainThread) [homeassistant.config_entries] Error setting up entry shellyplussmoke-d4d4da340b6c 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
2024-01-03 22:07:31.952 WARNING (MainThread) [homeassistant.components.systemmonitor.sensor] Cannot read CPU / processor temperature information
2024-01-03 22:07:36.064 WARNING (MainThread) [aioesphomeapi.reconnect_logic] Can't connect to ESPHome API for sonoff004 @ 192.168.1.74: Error connecting to [AddrInfo(family=<AddressFamily.AF_INET: 2>, type=<SocketKind.SOCK_STREAM: 1>, proto=6, sockaddr=IPv4Sockaddr(address='192.168.1.74', port=6053))]: [Errno 113] Connect call failed ('192.168.1.74', 6053) (SocketAPIError)
2024-01-03 22:07:36.126 WARNING (MainThread) [aioesphomeapi.reconnect_logic] Can't connect to ESPHome API for sonoff003 @ 192.168.1.73: Error connecting to [AddrInfo(family=<AddressFamily.AF_INET: 2>, type=<SocketKind.SOCK_STREAM: 1>, proto=6, sockaddr=IPv4Sockaddr(address='192.168.1.73', port=6053))]: [Errno 113] Connect call failed ('192.168.1.73', 6053) (SocketAPIError)
2024-01-03 22:07:36.127 WARNING (MainThread) [aioesphomeapi.reconnect_logic] Can't connect to ESPHome API for sonoff002 @ 192.168.1.72: Error connecting to [AddrInfo(family=<AddressFamily.AF_INET: 2>, type=<SocketKind.SOCK_STREAM: 1>, proto=6, sockaddr=IPv4Sockaddr(address='192.168.1.72', port=6053))]: [Errno 113] Connect call failed ('192.168.1.72', 6053) (SocketAPIError)
2024-01-03 22:07:47.455 ERROR (MainThread) [homeassistant] Error doing job: Exception in callback _async_at_core_state.<locals>._matched_event(<Event homeassistant_start[L]>) at /usr/src/homeassistant/homeassistant/helpers/start.py:37
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/sensor/__init__.py", line 649, in state
    numerical_value = float(value)  # type:ignore[arg-type]
                      ^^^^^^^^^^^^
ValueError: could not convert string to float: 'Moderate'

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/usr/local/lib/python3.11/asyncio/events.py", line 80, in _run
    self._context.run(self._callback, *self._args)
  File "/usr/src/homeassistant/homeassistant/core.py", line 1335, in _onetime_listener
    self._hass.async_run_job(listener, event)
  File "/usr/src/homeassistant/homeassistant/core.py", line 763, in async_run_job
    return self.async_run_hass_job(HassJob(target), *args)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/core.py", line 715, in async_run_hass_job
    hassjob.target(*args)
  File "/usr/src/homeassistant/homeassistant/helpers/start.py", line 40, in _matched_event
    hass.async_run_hass_job(at_start_job, hass)
  File "/usr/src/homeassistant/homeassistant/core.py", line 715, in async_run_hass_job
    hassjob.target(*args)
  File "/usr/src/homeassistant/homeassistant/components/template/template_entity.py", line 481, in _async_template_startup
    result_info.async_refresh()
  File "/usr/src/homeassistant/homeassistant/helpers/event.py", line 1035, in async_refresh
    self._refresh(None)
  File "/usr/src/homeassistant/homeassistant/helpers/event.py", line 1215, in _refresh
    self.hass.async_run_hass_job(self._job, event, updates)
  File "/usr/src/homeassistant/homeassistant/core.py", line 715, in async_run_hass_job
    hassjob.target(*args)
  File "/usr/src/homeassistant/homeassistant/components/template/template_entity.py", line 429, in _handle_results
    self.async_write_ha_state()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 941, in async_write_ha_state
    self._async_write_ha_state()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1062, in _async_write_ha_state
    state, attr, capabilities, shadowed_attr = self.__async_calculate_state()
                                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 999, in __async_calculate_state
    state = self._stringify_state(available)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 947, in _stringify_state
    if (state := self.state) is None:
                 ^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/sensor/__init__.py", line 651, in state
    raise ValueError(
ValueError: Sensor sensor.meteoalarm_severity has device class 'None', state class 'None' unit 'severity' and suggested precision 'None' thus indicating it has a numeric value; however, it has the non-numeric value: 'Moderate' (<class 'str'>)
2024-01-03 22:07:47.482 ERROR (MainThread) [homeassistant.helpers.event] Error while processing template: Template<template=({{ states('sensor.daily_solar') | float | round(1) }}) renders=2>
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/template.py", line 1984, in forgiving_float_filter
    return float(value)
           ^^^^^^^^^^^^
ValueError: could not convert string to float: 'unknown'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/template.py", line 567, in async_render
    render_result = _render_with_context(self.template, compiled, **kwargs)
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/template.py", line 2305, in _render_with_context
    return template.render(**kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/jinja2/environment.py", line 1301, in render
    self.environment.handle_exception()
  File "/usr/local/lib/python3.11/site-packages/jinja2/environment.py", line 936, in handle_exception
    raise rewrite_traceback_stack(source=source)
  File "<template>", line 1, in top-level template code
  File "/usr/src/homeassistant/homeassistant/helpers/template.py", line 1987, in forgiving_float_filter
    raise_no_default("float", value)
  File "/usr/src/homeassistant/homeassistant/helpers/template.py", line 1625, in raise_no_default
    raise ValueError(
ValueError: Template error: float got invalid input 'unknown' when rendering template '{{ states('sensor.daily_solar') | float | round(1) }}' but no default was specified

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/template.py", line 693, in async_render_to_info
    render_info._result = self.async_render(
                          ^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/template.py", line 569, in async_render
    raise TemplateError(err) from err
homeassistant.exceptions.TemplateError: ValueError: Template error: float got invalid input 'unknown' when rendering template '{{ states('sensor.daily_solar') | float | round(1) }}' but no default was specified
2024-01-03 22:07:47.493 ERROR (MainThread) [homeassistant.components.template.template_entity] TemplateError('ValueError: Template error: float got invalid input 'unknown' when rendering template '{{ states('sensor.daily_solar') | float | round(1) }}' but no default was specified') while processing template 'Template<template=({{ states('sensor.daily_solar') | float | round(1) }}) renders=4>' for attribute '_attr_native_value' in entity 'sensor.dagelijks_opbrengst_zonnepanelen'
2024-01-03 22:08:12.148 ERROR (MainThread) [homeassistant.config_entries] Error setting up entry shellyplussmoke-80646fe479fc 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
2024-01-03 22:08:19.765 ERROR (MainThread) [homeassistant.config_entries] Error setting up entry shellyplussmoke-d4d4da340b6c 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
2024-01-03 22:10:10.352 WARNING (Recorder) [homeassistant.components.sensor.recorder] The unit of sensor.openweathermap_rain (mm/h) cannot be converted to the unit of previously compiled statistics (mm). Generation of long term statistics will be suppressed unless the unit changes back to mm or a compatible unit. Go to https://my.home-assistant.io/redirect/developer_statistics to fix this
2024-01-03 22:10:10.353 WARNING (Recorder) [homeassistant.components.sensor.recorder] The unit of sensor.openweathermap_snow (mm/h) cannot be converted to the unit of previously compiled statistics (mm). Generation of long term statistics will be suppressed unless the unit changes back to mm or a compatible unit. Go to https://my.home-assistant.io/redirect/developer_statistics to fix this
2024-01-03 22:25:28.996 DEBUG (MainThread) [aioshelly.block_device.coap] CoapMessage: ip=192.168.1.86, type=CoapType.PERIODIC(30), options={11: b's', 3332: b'SHPLG-S#80D87D#2', 3412: b'\x96\x00', 3420: b'\xf6\x00'}, payload={'G': [[0, 9103, 0], [0, 1101, 0], [0, 4101, 0.0], [0, 4103, 3693], [0, 6102, 0], [0, 6109, 0.0], [0, 3104, 22.12], [0, 3105, 71.82], [0, 6101, 0]]}
2024-01-03 22:25:28.996 DEBUG (MainThread) [aioshelly.block_device.coap] Calling CoAP message update for device id 80D87D
2024-01-03 22:25:28.996 DEBUG (MainThread) [homeassistant.components.shelly] Push update failures for shellyplug-s-80D87D: 0
2024-01-03 22:25:28.996 DEBUG (MainThread) [homeassistant.components.shelly] Manually updated shellyplug-s-80D87D data
2024-01-03 22:25:28.996 DEBUG (MainThread) [homeassistant.components.shelly] Skipping non-input event block relay_0
2024-01-03 22:25:28.996 DEBUG (MainThread) [homeassistant.components.shelly] Skipping non-input event block device
2024-01-03 22:25:30.746 DEBUG (MainThread) [aioshelly.block_device.coap] CoapMessage: ip=192.168.1.31, type=CoapType.PERIODIC(30), options={11: b's', 3332: b'SHEM-3#34945475EB96#2', 3412: b'\x96\x00', 3420: b'\x1a\x85'}, payload={'G': [[0, 9103, 0], [0, 1101, 0], [0, 4105, 0.0], [0, 4106, 1404120.9], [0, 4107, 2697.5], [0, 4108, 229.67], [0, 4109, 0.08], [0, 4110, -0.02], [0, 4205, 0.0], [0, 4206, 1396162.4], [0, 4207, 3520.2], [0, 4208, 230.66], [0, 4209, 0.08], [0, 4210, -0.06], [0, 4305, 0.0], [0, 4306, 1399600.8], [0, 4307, 937.4], [0, 4308, 230.06], [0, 4309, 0.08], [0, 4310, -0.01], [0, 6102, 0]]}
2024-01-03 22:25:30.746 DEBUG (MainThread) [aioshelly.block_device.coap] Calling CoAP message update for device id 75EB96
2024-01-03 22:25:30.746 DEBUG (MainThread) [homeassistant.components.shelly] Push update failures for shellyem3-34945475EB96: 0
2024-01-03 22:25:30.746 DEBUG (MainThread) [homeassistant.components.shelly] Manually updated shellyem3-34945475EB96 data
2024-01-03 22:25:30.746 DEBUG (MainThread) [homeassistant.components.shelly] Skipping non-input event block relay_0
2024-01-03 22:25:30.746 DEBUG (MainThread) [homeassistant.components.shelly] Skipping non-input event block emeter_0
2024-01-03 22:25:30.746 DEBUG (MainThread) [homeassistant.components.shelly] Skipping non-input event block emeter_1
2024-01-03 22:25:30.746 DEBUG (MainThread) [homeassistant.components.shelly] Skipping non-input event block emeter_2
2024-01-03 22:25:30.746 DEBUG (MainThread) [homeassistant.components.shelly] Skipping non-input event block device
2024-01-03 22:25:32.629 DEBUG (MainThread) [homeassistant.components.shelly] REST update for shellybulb-791685
2024-01-03 22:25:32.630 DEBUG (MainThread) [aioshelly.block_device.device] aiohttp request: /status (params=None)
2024-01-03 22:25:32.690 DEBUG (MainThread) [aioshelly.block_device.device] aiohttp response: {'wifi_sta': {'connected': True, 'ssid': 'Rozenhof20_User', 'ip': '192.168.1.83', 'rssi': -50}, 'cloud': {'enabled': False, 'connected': False}, 'mqtt': {'connected': False}, 'time': '22:25', 'unixtime': 1704317132, 'serial': 146, 'has_update': True, 'mac': '600194791685', 'cfg_changed_cnt': 0, 'actions_stats': {'skipped': 0}, 'lights': [{'ison': True, 'source': 'http', 'has_timer': False, 'timer_started': 0, 'timer_duration': 0, 'timer_remaining': 0, 'mode': 'color', 'red': 255, 'green': 80, 'blue': 0, 'white': 0, 'gain': 100, 'temp': 3003, 'brightness': 100, 'effect': 0}], 'meters': [{'power': 0.0, 'is_valid': True}], 'update': {'status': 'pending', 'has_update': True, 'new_version': '20230913-111639/v1.14.0-gcb84623', 'old_version': '20231107-162518/v1.14.1-rc1-g0617c15', 'beta_version': '20231107-162518/v1.14.1-rc1-g0617c15'}, 'ram_total': 52360, 'ram_free': 40832, 'fs_size': 233681, 'fs_free': 162397, 'uptime': 287990}
2024-01-03 22:25:32.690 DEBUG (MainThread) [homeassistant.components.shelly] Finished fetching shellybulb-791685 data in 0.061 seconds (success: True)
2024-01-03 22:25:34.447 DEBUG (MainThread) [aioshelly.block_device.coap] CoapMessage: ip=192.168.1.83, type=CoapType.PERIODIC(30), options={11: b's', 3332: b'SHBLB-1#791685#2', 3412: b'\x96\x00', 3420: b'\x92\x00'}, payload={'G': [[0, 9103, 0], [0, 1101, 1], [0, 5105, 255], [0, 5106, 80], [0, 5107, 0], [0, 5108, 0], [0, 5102, 100], [0, 5101, 100], [0, 5103, 3003], [0, 9101, 'color'], [0, 5109, 0]]}
2024-01-03 22:25:34.447 DEBUG (MainThread) [aioshelly.block_device.coap] Calling CoAP message update for device id 791685
2024-01-03 22:25:34.447 DEBUG (MainThread) [homeassistant.components.shelly] Push update failures for shellybulb-791685: 0
2024-01-03 22:25:34.448 DEBUG (MainThread) [homeassistant.components.shelly] Manually updated shellybulb-791685 data
2024-01-03 22:25:34.448 DEBUG (MainThread) [homeassistant.components.shelly] Skipping non-input event block light_0
2024-01-03 22:25:34.448 DEBUG (MainThread) [homeassistant.components.shelly] Skipping non-input event block device
2024-01-03 22:25:39.347 DEBUG (MainThread) [aioshelly.block_device.coap] CoapMessage: ip=192.168.1.81, type=CoapType.PERIODIC(30), options={11: b's', 3332: b'SHMOS-02#8CF681E12080#2', 3412: b'\x1c!', 3420: b'\x00\xa7'}, payload={'G': [[0, 3101, 18.2], [0, 3102, 64.7], [0, 6107, 0], [0, 3119, 1704316840], [0, 3120, 1], [0, 6110, 0], [0, 3106, 9], [0, 3111, 99], [0, 9103, 1]]}
2024-01-03 22:25:39.348 DEBUG (MainThread) [aioshelly.block_device.coap] Calling CoAP message update for device id E12080
2024-01-03 22:25:39.348 DEBUG (MainThread) [homeassistant.components.shelly] Push update failures for shellymotion2-8CF681E12080: 0
2024-01-03 22:25:39.348 DEBUG (MainThread) [homeassistant.components.shelly] Manually updated shellymotion2-8CF681E12080 data
2024-01-03 22:25:39.348 DEBUG (MainThread) [homeassistant.components.shelly] Skipping non-input event block sensor_0
2024-01-03 22:25:39.348 DEBUG (MainThread) [homeassistant.components.shelly] Skipping non-input event block device
2024-01-03 22:25:39.889 DEBUG (MainThread) [aioshelly.block_device.coap] CoapMessage: ip=192.168.1.84, type=CoapType.PERIODIC(30), options={11: b's', 3332: b'SHRGBW2#6CE7E4#2', 3412: b'\x96\x00', 3420: b'\xf4\x04'}, payload={'G': [[0, 9103, 0], [0, 1101, 1], [0, 5105, 255], [0, 5106, 79], [0, 5107, 0], [0, 5108, 0], [0, 5102, 14], [0, 5109, 0], [0, 4101, 3.11], [0, 4103, 29822], [0, 6102, 0], [0, 2101, 0], [0, 2102, ''], [0, 2103, 0], [0, 9101, 'color']]}
2024-01-03 22:25:39.889 DEBUG (MainThread) [aioshelly.block_device.coap] Calling CoAP message update for device id 6CE7E4
2024-01-03 22:25:39.889 DEBUG (MainThread) [homeassistant.components.shelly] Push update failures for shellyrgbw2-6CE7E4: 0
2024-01-03 22:25:39.889 DEBUG (MainThread) [homeassistant.components.shelly] Manually updated shellyrgbw2-6CE7E4 data
2024-01-03 22:25:39.890 DEBUG (MainThread) [homeassistant.components.shelly] Skipping non-input event block light_0
2024-01-03 22:25:39.890 DEBUG (MainThread) [homeassistant.components.shelly] Skipping block event 
2024-01-03 22:25:43.996 DEBUG (MainThread) [aioshelly.block_device.coap] CoapMessage: ip=192.168.1.86, type=CoapType.PERIODIC(30), options={11: b's', 3332: b'SHPLG-S#80D87D#2', 3412: b'\x96\x00', 3420: b'\xf6\x00'}, payload={'G': [[0, 9103, 0], [0, 1101, 0], [0, 4101, 0.0], [0, 4103, 3693], [0, 6102, 0], [0, 6109, 0.0], [0, 3104, 22.2], [0, 3105, 71.96], [0, 6101, 0]]}
2024-01-03 22:25:43.996 DEBUG (MainThread) [aioshelly.block_device.coap] Calling CoAP message update for device id 80D87D
2024-01-03 22:25:43.996 DEBUG (MainThread) [homeassistant.components.shelly] Push update failures for shellyplug-s-80D87D: 0
2024-01-03 22:25:43.996 DEBUG (MainThread) [homeassistant.components.shelly] Manually updated shellyplug-s-80D87D data
2024-01-03 22:25:43.997 DEBUG (MainThread) [homeassistant.components.shelly] Skipping non-input event block relay_0
2024-01-03 22:25:43.997 DEBUG (MainThread) [homeassistant.components.shelly] Skipping non-input event block device
2024-01-03 22:25:45.746 DEBUG (MainThread) [aioshelly.block_device.coap] CoapMessage: ip=192.168.1.31, type=CoapType.PERIODIC(30), options={11: b's', 3332: b'SHEM-3#34945475EB96#2', 3412: b'\x96\x00', 3420: b'\x1a\x85'}, payload={'G': [[0, 9103, 0], [0, 1101, 0], [0, 4105, 0.0], [0, 4106, 1404120.9], [0, 4107, 2697.5], [0, 4108, 229.76], [0, 4109, 0.08], [0, 4110, -0.02], [0, 4205, 0.0], [0, 4206, 1396162.4], [0, 4207, 3520.2], [0, 4208, 230.77], [0, 4209, 0.08], [0, 4210, -0.06], [0, 4305, 0.0], [0, 4306, 1399600.8], [0, 4307, 937.4], [0, 4308, 229.99], [0, 4309, 0.08], [0, 4310, -0.01], [0, 6102, 0]]}
2024-01-03 22:25:45.746 DEBUG (MainThread) [aioshelly.block_device.coap] Calling CoAP message update for device id 75EB96
2024-01-03 22:25:45.747 DEBUG (MainThread) [homeassistant.components.shelly] Push update failures for shellyem3-34945475EB96: 0
2024-01-03 22:25:45.747 DEBUG (MainThread) [homeassistant.components.shelly] Manually updated shellyem3-34945475EB96 data
2024-01-03 22:25:45.747 DEBUG (MainThread) [homeassistant.components.shelly] Skipping non-input event block relay_0
2024-01-03 22:25:45.747 DEBUG (MainThread) [homeassistant.components.shelly] Skipping non-input event block emeter_0
2024-01-03 22:25:45.747 DEBUG (MainThread) [homeassistant.components.shelly] Skipping non-input event block emeter_1
2024-01-03 22:25:45.747 DEBUG (MainThread) [homeassistant.components.shelly] Skipping non-input event block emeter_2
2024-01-03 22:25:45.747 DEBUG (MainThread) [homeassistant.components.shelly] Skipping non-input event block device
2024-01-03 22:25:47.242 DEBUG (MainThread) [aioshelly.rpc_device.wsrpc] Adding device 80646FE479FC to WsServer message subscriptions
2024-01-03 22:25:47.242 DEBUG (MainThread) [homeassistant.components.shelly] Setting up offline block device shellyplussmoke-80646fe479fc
2024-01-03 22:25:47.242 ERROR (MainThread) [homeassistant.config_entries] Error setting up entry shellyplussmoke-80646fe479fc 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
2024-01-03 22:25:48.061 DEBUG (MainThread) [aioshelly.block_device.coap] Adding device C14C1C to CoAP message subscriptions
2024-01-03 22:25:48.061 DEBUG (MainThread) [aioshelly.block_device.coap] Sending request 'cit/s' to device 192.168.1.89
2024-01-03 22:25:48.063 DEBUG (MainThread) [homeassistant.components.shelly] Setting up online block device shellyplug-s-C14C1C
2024-01-03 22:25:49.606 DEBUG (MainThread) [aioshelly.block_device.coap] CoapMessage: ip=192.168.1.83, type=CoapType.PERIODIC(30), options={11: b's', 3332: b'SHBLB-1#791685#2', 3412: b'\x96\x00', 3420: b'\x92\x00'}, payload={'G': [[0, 9103, 0], [0, 1101, 1], [0, 5105, 255], [0, 5106, 80], [0, 5107, 0], [0, 5108, 0], [0, 5102, 100], [0, 5101, 100], [0, 5103, 3003], [0, 9101, 'color'], [0, 5109, 0]]}
2024-01-03 22:25:49.606 DEBUG (MainThread) [aioshelly.block_device.coap] Calling CoAP message update for device id 791685
2024-01-03 22:25:49.606 DEBUG (MainThread) [homeassistant.components.shelly] Push update failures for shellybulb-791685: 0
2024-01-03 22:25:49.606 DEBUG (MainThread) [homeassistant.components.shelly] Manually updated shellybulb-791685 data
2024-01-03 22:25:49.606 DEBUG (MainThread) [homeassistant.components.shelly] Skipping non-input event block light_0
2024-01-03 22:25:49.606 DEBUG (MainThread) [homeassistant.components.shelly] Skipping non-input event block device
2024-01-03 22:25:51.166 DEBUG (MainThread) [aioshelly.common] host 192.168.1.89: error: DeviceConnectionError(ClientConnectorError(ConnectionKey(host='192.168.1.89', port=80, is_ssl=False, ssl=None, proxy=None, proxy_auth=None, proxy_headers_hash=-2866129450202161871), OSError(113, "Connect call failed ('192.168.1.89', 80)")))
2024-01-03 22:25:51.166 DEBUG (MainThread) [aioshelly.block_device.device] host 192.168.1.89: error: DeviceConnectionError(DeviceConnectionError(ClientConnectorError(ConnectionKey(host='192.168.1.89', port=80, is_ssl=False, ssl=None, proxy=None, proxy_auth=None, proxy_headers_hash=-2866129450202161871), OSError(113, "Connect call failed ('192.168.1.89', 80)"))))
2024-01-03 22:25:54.554 DEBUG (MainThread) [aioshelly.rpc_device.wsrpc] Adding device D4D4DA340B6C to WsServer message subscriptions
2024-01-03 22:25:54.554 DEBUG (MainThread) [homeassistant.components.shelly] Setting up offline block device shellyplussmoke-d4d4da340b6c
2024-01-03 22:25:54.554 ERROR (MainThread) [homeassistant.config_entries] Error setting up entry shellyplussmoke-d4d4da340b6c 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
2024-01-03 22:25:54.893 DEBUG (MainThread) [aioshelly.block_device.coap] CoapMessage: ip=192.168.1.84, type=CoapType.PERIODIC(30), options={11: b's', 3332: b'SHRGBW2#6CE7E4#2', 3412: b'\x96\x00', 3420: b'\xf4\x04'}, payload={'G': [[0, 9103, 0], [0, 1101, 1], [0, 5105, 255], [0, 5106, 79], [0, 5107, 0], [0, 5108, 0], [0, 5102, 14], [0, 5109, 0], [0, 4101, 5.51], [0, 4103, 29822], [0, 6102, 0], [0, 2101, 0], [0, 2102, ''], [0, 2103, 0], [0, 9101, 'color']]}
2024-01-03 22:25:54.893 DEBUG (MainThread) [aioshelly.block_device.coap] Calling CoAP message update for device id 6CE7E4
2024-01-03 22:25:54.893 DEBUG (MainThread) [homeassistant.components.shelly] Push update failures for shellyrgbw2-6CE7E4: 0
2024-01-03 22:25:54.893 DEBUG (MainThread) [homeassistant.components.shelly] Manually updated shellyrgbw2-6CE7E4 data
2024-01-03 22:25:54.893 DEBUG (MainThread) [homeassistant.components.shelly] Skipping non-input event block light_0
2024-01-03 22:25:54.893 DEBUG (MainThread) [homeassistant.components.shelly] Skipping block event 
2024-01-03 22:25:58.997 DEBUG (MainThread) [aioshelly.block_device.coap] CoapMessage: ip=192.168.1.86, type=CoapType.PERIODIC(30), options={11: b's', 3332: b'SHPLG-S#80D87D#2', 3412: b'\x96\x00', 3420: b'\xf6\x00'}, payload={'G': [[0, 9103, 0], [0, 1101, 0], [0, 4101, 0.0], [0, 4103, 3693], [0, 6102, 0], [0, 6109, 0.0], [0, 3104, 22.16], [0, 3105, 71.89], [0, 6101, 0]]}
2024-01-03 22:25:58.997 DEBUG (MainThread) [aioshelly.block_device.coap] Calling CoAP message update for device id 80D87D
2024-01-03 22:25:58.997 DEBUG (MainThread) [homeassistant.components.shelly] Push update failures for shellyplug-s-80D87D: 0
2024-01-03 22:25:58.997 DEBUG (MainThread) [homeassistant.components.shelly] Manually updated shellyplug-s-80D87D data
2024-01-03 22:25:58.997 DEBUG (MainThread) [homeassistant.components.shelly] Skipping non-input event block relay_0
2024-01-03 22:25:58.997 DEBUG (MainThread) [homeassistant.components.shelly] Skipping non-input event block device
2024-01-03 22:26:00.462 DEBUG (MainThread) [aioshelly.block_device.coap] CoapMessage: ip=192.168.1.31, type=CoapType.PERIODIC(30), options={11: b's', 3332: b'SHEM-3#34945475EB96#2', 3412: b'\x96\x00', 3420: b'\x1b\x85'}, payload={'G': [[0, 9103, 0], [0, 1101, 0], [0, 4105, 0.0], [0, 4106, 1404120.9], [0, 4107, 2697.5], [0, 4108, 229.99], [0, 4109, 0.08], [0, 4110, -0.03], [0, 4205, 0.0], [0, 4206, 1396162.4], [0, 4207, 3520.2], [0, 4208, 230.76], [0, 4209, 0.08], [0, 4210, -0.06], [0, 4305, 0.0], [0, 4306, 1399600.8], [0, 4307, 937.4], [0, 4308, 230.0], [0, 4309, 0.08], [0, 4310, -0.01], [0, 6102, 0]]}
2024-01-03 22:26:00.463 DEBUG (MainThread) [aioshelly.block_device.coap] Calling CoAP message update for device id 75EB96
2024-01-03 22:26:00.463 DEBUG (MainThread) [homeassistant.components.shelly] Push update failures for shellyem3-34945475EB96: 0
2024-01-03 22:26:00.463 DEBUG (MainThread) [homeassistant.components.shelly] Manually updated shellyem3-34945475EB96 data
2024-01-03 22:26:00.463 DEBUG (MainThread) [homeassistant.components.shelly] Skipping non-input event block relay_0
2024-01-03 22:26:00.463 DEBUG (MainThread) [homeassistant.components.shelly] Skipping non-input event block emeter_0
2024-01-03 22:26:00.463 DEBUG (MainThread) [homeassistant.components.shelly] Skipping non-input event block emeter_1
2024-01-03 22:26:00.463 DEBUG (MainThread) [homeassistant.components.shelly] Skipping non-input event block emeter_2
2024-01-03 22:26:00.463 DEBUG (MainThread) [homeassistant.components.shelly] Skipping non-input event block device
2024-01-03 22:26:04.819 DEBUG (MainThread) [aioshelly.block_device.coap] CoapMessage: ip=192.168.1.83, type=CoapType.PERIODIC(30), options={11: b's', 3332: b'SHBLB-1#791685#2', 3412: b'\x96\x00', 3420: b'\x92\x00'}, payload={'G': [[0, 9103, 0], [0, 1101, 1], [0, 5105, 255], [0, 5106, 80], [0, 5107, 0], [0, 5108, 0], [0, 5102, 100], [0, 5101, 100], [0, 5103, 3003], [0, 9101, 'color'], [0, 5109, 0]]}
2024-01-03 22:26:04.819 DEBUG (MainThread) [aioshelly.block_device.coap] Calling CoAP message update for device id 791685
2024-01-03 22:26:04.819 DEBUG (MainThread) [homeassistant.components.shelly] Push update failures for shellybulb-791685: 0
2024-01-03 22:26:04.819 DEBUG (MainThread) [homeassistant.components.shelly] Manually updated shellybulb-791685 data
2024-01-03 22:26:04.819 DEBUG (MainThread) [homeassistant.components.shelly] Skipping non-input event block light_0
2024-01-03 22:26:04.819 DEBUG (MainThread) [homeassistant.components.shelly] Skipping non-input event block device
2024-01-03 22:26:09.891 DEBUG (MainThread) [aioshelly.block_device.coap] CoapMessage: ip=192.168.1.84, type=CoapType.PERIODIC(30), options={11: b's', 3332: b'SHRGBW2#6CE7E4#2', 3412: b'\x96\x00', 3420: b'\xf4\x04'}, payload={'G': [[0, 9103, 0], [0, 1101, 1], [0, 5105, 255], [0, 5106, 79], [0, 5107, 0], [0, 5108, 0], [0, 5102, 14], [0, 5109, 0], [0, 4101, 5.99], [0, 4103, 29827], [0, 6102, 0], [0, 2101, 0], [0, 2102, ''], [0, 2103, 0], [0, 9101, 'color']]}
2024-01-03 22:26:09.891 DEBUG (MainThread) [aioshelly.block_device.coap] Calling CoAP message update for device id 6CE7E4
2024-01-03 22:26:09.891 DEBUG (MainThread) [homeassistant.components.shelly] Push update failures for shellyrgbw2-6CE7E4: 0
2024-01-03 22:26:09.891 DEBUG (MainThread) [homeassistant.components.shelly] Manually updated shellyrgbw2-6CE7E4 data
2024-01-03 22:26:09.892 DEBUG (MainThread) [homeassistant.components.shelly] Skipping non-input event block light_0
2024-01-03 22:26:09.893 DEBUG (MainThread) [homeassistant.components.shelly] Skipping block event 
2024-01-03 22:26:13.995 DEBUG (MainThread) [aioshelly.block_device.coap] CoapMessage: ip=192.168.1.86, type=CoapType.PERIODIC(30), options={11: b's', 3332: b'SHPLG-S#80D87D#2', 3412: b'\x96\x00', 3420: b'\xf6\x00'}, payload={'G': [[0, 9103, 0], [0, 1101, 0], [0, 4101, 0.0], [0, 4103, 3693], [0, 6102, 0], [0, 6109, 0.0], [0, 3104, 22.2], [0, 3105, 71.96], [0, 6101, 0]]}
2024-01-03 22:26:13.996 DEBUG (MainThread) [aioshelly.block_device.coap] Calling CoAP message update for device id 80D87D
2024-01-03 22:26:13.996 DEBUG (MainThread) [homeassistant.components.shelly] Push update failures for shellyplug-s-80D87D: 0
2024-01-03 22:26:13.996 DEBUG (MainThread) [homeassistant.components.shelly] Manually updated shellyplug-s-80D87D data
2024-01-03 22:26:13.996 DEBUG (MainThread) [homeassistant.components.shelly] Skipping non-input event block relay_0
2024-01-03 22:26:13.996 DEBUG (MainThread) [homeassistant.components.shelly] Skipping non-input event block device

Additional information

tried to wake up the devices. no problem with the webinterface. Connection to HA via Outbound websocket connection

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

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)

TechSaiyajin commented 10 months ago

Have the same problem since 2024.1

bosco688 commented 10 months ago

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
thecode commented 10 months ago

Thanks for reporting, no need for further information for, the log shows the error

n3tkiller commented 10 months ago

@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:

bobvandevijver commented 10 months ago

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"])
NickiNiclas commented 10 months ago

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.

bobvandevijver commented 10 months ago

@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).

DERFLOWIII commented 10 months ago

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?

bieniu commented 10 months ago

Any other solution possible ? Or is it better to downgrade HA to 2023 version?

Fix will be available in HA 2024.1.1.

MrReSc commented 10 months ago

@bieniu When will the version be released?

bieniu commented 10 months ago

When will the version be released?

https://github.com/home-assistant/core/milestone/640

snigehere commented 10 months ago

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.

rimosky commented 10 months ago

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

thecode commented 10 months ago

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.

snigehere commented 10 months ago

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)