Shelly device won't initialize after removed and setup again
The problem
Moved my Shelly Dimmer to a new WiFi network. Reset the Shelly device, so I deleted the device from Home assistant.
When I go to re-add it after it's auto discovered, it cycles between initializing and failed with the following error:
Failed setup, will retry: DeviceConnectionTimeoutError(TimeoutError())
Device is accessible directly via the web frontend with no issue.
What version of Home Assistant Core has the issue?
core-2024.10.2
What was the last working version of Home Assistant Core?
core-2024.10.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
config_entry-shelly-01J9T993S9M8JT8AWAVMJRDZN0.json
Example YAML snippet
No response
Anything in the logs that might be useful for us?
Device having issues is Bathroom Light 192.168.0.77 F4CFA2ECB290
2024-10-11 18:48:31.506 DEBUG (MainThread) [aioshelly.block_device.coap] CoapMessage: ip=192.168.0.77, type=CoapType.PERIODIC(30), options={11: b's', 3332: b'SHDM-2#F4CFA2ECB290#2', 3412: b'\x96\x00', 3420: b'3\x00'}, payload={'G': [[0, 9103, 1], [0, 1101, 0], [0, 5101, 100], [0, 2101, 0], [0, 2102, ''], [0, 2103, 0], [0, 2201, 0], [0, 2202, ''], [0, 2203, 0], [0, 4101, 0.0], [0, 4103, 0], [0, 6102, 0], [0, 6109, 0.0], [0, 6104, 0], [0, 3104, 30.53], [0, 3105, 86.95], [0, 6101, 0], [0, 9101, 'white']]}
2024-10-11 18:48:31.526 DEBUG (MainThread) [aioshelly.block_device.coap] CoapMessage: ip=192.168.0.77, type=CoapType.PERIODIC(30), options={11: b's', 3332: b'SHDM-2#F4CFA2ECB290#2', 3412: b'\x96\x00', 3420: b'4\x00'}, payload={'G': [[0, 9103, 1], [0, 1101, 0], [0, 5101, 100], [0, 2101, 0], [0, 2102, ''], [0, 2103, 0], [0, 2201, 0], [0, 2202, ''], [0, 2203, 0], [0, 4101, 0.0], [0, 4103, 0], [0, 6102, 0], [0, 6109, 0.0], [0, 6104, 0], [0, 3104, 30.53], [0, 3105, 86.95], [0, 6101, 0], [0, 9101, 'white']]}
2024-10-11 18:48:32.804 DEBUG (MainThread) [aioshelly.block_device.coap] CoapMessage: ip=192.168.0.11, type=CoapType.PERIODIC(30), options={11: b's', 3332: b'SHSW-1#E8DB84D65243#2', 3412: b'\x96\x00', 3420: b'\x03\x00'}, payload={'G': [[0, 9103, 0], [0, 1101, 0], [0, 2101, 0], [0, 2102, ''], [0, 2103, 0]]}
2024-10-11 18:48:32.804 DEBUG (MainThread) [aioshelly.block_device.coap] Calling CoAP message update for device id D65243
2024-10-11 18:48:32.804 DEBUG (MainThread) [homeassistant.components.shelly] Shelly Bathroom Vent handle update, type: BlockUpdateType.COAP_PERIODIC
2024-10-11 18:48:32.804 DEBUG (MainThread) [homeassistant.components.shelly] Manually updated Bathroom Vent data
2024-10-11 18:48:32.804 DEBUG (MainThread) [homeassistant.components.shelly] Skipping block event
2024-10-11 18:48:32.804 DEBUG (MainThread) [homeassistant.components.shelly] Skipping non-input event block sensor_0
2024-10-11 18:48:32.805 DEBUG (MainThread) [homeassistant.components.shelly] Skipping non-input event block sensor_1
2024-10-11 18:48:32.805 DEBUG (MainThread) [homeassistant.components.shelly] Skipping non-input event block sensor_2
2024-10-11 18:48:32.805 DEBUG (MainThread) [homeassistant.components.shelly] Skipping non-input event block device
2024-10-11 18:48:36.624 DEBUG (MainThread) [aioshelly.block_device.coap] Sending request 'cit/s' to device 192.168.0.77
2024-10-11 18:48:36.625 DEBUG (MainThread) [aioshelly.block_device.device] host 192.168.0.77: block device create, MAC: F4CFA2ECB290
2024-10-11 18:48:36.625 DEBUG (MainThread) [aioshelly.block_device.coap] Adding device ECB290 to CoAP message subscriptions
2024-10-11 18:48:36.625 DEBUG (MainThread) [homeassistant.components.shelly] Setting up online block device Bathroom Light
2024-10-11 18:48:36.625 DEBUG (MainThread) [aioshelly.block_device.device] host 192.168.0.77: block device initialize
2024-10-11 18:48:36.635 DEBUG (MainThread) [aioshelly.block_device.coap] CoapMessage: ip=192.168.0.77, type=CoapType.REPLY(69), options={11: b's', 3332: b'SHDM-2#F4CFA2ECB290#2', 3412: b'\x96\x00', 3420: b'4\x00'}, payload={'G': [[0, 9103, 1], [0, 1101, 0], [0, 5101, 100], [0, 2101, 0], [0, 2102, ''], [0, 2103, 0], [0, 2201, 0], [0, 2202, ''], [0, 2203, 0], [0, 4101, 0.0], [0, 4103, 0], [0, 6102, 0], [0, 6109, 0.0], [0, 6104, 0], [0, 3104, 30.53], [0, 3105, 86.95], [0, 6101, 0], [0, 9101, 'white']]}
2024-10-11 18:48:36.635 DEBUG (MainThread) [aioshelly.block_device.coap] Calling CoAP message update for device id ECB290
2024-10-11 18:48:36.648 DEBUG (MainThread) [aioshelly.block_device.device] host 192.168.0.77: http request: /settings (params=None)
2024-10-11 18:48:37.034 DEBUG (MainThread) [aioshelly.block_device.coap] CoapMessage: ip=192.168.0.15, type=CoapType.PERIODIC(30), options={11: b's', 3332: b'SHIX3-1#E8DB84D672B7#2', 3412: b'\x96\x00', 3420: b'\x03\x00'}, payload={'G': [[0, 9103, 0], [0, 2101, 0], [0, 2102, ''], [0, 2103, 0], [0, 2201, 0], [0, 2202, ''], [0, 2203, 0], [0, 2301, 0], [0, 2302, ''], [0, 2303, 0]]}
2024-10-11 18:48:37.035 DEBUG (MainThread) [aioshelly.block_device.coap] Calling CoAP message update for device id D672B7
2024-10-11 18:48:37.035 DEBUG (MainThread) [homeassistant.components.shelly] Shelly Bedroom Switch handle update, type: BlockUpdateType.COAP_PERIODIC
2024-10-11 18:48:37.035 DEBUG (MainThread) [homeassistant.components.shelly] Manually updated Bedroom Switch data
2024-10-11 18:48:37.035 DEBUG (MainThread) [homeassistant.components.shelly] Skipping block event
2024-10-11 18:48:37.035 DEBUG (MainThread) [homeassistant.components.shelly] Skipping block event
2024-10-11 18:48:37.035 DEBUG (MainThread) [homeassistant.components.shelly] Skipping block event
2024-10-11 18:48:37.036 DEBUG (MainThread) [homeassistant.components.shelly] Skipping non-input event block device
2024-10-11 18:48:40.750 DEBUG (MainThread) [aioshelly.block_device.device] aiohttp response: {'device': {'type': 'SHDM-2', 'mac': 'F4CFA2ECB290', 'hostname': 'shellydimmer2-F4CFA2ECB290', 'num_inputs': 2, 'num_outputs': 1, 'num_meters': 1}, 'wifi_ap': {'enabled': False, 'ssid': 'shellydimmer2-F4CFA2ECB290', 'key': ''}, 'wifi_sta': {'enabled': True, 'ssid': 'Roys-2.4G', 'ipv4_method': 'dhcp', 'ip': None, 'gw': None, 'mask': None, 'dns': None}, 'wifi_sta1': {'enabled': False, 'ssid': None, 'ipv4_method': 'dhcp', 'ip': None, 'gw': None, 'mask': None, 'dns': None}, 'ap_roaming': {'enabled': False, 'threshold': -70}, 'mqtt': {'enable': False, 'server': '192.168.33.3:1883', 'user': '', 'id': 'shellydimmer2-F4CFA2ECB290', 'reconnect_timeout_max': 60.0, 'reconnect_timeout_min': 2.0, 'clean_session': True, 'keep_alive': 60, 'max_qos': 0, 'retain': False, 'update_period': 30}, 'coiot': {'enabled': True, 'update_period': 15, 'peer': '192.168.0.5:5683'}, 'sntp': {'server': 'time.google.com', 'enabled': True}, 'login': {'enabled': False, 'unprotected': False, 'username': 'admin'}, 'pin_code': '', 'name': 'Bathroom Light', 'fw': '20230913-114008/v1.14.0-gcb84623', 'factory_reset_from_switch': True, 'pon_wifi_reset': False, 'discoverable': False, 'build_info': {'build_id': '20230913-114008/v1.14.0-gcb84623', 'build_timestamp': '2023-09-13T11:40:08Z', 'build_version': '1.0'}, 'cloud': {'enabled': True, 'connected': True}, 'timezone': 'America/New_York', 'lat': 42.827599, 'lng': -71.6595, 'tzautodetect': True, 'tz_utc_offset': -14400, 'tz_dst': False, 'tz_dst_auto': True, 'time': '18:48', 'unixtime': 1728686920, 'led_status_disable': False, 'debug_enable': False, 'allow_cross_origin': False, 'actions': {'active': False, 'names': ['btn1_on_url', 'btn1_off_url', 'btn1_longpush_url', 'btn1_shortpush_url', 'btn2_on_url', 'btn2_off_url', 'btn2_longpush_url', 'btn2_shortpush_url', 'out_on_url', 'out_off_url']}, 'hwinfo': {'hw_revision': 'prod-20200629', 'batch_id': 1}, 'mode': 'white', 'pulse_mode': 2, 'pulse_mode_detected': 1, 'pulse_mode_rebooted': 0, 'load_autodetect': 1, 'calibrated': True, 'transition': 1000, 'fade_rate': 3, 'min_brightness': 0, 'zcross_debounce': 100, 'bypass': False, 'lights': [{'name': 'Bathroom Light Switch', 'ison': False, 'default_state': 'switch', 'auto_on': 0.0, 'auto_off': 0.0, 'schedule': False, 'night_mode': {'enabled': False, 'start_time': '00:00', 'end_time': '00:00', 'brightness': 0}, 'schedule_rules': [], 'btn_type': 'toggle', 'btn_debounce': 80, 'swap_inputs': 0}], 'night_mode': {'enabled': False, 'start_time': '00:00', 'end_time': '00:00', 'brightness': 0}, 'warm_up': {'enabled': 0, 'brightness': 100, 'time': 50}, 'eco_mode_enabled': False}
2024-10-11 18:48:40.750 DEBUG (MainThread) [aioshelly.block_device.device] host 192.168.0.77: http request: /status (params=None)
2024-10-11 18:48:44.818 DEBUG (MainThread) [aioshelly.block_device.device] aiohttp response: {'wifi_sta': {'connected': True, 'ssid': 'Roys-2.4G', 'ip': '192.168.0.77', 'rssi': -46}, 'cloud': {'enabled': True, 'connected': True}, 'mqtt': {'connected': False}, 'time': '18:48', 'unixtime': 1728686925, 'serial': 52, 'has_update': False, 'mac': 'F4CFA2ECB290', 'cfg_changed_cnt': 1, 'actions_stats': {'skipped': 0}, 'lights': [{'ison': False, 'source': 'input', 'has_timer': False, 'timer_started': 0, 'timer_duration': 0, 'timer_remaining': 0, 'mode': 'white', 'brightness': 100, 'transition': 0}], 'meters': [{'power': 0.0, 'overpower': 0.0, 'is_valid': True, 'timestamp': 1728672525, 'counters': [0.0, 0.0, 0.0], 'total': 0}], 'inputs': [{'input': 0, 'event': '', 'event_cnt': 0}, {'input': 0, 'event': '', 'event_cnt': 0}], 'tmp': {'tC': 30.53, 'tF': 86.95, 'is_valid': True}, 'calibrated': True, 'calib_progress': 0, 'calib_status': 0, 'calib_running': 0, 'wire_mode': 1, 'forced_neutral': False, 'overtemperature': False, 'loaderror': 0, 'overpower': False, 'debug': 0, 'update': {'status': 'idle', 'has_update': False, 'new_version': '20230913-114008/v1.14.0-gcb84623', 'old_version': '20230913-114008/v1.14.0-gcb84623', 'beta_version': '20231107-164738/v1.14.1-rc1-g0617c15'}, 'ram_total': 49672, 'ram_free': 35808, 'fs_size': 233681, 'fs_free': 118221, 'uptime': 2365}
2024-10-11 18:48:44.819 DEBUG (MainThread) [aioshelly.block_device.coap] Sending request 'cit/d' to device 192.168.0.77
2024-10-11 18:48:46.432 DEBUG (MainThread) [aioshelly.block_device.coap] CoapMessage: ip=192.168.0.91, type=CoapType.PERIODIC(30), options={11: b's', 3332: b'SHIX3-1#E8DB84D67DB1#2', 3412: b'\x96\x00', 3420: b'\x05\x00'}, payload={'G': [[0, 9103, 0], [0, 2101, 0], [0, 2102, ''], [0, 2103, 0], [0, 2201, 0], [0, 2202, ''], [0, 2203, 0], [0, 2301, 0], [0, 2302, ''], [0, 2303, 0]]}
2024-10-11 18:48:46.432 DEBUG (MainThread) [aioshelly.block_device.coap] Calling CoAP message update for device id D67DB1
2024-10-11 18:48:46.432 DEBUG (MainThread) [homeassistant.components.shelly] Shelly Office Switch handle update, type: BlockUpdateType.COAP_PERIODIC
2024-10-11 18:48:46.433 DEBUG (MainThread) [homeassistant.components.shelly] Manually updated Office Switch data
2024-10-11 18:48:46.433 DEBUG (MainThread) [homeassistant.components.shelly] Skipping block event
2024-10-11 18:48:46.433 DEBUG (MainThread) [homeassistant.components.shelly] Skipping block event
2024-10-11 18:48:46.433 DEBUG (MainThread) [homeassistant.components.shelly] Skipping block event
2024-10-11 18:48:46.433 DEBUG (MainThread) [homeassistant.components.shelly] Skipping non-input event block device
2024-10-11 18:48:46.624 DEBUG (MainThread) [aioshelly.block_device.coap] CoapMessage: ip=192.168.0.77, type=CoapType.PERIODIC(30), options={11: b's', 3332: b'SHDM-2#F4CFA2ECB290#2', 3412: b'\x96\x00', 3420: b'4\x00'}, payload={'G': [[0, 9103, 1], [0, 1101, 0], [0, 5101, 100], [0, 2101, 0], [0, 2102, ''], [0, 2103, 0], [0, 2201, 0], [0, 2202, ''], [0, 2203, 0], [0, 4101, 0.0], [0, 4103, 0], [0, 6102, 0], [0, 6109, 0.0], [0, 6104, 0], [0, 3104, 30.53], [0, 3105, 86.95], [0, 6101, 0], [0, 9101, 'white']]}
2024-10-11 18:48:46.625 DEBUG (MainThread) [aioshelly.block_device.coap] Calling CoAP message update for device id ECB290
2024-10-11 18:48:46.650 DEBUG (MainThread) [aioshelly.block_device.device] host 192.168.0.77: timeout error: DeviceConnectionTimeoutError(TimeoutError())
2024-10-11 18:48:46.650 DEBUG (MainThread) [aioshelly.block_device.device] host 192.168.0.77: block device shutdown
2024-10-11 18:48:47.802 DEBUG (MainThread) [aioshelly.block_device.coap] CoapMessage: ip=192.168.0.11, type=CoapType.PERIODIC(30), options={11: b's', 3332: b'SHSW-1#E8DB84D65243#2', 3412: b'\x96\x00', 3420: b'\x03\x00'}, payload={'G': [[0, 9103, 0], [0, 1101, 0], [0, 2101, 0], [0, 2102, ''], [0, 2103, 0]]}
2024-10-11 18:48:47.802 DEBUG (MainThread) [aioshelly.block_device.coap] Calling CoAP message update for device id D65243
2024-10-11 18:48:47.802 DEBUG (MainThread) [homeassistant.components.shelly] Shelly Bathroom Vent handle update, type: BlockUpdateType.COAP_PERIODIC
2024-10-11 18:48:47.803 DEBUG (MainThread) [homeassistant.components.shelly] Manually updated Bathroom Vent data
2024-10-11 18:48:47.803 DEBUG (MainThread) [homeassistant.components.shelly] Skipping block event
2024-10-11 18:48:47.803 DEBUG (MainThread) [homeassistant.components.shelly] Skipping non-input event block sensor_0
2024-10-11 18:48:47.803 DEBUG (MainThread) [homeassistant.components.shelly] Skipping non-input event block sensor_1
2024-10-11 18:48:47.803 DEBUG (MainThread) [homeassistant.components.shelly] Skipping non-input event block sensor_2
2024-10-11 18:48:47.803 DEBUG (MainThread) [homeassistant.components.shelly] Skipping non-input event block device
2024-10-11 18:48:52.043 DEBUG (MainThread) [aioshelly.block_device.coap] Sending request 'cit/s' to device 192.168.0.77
2024-10-11 18:48:52.044 DEBUG (MainThread) [aioshelly.block_device.device] host 192.168.0.77: block device create, MAC: F4CFA2ECB290
2024-10-11 18:48:52.044 DEBUG (MainThread) [aioshelly.block_device.coap] Adding device ECB290 to CoAP message subscriptions
2024-10-11 18:48:52.044 DEBUG (MainThread) [homeassistant.components.shelly] Setting up online block device Bathroom Light
2024-10-11 18:48:52.044 DEBUG (MainThread) [aioshelly.block_device.device] host 192.168.0.77: block device initialize
2024-10-11 18:48:52.054 DEBUG (MainThread) [aioshelly.block_device.coap] CoapMessage: ip=192.168.0.15, type=CoapType.PERIODIC(30), options={11: b's', 3332: b'SHIX3-1#E8DB84D672B7#2', 3412: b'\x96\x00', 3420: b'\x03\x00'}, payload={'G': [[0, 9103, 0], [0, 2101, 0], [0, 2102, ''], [0, 2103, 0], [0, 2201, 0], [0, 2202, ''], [0, 2203, 0], [0, 2301, 0], [0, 2302, ''], [0, 2303, 0]]}
2024-10-11 18:48:52.054 DEBUG (MainThread) [aioshelly.block_device.coap] Calling CoAP message update for device id D672B7
2024-10-11 18:48:52.054 DEBUG (MainThread) [homeassistant.components.shelly] Shelly Bedroom Switch handle update, type: BlockUpdateType.COAP_PERIODIC
2024-10-11 18:48:52.055 DEBUG (MainThread) [homeassistant.components.shelly] Manually updated Bedroom Switch data
2024-10-11 18:48:52.055 DEBUG (MainThread) [homeassistant.components.shelly] Skipping block event
2024-10-11 18:48:52.055 DEBUG (MainThread) [homeassistant.components.shelly] Skipping block event
2024-10-11 18:48:52.055 DEBUG (MainThread) [homeassistant.components.shelly] Skipping block event
2024-10-11 18:48:52.055 DEBUG (MainThread) [homeassistant.components.shelly] Skipping non-input event block device
2024-10-11 18:48:52.056 DEBUG (MainThread) [aioshelly.block_device.coap] CoapMessage: ip=192.168.0.77, type=CoapType.REPLY(69), options={11: b's', 3332: b'SHDM-2#F4CFA2ECB290#2', 3412: b'\x96\x00', 3420: b'4\x00'}, payload={'G': [[0, 9103, 1], [0, 1101, 0], [0, 5101, 100], [0, 2101, 0], [0, 2102, ''], [0, 2103, 0], [0, 2201, 0], [0, 2202, ''], [0, 2203, 0], [0, 4101, 0.0], [0, 4103, 0], [0, 6102, 0], [0, 6109, 0.0], [0, 6104, 0], [0, 3104, 30.53], [0, 3105, 86.95], [0, 6101, 0], [0, 9101, 'white']]}
2024-10-11 18:48:52.056 DEBUG (MainThread) [aioshelly.block_device.coap] Calling CoAP message update for device id ECB290
2024-10-11 18:48:52.080 DEBUG (MainThread) [aioshelly.block_device.device] host 192.168.0.77: http request: /settings (params=None)
2024-10-11 18:48:56.154 DEBUG (MainThread) [aioshelly.block_device.device] aiohttp response: {'device': {'type': 'SHDM-2', 'mac': 'F4CFA2ECB290', 'hostname': 'shellydimmer2-F4CFA2ECB290', 'num_inputs': 2, 'num_outputs': 1, 'num_meters': 1}, 'wifi_ap': {'enabled': False, 'ssid': 'shellydimmer2-F4CFA2ECB290', 'key': ''}, 'wifi_sta': {'enabled': True, 'ssid': 'Roys-2.4G', 'ipv4_method': 'dhcp', 'ip': None, 'gw': None, 'mask': None, 'dns': None}, 'wifi_sta1': {'enabled': False, 'ssid': None, 'ipv4_method': 'dhcp', 'ip': None, 'gw': None, 'mask': None, 'dns': None}, 'ap_roaming': {'enabled': False, 'threshold': -70}, 'mqtt': {'enable': False, 'server': '192.168.33.3:1883', 'user': '', 'id': 'shellydimmer2-F4CFA2ECB290', 'reconnect_timeout_max': 60.0, 'reconnect_timeout_min': 2.0, 'clean_session': True, 'keep_alive': 60, 'max_qos': 0, 'retain': False, 'update_period': 30}, 'coiot': {'enabled': True, 'update_period': 15, 'peer': '192.168.0.5:5683'}, 'sntp': {'server': 'time.google.com', 'enabled': True}, 'login': {'enabled': False, 'unprotected': False, 'username': 'admin'}, 'pin_code': '', 'name': 'Bathroom Light', 'fw': '20230913-114008/v1.14.0-gcb84623', 'factory_reset_from_switch': True, 'pon_wifi_reset': False, 'discoverable': False, 'build_info': {'build_id': '20230913-114008/v1.14.0-gcb84623', 'build_timestamp': '2023-09-13T11:40:08Z', 'build_version': '1.0'}, 'cloud': {'enabled': True, 'connected': True}, 'timezone': 'America/New_York', 'lat': 42.827599, 'lng': -71.6595, 'tzautodetect': True, 'tz_utc_offset': -14400, 'tz_dst': False, 'tz_dst_auto': True, 'time': '18:48', 'unixtime': 1728686936, 'led_status_disable': False, 'debug_enable': False, 'allow_cross_origin': False, 'actions': {'active': False, 'names': ['btn1_on_url', 'btn1_off_url', 'btn1_longpush_url', 'btn1_shortpush_url', 'btn2_on_url', 'btn2_off_url', 'btn2_longpush_url', 'btn2_shortpush_url', 'out_on_url', 'out_off_url']}, 'hwinfo': {'hw_revision': 'prod-20200629', 'batch_id': 1}, 'mode': 'white', 'pulse_mode': 2, 'pulse_mode_detected': 1, 'pulse_mode_rebooted': 0, 'load_autodetect': 1, 'calibrated': True, 'transition': 1000, 'fade_rate': 3, 'min_brightness': 0, 'zcross_debounce': 100, 'bypass': False, 'lights': [{'name': 'Bathroom Light Switch', 'ison': False, 'default_state': 'switch', 'auto_on': 0.0, 'auto_off': 0.0, 'schedule': False, 'night_mode': {'enabled': False, 'start_time': '00:00', 'end_time': '00:00', 'brightness': 0}, 'schedule_rules': [], 'btn_type': 'toggle', 'btn_debounce': 80, 'swap_inputs': 0}], 'night_mode': {'enabled': False, 'start_time': '00:00', 'end_time': '00:00', 'brightness': 0}, 'warm_up': {'enabled': 0, 'brightness': 100, 'time': 50}, 'eco_mode_enabled': False}
2024-10-11 18:48:56.154 DEBUG (MainThread) [aioshelly.block_device.device] host 192.168.0.77: http request: /status (params=None)
2024-10-11 18:48:57.254 DEBUG (MainThread) [aioshelly.block_device.device] aiohttp response: {'wifi_sta': {'connected': True, 'ssid': 'Roys-2.4G', 'ip': '192.168.0.77', 'rssi': -43}, 'cloud': {'enabled': True, 'connected': True}, 'mqtt': {'connected': False}, 'time': '18:48', 'unixtime': 1728686937, 'serial': 52, 'has_update': False, 'mac': 'F4CFA2ECB290', 'cfg_changed_cnt': 1, 'actions_stats': {'skipped': 0}, 'lights': [{'ison': False, 'source': 'input', 'has_timer': False, 'timer_started': 0, 'timer_duration': 0, 'timer_remaining': 0, 'mode': 'white', 'brightness': 100, 'transition': 0}], 'meters': [{'power': 0.0, 'overpower': 0.0, 'is_valid': True, 'timestamp': 1728672537, 'counters': [0.0, 0.0, 0.0], 'total': 0}], 'inputs': [{'input': 0, 'event': '', 'event_cnt': 0}, {'input': 0, 'event': '', 'event_cnt': 0}], 'tmp': {'tC': 30.53, 'tF': 86.95, 'is_valid': True}, 'calibrated': True, 'calib_progress': 0, 'calib_status': 0, 'calib_running': 0, 'wire_mode': 1, 'forced_neutral': False, 'overtemperature': False, 'loaderror': 0, 'overpower': False, 'debug': 0, 'update': {'status': 'idle', 'has_update': False, 'new_version': '20230913-114008/v1.14.0-gcb84623', 'old_version': '20230913-114008/v1.14.0-gcb84623', 'beta_version': '20231107-164738/v1.14.1-rc1-g0617c15'}, 'ram_total': 49672, 'ram_free': 35672, 'fs_size': 233681, 'fs_free': 118221, 'uptime': 2378}
2024-10-11 18:48:57.254 DEBUG (MainThread) [aioshelly.block_device.coap] Sending request 'cit/d' to device 192.168.0.77
2024-10-11 18:49:01.433 DEBUG (MainThread) [aioshelly.block_device.coap] CoapMessage: ip=192.168.0.91, type=CoapType.PERIODIC(30), options={11: b's', 3332: b'SHIX3-1#E8DB84D67DB1#2', 3412: b'\x96\x00', 3420: b'\x05\x00'}, payload={'G': [[0, 9103, 0], [0, 2101, 0], [0, 2102, ''], [0, 2103, 0], [0, 2201, 0], [0, 2202, ''], [0, 2203, 0], [0, 2301, 0], [0, 2302, ''], [0, 2303, 0]]}
2024-10-11 18:49:01.434 DEBUG (MainThread) [aioshelly.block_device.coap] Calling CoAP message update for device id D67DB1
2024-10-11 18:49:01.434 DEBUG (MainThread) [homeassistant.components.shelly] Shelly Office Switch handle update, type: BlockUpdateType.COAP_PERIODIC
2024-10-11 18:49:01.434 DEBUG (MainThread) [homeassistant.components.shelly] Manually updated Office Switch data
2024-10-11 18:49:01.434 DEBUG (MainThread) [homeassistant.components.shelly] Skipping block event
2024-10-11 18:49:01.434 DEBUG (MainThread) [homeassistant.components.shelly] Skipping block event
2024-10-11 18:49:01.434 DEBUG (MainThread) [homeassistant.components.shelly] Skipping block event
2024-10-11 18:49:01.435 DEBUG (MainThread) [homeassistant.components.shelly] Skipping non-input event block device
Additional information
No response
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 closeCloses the issue. -
@home-assistant rename Awesome new titleRenames the issue. -
@home-assistant reopenReopen the issue. -
@home-assistant unassign shellyRemoves the current integration label and assignees on the issue, add the integration domain after the command. -
@home-assistant add-label needs-more-informationAdd a label (needs-more-information, problem in dependency, problem in custom component) to the issue. -
@home-assistant remove-label needs-more-informationRemove 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)
Here's the logs from the Shelly device's debug logs. .85 is my laptop. .5 is the HA server.
4200999758 mgos_sys_config.c:323 Saved to conf9.json 4201045099 cloud_aes.c:592 Sending 2422 bytes 4201048737 4201055249 cloud_aes.c:576 free mem: 31476 / 26272, buf len: 2432, buf size: 2446 4201064558 cloud_aes.c:406 Bytes written: 1420 bytes remaining: 1012 4201187895 cloud_aes.c:406 Bytes written: 1012 bytes remaining: 0 4201269511 json.c:428 RAM: 49672 total, 34256 free 4201275312 cloud_aes.c:592 Sending 1191 bytes 4201278962 4201284727 cloud_aes.c:576 free mem: 34200 / 26272, buf len: 1200, buf size: 1214 4201290313 cloud_common.c:1612 Stop status keep alive timer 4201299925 cloud_aes.c:406 Bytes written: 1200 bytes remaining: 0 4201416332 mgos_http_server.c:180 0x3fff2c7c HTTP connection from 192.168.0.85:62682 4201502992 cloud_aes.c:592 Sending 31 bytes 4201506693 4201511805 cloud_aes.c:576 free mem: 36580 / 26272, buf len: 32, buf size: 46 4201518667 cloud_aes.c:406 Bytes written: 32 bytes remaining: 0 4201786311 cloud_common.c:1173 Cmd: status 4201790576 cloud_common.c:144 Confirmed status serial 93 4201794598 cloud_common.c:1176 Cloud clear status timer 4201800155 cloud_aes.c:592 Sending 31 bytes 4201803810 4201809878 cloud_aes.c:576 free mem: 36528 / 26272, buf len: 32, buf size: 46 4201816760 cloud_aes.c:406 Bytes written: 32 bytes remaining: 0 4202299736 stmuart.c:248 enqueuing command 10 4202303986 stmuart.c:351 uart_send: 56 16 0 bytes 4202316712 dimmer_proto.c:192 error[0] pulses[1] power[0.00] dchi[0] status[8021] debug[0(0 0)] 4203245606 mgos_http_server.c:180 0x3fff2bcc HTTP connection from 192.168.0.85:62683 4203261464 json.c:428 RAM: 49672 total, 34920 free 4204299641 stmuart.c:248 enqueuing command 10 4204303915 stmuart.c:351 uart_send: 57 16 0 bytes 4204312094 mgos_http_server.c:180 0x3fff2bcc HTTP connection from 192.168.0.85:62684 4204332604 dimmer_proto.c:192 error[0] pulses[1] power[0.00] dchi[0] status[8021] debug[0(0 0)] 4206299678 stmuart.c:248 enqueuing command 10 4206303965 stmuart.c:351 uart_send: 58 16 0 bytes 4206315401 dimmer_proto.c:192 error[0] pulses[1] power[0.00] dchi[0] status[8021] debug[0(0 0)] 4207318657 mgos_http_server.c:180 0x3fff2bcc HTTP connection from 192.168.0.85:62690 4208308790 stmuart.c:248 enqueuing command 10 4208313060 stmuart.c:351 uart_send: 59 16 0 bytes 4208322022 dimmer_proto.c:192 error[0] pulses[0] power[0.00] dchi[0] status[8021] debug[0(0 0)] 4209717189 mgos_http_server.c:180 0x3fff269c HTTP connection from 192.168.0.85:62691 4209737555 json.c:428 RAM: 49672 total, 34740 free 4210299770 stmuart.c:248 enqueuing command 10 4210305010 stmuart.c:351 uart_send: 60 16 0 bytes 4210316246 dimmer_proto.c:192 error[0] pulses[1] power[0.00] dchi[0] status[8021] debug[0(0 0)] 4212299774 stmuart.c:248 enqueuing command 10 4212305003 stmuart.c:351 uart_send: 61 16 0 bytes 4212314775 dimmer_proto.c:192 error[0] pulses[1] power[0.00] dchi[0] status[8021] debug[0(0 0)] 4214299773 stmuart.c:248 enqueuing command 10 4214304048 stmuart.c:351 uart_send: 62 16 0 bytes 4214315960 dimmer_proto.c:192 error[0] pulses[1] power[0.00] dchi[0] status[8021] debug[0(0 0)] 4215103996 mgos_http_server.c:180 0x3fff269c HTTP connection from 192.168.0.85:62695 4215120297 json.c:428 RAM: 49672 total, 35288 free 4216299575 stmuart.c:248 enqueuing command 10 4216303860 stmuart.c:351 uart_send: 63 16 0 bytes 4216317556 dimmer_proto.c:192 error[0] pulses[0] power[0.00] dchi[0] status[8021] debug[0(0 0)] 4218299543 stmuart.c:248 enqueuing command 10 4218303827 stmuart.c:351 uart_send: 64 16 0 bytes 4218313638 dimmer_proto.c:192 error[0] pulses[0] power[0.00] dchi[0] status[8021] debug[0(0 0)] 4220299624 stmuart.c:248 enqueuing command 10 4220304872 stmuart.c:351 uart_send: 65 16 0 bytes 4220314644 dimmer_proto.c:192 error[0] pulses[0] power[0.00] dchi[0] status[8021] debug[0(0 0)] 4221593046 mgos_http_server.c:180 0x3fff2e24 HTTP connection from 192.168.0.85:62692 4222004394 json.c:428 RAM: 49672 total, 34820 free 4222085328 mgos_http_server.c:180 0x3fff2e24 HTTP connection from 192.168.0.85:62696 4222299687 stmuart.c:248 enqueuing command 10 4222303975 stmuart.c:351 uart_send: 66 16 0 bytes 4222314785 dimmer_proto.c:192 error[0] pulses[0] power[0.00] dchi[0] status[8021] debug[0(0 0)] 4222335598 mgos_http_server.c:180 0x3fff2eac HTTP connection from 192.168.0.85:62697 4222398561 json.c:428 RAM: 49672 total, 34924 free 4224299537 stmuart.c:248 enqueuing command 10 4224303850 stmuart.c:351 uart_send: 67 16 0 bytes 4224313994 dimmer_proto.c:192 error[0] pulses[1] power[0.00] dchi[0] status[8021] debug[0(0 0)] 4225562742 mgos_http_server.c:180 0x3fff2dac HTTP connection from 192.168.0.5:53924 4226299586 stmuart.c:248 enqueuing command 10 4226303891 stmuart.c:351 uart_send: 68 16 0 bytes 4226313728 dimmer_proto.c:192 error[0] pulses[0] power[0.00] dchi[0] status[8021] debug[0(0 0)] 4227405789 mgos_http_server.c:180 0x3fff2e64 HTTP connection from 192.168.0.5:53938 4228299727 stmuart.c:248 enqueuing command 10 4228304025 stmuart.c:351 uart_send: 69 16 0 bytes 4228314810 dimmer_proto.c:192 error[0] pulses[0] power[0.00] dchi[0] status[8021] debug[0(0 0)] 4229680871 mgos_http_server.c:180 0x3fff2fa4 HTTP connection from 192.168.0.85:62693 4230308632 stmuart.c:248 enqueuing command 10 4230313874 stmuart.c:351 uart_send: 70 16 0 bytes 4230323502 dimmer_proto.c:192 error[0] pulses[0] power[0.00] dchi[0] status[8021] debug[0(0 0)] 4230710802 mgos_http_server.c:180 0x3fff2e64 HTTP connection from 192.168.0.5:53952 4231590858 mgos_http_server.c:180 0x3fff2e64 HTTP connection from 192.168.0.85:62701 4231608578 json.c:428 RAM: 49672 total, 34372 free 4231802248 mgos_http_server.c:180 0x3fff2e64 HTTP connection from 192.168.0.5:49134 4231850456 json.c:428 RAM: 49672 total, 32796 free 4232299725 stmuart.c:248 enqueuing command 10 4232304044 stmuart.c:351 uart_send: 71 16 0 bytes 4232314398 dimmer_proto.c:192 error[0] pulses[0] power[0.00] dchi[0] status[8021] debug[0(0 0)] 4234299534 stmuart.c:248 enqueuing command 10 4234303840 stmuart.c:351 uart_send: 72 16 0 bytes 4234313855 dimmer_proto.c:192 error[0] pulses[0] power[0.00] dchi[0] status[8021] debug[0(0 0)] 4236299524 stmuart.c:248 enqueuing command 10 4236304809 stmuart.c:351 uart_send: 73 16 0 bytes 4236316170 dimmer_proto.c:192 error[0] pulses[0] power[0.00] dchi[0] status[8021] debug[0(0 0)] 4236795644 mgos_http_server.c:180 0x3fff29dc HTTP connection from 192.168.0.85:62702 4236812515 json.c:428 RAM: 49672 total, 34736 free 4238299586 stmuart.c:248 enqueuing command 10 4238303898 stmuart.c:351 uart_send: 74 16 0 bytes 4238313772 dimmer_proto.c:192 error[0] pulses[0] power[0.00] dchi[0] status[8021] debug[0(0 0)] 4240299775 stmuart.c:248 enqueuing command 10 4240304099 stmuart.c:351 uart_send: 75 16 0 bytes 4240315425 dimmer_proto.c:192 error[0] pulses[0] power[0.00] dchi[0] status[8021] debug[0(0 0)] 4241027037 shelly_sntp.c:441 minute tick at 19:20:00 4241358804 mgos_http_server.c:180 0x3fff2a54 HTTP connection from 192.168.0.85:62704 4241869785 mgos_http_server.c:180 0x3fff2624 HTTP connection from 192.168.0.85:62705 4241889821 json.c:428 RAM: 49672 total, 35060 free 4242299618 stmuart.c:248 enqueuing command 10 4242303946 stmuart.c:351 uart_send: 76 16 0 bytes 4242314006 dimmer_proto.c:192 error[0] pulses[0] power[0.00] dchi[0] status[8021] debug[0(0 0)] 4244127207 cloud_aes.c:592 Sending 162 bytes 4244130982 4244136241 cloud_aes.c:576 free mem: 36880 / 26272, buf len: 176, buf size: 190 4244143565 cloud_aes.c:406 Bytes written: 176 bytes remaining: 0 4244299813 stmuart.c:248 enqueuing command 10 4244304124 stmuart.c:351 uart_send: 77 16 0 bytes 4244314033 dimmer_proto.c:192 error[0] pulses[0] power[0.00] dchi[0] status[8021] debug[0(0 0)] 4244569755 cloud_common.c:1173 Cmd: status 4244575035 cloud_common.c:144 Confirmed status serial 93 4244579110 cloud_common.c:1176 Cloud clear status timer 4244584707 cloud_aes.c:592 Sending 31 bytes 4244588431 4244593614 cloud_aes.c:576 free mem: 36856 / 26272, buf len: 32, buf size: 46 4244601518 cloud_aes.c:406 Bytes written: 32 bytes remaining: 0 4246299601 stmuart.c:248 enqueuing command 10 4246303917 stmuart.c:351 uart_send: 78 16 0 bytes 4246314237 dimmer_proto.c:192 error[0] pulses[0] power[0.00] dchi[0] status[8021] debug[0(0 0)] 4246959682 mgos_http_server.c:180 0x3fff2624 HTTP connection from 192.168.0.5:42072 4247112945 mgos_http_server.c:180 0x3fff2c84 HTTP connection from 192.168.0.85:62707 4247132722 json.c:428 RAM: 49672 total, 34708 free 4248299696 stmuart.c:248 enqueuing command 10 4248304042 stmuart.c:351 uart_send: 79 16 0 bytes 4248313897 dimmer_proto.c:192 error[0] pulses[1] power[0.00] dchi[0] status[8021] debug[0(0 0)] 4249973892 mgos_http_server.c:180 0x3fff2c84 HTTP connection from 192.168.0.5:42080 4250299722 stmuart.c:248 enqueuing command 10 4250304054 stmuart.c:351 uart_send: 80 16 0 bytes 4250314096 dimmer_proto.c:192 error[0] pulses[0] power[0.00] dchi[0] status[8021] debug[0(0 0)] 4251087984 mgos_http_server.c:180 0x3fff2624 HTTP connection from 192.168.0.5:42082 4251104233 json.c:428 RAM: 49672 total, 34864 free 4251331382 mgos_http_server.c:180 0x3fff2624 HTTP connection from 192.168.0.85:62709 4252308651 stmuart.c:248 enqueuing command 10 4252312998 stmuart.c:351 uart_send: 81 16 0 bytes 4252323108 dimmer_proto.c:192 error[0] pulses[0] power[0.00] dchi[0] status[8021] debug[0(0 0)] 4253239537 mgos_http_server.c:180 0x3fff29dc HTTP connection from 192.168.0.85:62708 4253358371 json.c:428 RAM: 49672 total, 34700 free 4254299633 stmuart.c:248 enqueuing command 10 4254303985 stmuart.c:351 uart_send: 82 16 0 bytes 4254315397 dimmer_proto.c:192 error[0] pulses[0] power[0.00] dchi[0] status[8021] debug[0(0 0)] 4256299770 stmuart.c:248 enqueuing command 10 4256304113 stmuart.c:351 uart_send: 83 16 0 bytes 4256315106 dimmer_proto.c:192 error[0] pulses[0] power[0.00] dchi[0] status[8021] debug[0(0 0)] 4258102193 mgos_http_server.c:180 0x3fff29dc HTTP connection from 192.168.0.85:62710 4258118784 json.c:428 RAM: 49672 total, 34740 free 4258299586 stmuart.c:248 enqueuing command 10 4258303934 stmuart.c:351 uart_send: 84 16 0 bytes 4258313792 dimmer_proto.c:192 error[0] pulses[0] power[0.00] dchi[0] status[8021] debug[0(0 0)] 4260299603 stmuart.c:248 enqueuing command 10 4260304923 stmuart.c:351 uart_send: 85 16 0 bytes 4260314800 dimmer_proto.c:192 error[0] pulses[0] power[0.00] dchi[0] status[8021] debug[0(0 0)] 4262299595 stmuart.c:248 enqueuing command 10 4262304920 stmuart.c:351 uart_send: 86 16 0 bytes 4262314717 dimmer_proto.c:192 error[0] pulses[0] power[0.00] dchi[0] status[8021] debug[0(0 0)] 4263153308 mgos_http_server.c:180 0x3fff2bcc HTTP connection from 192.168.0.85:62712 4263204520 json.c:428 RAM: 49672 total, 35292 free 4263779278 mgos_http_server.c:180 0x3fff2624 HTTP connection from 192.168.0.85:62713
I did find out that core.device_registry and core.entity_registry still has the shelly devices and their entities listed even after you delete them through the UI. If I manually delete them from those files, and then do a restart and/or reboot, I can get them to work.. But it's still not great, they still don't seem stable. So I think I'm missing something else that's not getting cleaned up on delete.
Device is a gen1 so you need to forward to it also udp CoAP protocol, which is not at all easy task
Device is a gen1 so you need to forward to it also udp CoAP protocol, which is not at all easy task
I have done that, or is there more to it than this?
Looking back at the log, you can even see the coap messages.
Okay, going down the CoAP/UDP track, I realized I had installed a UDP forwarding plugin on my OPNSense FW. I removed that plugin, and after some rebooting and reconfiguring, it SEEMS to be okay for now. I'll report back later today and if it's stable, I'll close this out.
Lookin' good!
I just wanted to give an update in case anybody else stumbles on this...
Yes, you have to set ColoT like the example above. You ALSO have to make sure auto-discover is on in Settings.
The other thing I noticed, make sure the Shelly device is 100% set up and ready to go, otherwise if you change anything on the Shelly the integration will start bouncing again, and you'll have to remove it and re-add.
Also, after you make the changes, regardless of what they are, reboot it, and make sure they are stuck. I noticed some settings wouldn't stay set (like button type, or the auto-discover)
I do think it's still a little weird that when you delete a device, it leaves stuff in those config files.
But since I did all that, in that order, it's been stable.