home-assistant / core

:house_with_garden: Open source home automation that puts local control and privacy first.
https://www.home-assistant.io
Apache License 2.0
71.11k stars 29.79k forks source link

Recorder still locking up even after update to 2024.8.0 #123348

Closed talormanda closed 1 month ago

talormanda commented 1 month ago

The problem

My recorder has been locking up ever since the updates in 2024.7. I am now on 2024.8.0, and the issue still persists. Every night at 4:11 AM, it will lock up. Entities no longer get any history saved, and the home-assistant_v2.db file no longer updates. If I turn off purging, or set purge_keep_days to something really far out, the issue is avoided temporarily. It is 4:39 AM as I type this, and my DB file has not updated since 4:11 AM: image

image

Nothing in this post fixed my issue: https://community.home-assistant.io/t/psa-2024-7-recorder-problems/746428/155

I did not have any of the mentioned integrations installed like others had.

I am adding 20 minutes worth of logs from home-assistant.log at [4:00 AM to 4:20 AM].

What version of Home Assistant Core has the issue?

2024.8.0

What was the last working version of Home Assistant Core?

2024.6

What type of installation are you running?

Home Assistant OS

Integration causing the issue

No response

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?

2024-08-08 04:00:00.100 INFO (MainThread) [homeassistant.components.automation.runescape_player_count] RuneScape - Player count: Running automation actions
2024-08-08 04:00:00.100 INFO (MainThread) [homeassistant.components.automation.runescape_player_count] RuneScape - Player count: Executing step setting variables
2024-08-08 04:00:00.101 INFO (MainThread) [homeassistant.components.automation.runescape_player_count] RuneScape - Player count: Skipped disabled step variables
2024-08-08 04:00:00.102 INFO (MainThread) [homeassistant.components.automation.runescape_player_count] RuneScape - Player count: Executing step call service
2024-08-08 04:00:00.192 INFO (MainThread) [homeassistant.components.automation.ptd_bandwidth_refresh] PTD - Bandwidth refresh: Running automation actions
2024-08-08 04:00:00.193 INFO (MainThread) [homeassistant.components.automation.ptd_bandwidth_refresh] PTD - Bandwidth refresh: Executing step call service
2024-08-08 04:00:01.226 INFO (MainThread) [homeassistant.components.automation.runescape_player_count] RuneScape - Player count: Executing step delay 0:00:10
2024-08-08 04:00:02.183 INFO (MainThread) [pyhap.hap_protocol] ('192.168.0.193', 56781): Connection made to HASS Bridge
2024-08-08 04:00:06.413 INFO (MainThread) [reolink_aio.api] Reolink Reolink FE ONVIF event channel 0, Motion: False
2024-08-08 04:00:09.417 ERROR (MainThread) [homeassistant.helpers.dispatcher] Exception in handle_camera_update when dispatching 'wyzeapi.camera_updated-GW_GC1_D03F27714375': (<Device: DeviceTypes.CAMERA, GW_GC1_D03F27714375>,)
Traceback (most recent call last):
  File "/config/custom_components/wyzeapi/switch.py", line 446, in handle_camera_update
    self.async_write_ha_state()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1005, in async_write_ha_state
    self._async_write_ha_state()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1130, in _async_write_ha_state
    self.__async_calculate_state()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1067, in __async_calculate_state
    state = self._stringify_state(available)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1011, in _stringify_state
    if (state := self.state) is None:
                 ^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1670, in state
    if (is_on := self.is_on) is None:
                 ^^^^^^^^^^
  File "/config/custom_components/wyzeapi/switch.py", line 435, in is_on
    return self._device.motion
           ^^^^^^^^^^^^^^^^^^^
AttributeError: 'Camera' object has no attribute 'motion'

2024-08-08 04:00:11.320 INFO (MainThread) [homeassistant.components.automation.runescape_player_count] RuneScape - Player count: Executing step setting variables
2024-08-08 04:00:11.321 INFO (MainThread) [homeassistant.components.automation.runescape_player_count] RuneScape - Player count: Skipped disabled step variables
2024-08-08 04:00:11.323 INFO (MainThread) [homeassistant.components.automation.runescape_player_count] RuneScape - Player count: Executing step delay 0:00:03
2024-08-08 04:00:14.325 INFO (MainThread) [homeassistant.components.automation.runescape_player_count] RuneScape - Player count: Skipped disabled step if
2024-08-08 04:00:14.326 INFO (MainThread) [homeassistant.components.automation.runescape_player_count] RuneScape - Player count: If at step 9: Running automation actions
2024-08-08 04:00:14.327 INFO (MainThread) [homeassistant.components.automation.runescape_player_count] RuneScape - Player count: If at step 9: Skipped disabled step call_service
2024-08-08 04:00:18.926 INFO (MainThread) [reolink_aio.api] Reolink Reolink FE ONVIF event channel 0, Motion: True
2024-08-08 04:00:35.745 WARNING (MainThread) [custom_components.localtuya.common] [eb5...m9n] Disconnected - waiting for discovery broadcast
2024-08-08 04:00:39.558 INFO (MainThread) [custom_components.localtuya.common] [eb5...m9n] Trying to connect to 192.168.0.248...
2024-08-08 04:00:47.949 INFO (MainThread) [reolink_aio.api] Reolink Reolink FE ONVIF event channel 0, Motion: False
2024-08-08 04:00:48.395 INFO (MainThread) [custom_components.localtuya.common] [eb5...m9n] Successfully connected to 192.168.0.248
2024-08-08 04:01:00.831 ERROR (MainThread) [homeassistant.components.nanoleaf.coordinator] Error fetching Nanoleaf data: 
2024-08-08 04:01:00.852 INFO (MainThread) [homeassistant.components.automation.auto_brightness_nanoleaf] Auto brightness - Nanoleaf: Running automation actions
2024-08-08 04:01:00.853 INFO (MainThread) [homeassistant.components.automation.auto_brightness_nanoleaf] Auto brightness - Nanoleaf: Executing step delay 0:00:05
2024-08-08 04:01:01.375 ERROR (MainThread) [homeassistant.helpers.dispatcher] Exception in handle_camera_update when dispatching 'wyzeapi.camera_updated-AN_RSCW_D03F276641D0': (<Device: DeviceTypes.CAMERA, AN_RSCW_D03F276641D0>,)
Traceback (most recent call last):
  File "/config/custom_components/wyzeapi/switch.py", line 446, in handle_camera_update
    self.async_write_ha_state()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1005, in async_write_ha_state
    self._async_write_ha_state()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1130, in _async_write_ha_state
    self.__async_calculate_state()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1067, in __async_calculate_state
    state = self._stringify_state(available)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1011, in _stringify_state
    if (state := self.state) is None:
                 ^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1670, in state
    if (is_on := self.is_on) is None:
                 ^^^^^^^^^^
  File "/config/custom_components/wyzeapi/switch.py", line 435, in is_on
    return self._device.motion
           ^^^^^^^^^^^^^^^^^^^
AttributeError: 'Camera' object has no attribute 'motion'

2024-08-08 04:01:01.488 INFO (MainThread) [pywizlight.discovery] Discovered bulb 192.168.0.237 with MAC 444f8e9cf32c
2024-08-08 04:01:01.491 INFO (MainThread) [pywizlight.discovery] Discovered bulb 192.168.0.234 with MAC 444f8ec96080
2024-08-08 04:01:01.491 INFO (MainThread) [pywizlight.discovery] Discovered bulb 192.168.0.235 with MAC 444f8ec95146
2024-08-08 04:01:01.491 INFO (MainThread) [pywizlight.discovery] Discovered bulb 192.168.0.236 with MAC 444f8ec95f60
2024-08-08 04:01:01.491 INFO (MainThread) [pywizlight.discovery] Discovered bulb 192.168.0.232 with MAC 444f8e9f0160
2024-08-08 04:01:01.491 INFO (MainThread) [pywizlight.discovery] Discovered bulb 192.168.0.233 with MAC 444f8e010c5a
2024-08-08 04:01:03.466 INFO (MainThread) [reolink_aio.api] Reolink Reolink FE ONVIF event channel 0, Motion: True
2024-08-08 04:01:05.857 INFO (MainThread) [homeassistant.components.automation.auto_brightness_nanoleaf] Auto brightness - Nanoleaf: Running automation actions
2024-08-08 04:01:05.858 INFO (MainThread) [homeassistant.components.automation.auto_brightness_nanoleaf] Auto brightness - Nanoleaf: Executing step delay 0:00:05
2024-08-08 04:01:05.979 INFO (MainThread) [reolink_aio.api] Reolink Reolink FE ONVIF event channel 0, Motion: False
2024-08-08 04:01:07.456 WARNING (MainThread) [custom_components.localtuya.common] [eb5...m9n] Disconnected - waiting for discovery broadcast
2024-08-08 04:01:09.754 INFO (MainThread) [custom_components.localtuya.common] [eb5...m9n] Trying to connect to 192.168.0.248...
2024-08-08 04:01:10.863 INFO (MainThread) [homeassistant.components.automation.auto_brightness_nanoleaf] Auto brightness - Nanoleaf: Running automation actions
2024-08-08 04:01:10.864 INFO (MainThread) [homeassistant.components.automation.auto_brightness_nanoleaf] Auto brightness - Nanoleaf: Executing step delay 0:00:05
2024-08-08 04:01:12.958 INFO (MainThread) [custom_components.localtuya.common] [eb5...m9n] Successfully connected to 192.168.0.248
2024-08-08 04:01:15.294 INFO (MainThread) [homeassistant.components.automation.helpers_update] Helpers - Update: Running automation actions
2024-08-08 04:01:15.295 INFO (MainThread) [homeassistant.components.automation.helpers_update] Helpers - Update: Executing step call service
2024-08-08 04:01:15.306 INFO (MainThread) [homeassistant.components.automation.helpers_update] Helpers - Update: Skipped disabled step call_service
2024-08-08 04:01:15.869 INFO (MainThread) [homeassistant.components.automation.auto_brightness_nanoleaf] Auto brightness - Nanoleaf: Running automation actions
2024-08-08 04:01:15.870 INFO (MainThread) [homeassistant.components.automation.auto_brightness_nanoleaf] Auto brightness - Nanoleaf: Executing step delay 0:00:05
2024-08-08 04:01:43.893 ERROR (MainThread) [homeassistant.helpers.dispatcher] Exception in handle_camera_update when dispatching 'wyzeapi.camera_updated-GW_GC2_D03F277828EB': (<Device: DeviceTypes.CAMERA, GW_GC2_D03F277828EB>,)
Traceback (most recent call last):
  File "/config/custom_components/wyzeapi/switch.py", line 446, in handle_camera_update
    self.async_write_ha_state()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1005, in async_write_ha_state
    self._async_write_ha_state()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1130, in _async_write_ha_state
    self.__async_calculate_state()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1067, in __async_calculate_state
    state = self._stringify_state(available)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1011, in _stringify_state
    if (state := self.state) is None:
                 ^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1670, in state
    if (is_on := self.is_on) is None:
                 ^^^^^^^^^^
  File "/config/custom_components/wyzeapi/switch.py", line 435, in is_on
    return self._device.motion
           ^^^^^^^^^^^^^^^^^^^
AttributeError: 'Camera' object has no attribute 'motion'

2024-08-08 04:02:00.860 INFO (MainThread) [homeassistant.components.nanoleaf.coordinator] Fetching Nanoleaf data recovered
2024-08-08 04:02:00.882 INFO (MainThread) [homeassistant.components.automation.auto_brightness_nanoleaf] Auto brightness - Nanoleaf: Running automation actions
2024-08-08 04:02:00.890 INFO (MainThread) [homeassistant.components.automation.auto_brightness_nanoleaf] Auto brightness - Nanoleaf: Executing step delay 0:00:05
2024-08-08 04:02:06.002 INFO (MainThread) [homeassistant.components.automation.auto_brightness_nanoleaf] Auto brightness - Nanoleaf: Running automation actions
2024-08-08 04:02:06.003 INFO (MainThread) [homeassistant.components.automation.auto_brightness_nanoleaf] Auto brightness - Nanoleaf: Executing step delay 0:00:05
2024-08-08 04:02:11.008 INFO (MainThread) [homeassistant.components.automation.auto_brightness_nanoleaf] Auto brightness - Nanoleaf: Running automation actions
2024-08-08 04:02:11.009 INFO (MainThread) [homeassistant.components.automation.auto_brightness_nanoleaf] Auto brightness - Nanoleaf: Executing step delay 0:00:05
2024-08-08 04:02:16.014 INFO (MainThread) [homeassistant.components.automation.auto_brightness_nanoleaf] Auto brightness - Nanoleaf: Running automation actions
2024-08-08 04:02:16.015 INFO (MainThread) [homeassistant.components.automation.auto_brightness_nanoleaf] Auto brightness - Nanoleaf: Executing step delay 0:00:05
2024-08-08 04:02:20.232 INFO (MainThread) [pyhap.hap_protocol] ('192.168.0.193', 56782): Connection made to HASS Bridge
2024-08-08 04:02:26.747 WARNING (MainThread) [aioesphomeapi.connection] screek-human-sensor-2a-8711a4 @ 192.168.1.9: Connection error occurred: screek-human-sensor-2a-8711a4 @ 192.168.1.9: EOF received
2024-08-08 04:02:26.750 INFO (MainThread) [aioesphomeapi.reconnect_logic] Processing unexpected disconnect from ESPHome API for screek-human-sensor-2a-8711a4 @ 192.168.1.9
2024-08-08 04:02:26.989 INFO (MainThread) [aioesphomeapi.reconnect_logic] Successfully connected to screek-human-sensor-2a-8711a4 @ 192.168.1.9 in 0.138s
2024-08-08 04:02:27.065 INFO (MainThread) [aioesphomeapi.reconnect_logic] Successful handshake with screek-human-sensor-2a-8711a4 @ 192.168.1.9 in 0.076s
2024-08-08 04:02:51.536 INFO (MainThread) [reolink_aio.api] Reolink Reolink FE ONVIF event channel 0, Motion: True
2024-08-08 04:03:29.132 INFO (MainThread) [homeassistant.components.automation.aarons_room_motion_detection_camera_on] Aaron's room - Motion Detection - Camera - Off: Executing step call service
2024-08-08 04:03:29.194 INFO (MainThread) [homeassistant.components.zwave_js.services] Set configuration parameter ConfigurationValue(value_id='2-112-0-3') on Node Node(node_id=2) with value 120
2024-08-08 04:03:29.197 INFO (MainThread) [homeassistant.components.automation.aarons_room_motion_detection_camera_on] Aaron's room - Motion Detection - Camera - Off: If at step 4: Running automation actions
2024-08-08 04:03:29.198 INFO (MainThread) [homeassistant.components.automation.aarons_room_motion_detection_camera_on] Aaron's room - Motion Detection - Camera - Off: If at step 4: Executing step device automation
2024-08-08 04:03:30.268 INFO (MainThread) [homeassistant.components.automation.aarons_room_motion_detection_camera_on] Aaron's room - Motion Detection - Camera - Off: If at step 4: Executing step device automation
2024-08-08 04:03:31.679 INFO (MainThread) [homeassistant.components.automation.aarons_room_motion_detection_camera_on] Aaron's room - Motion Detection - Camera - Off: If at step 4: Executing step call service
2024-08-08 04:04:00.399 INFO (MainThread) [pyhap.hap_protocol] ('192.168.0.193', 56783): Connection made to HASS Bridge
2024-08-08 04:04:14.017 INFO (MainThread) [pyhap.hap_protocol] ('192.168.0.193', 56784): Connection made to HASS Bridge
2024-08-08 04:04:23.554 INFO (MainThread) [reolink_aio.api] Reolink Reolink FE ONVIF event channel 0, Motion: False
2024-08-08 04:05:21.772 ERROR (MainThread) [homeassistant.helpers.dispatcher] Exception in handle_camera_update when dispatching 'wyzeapi.camera_updated-GW_GC2_D03F277828EB': (<Device: DeviceTypes.CAMERA, GW_GC2_D03F277828EB>,)
Traceback (most recent call last):
  File "/config/custom_components/wyzeapi/switch.py", line 446, in handle_camera_update
    self.async_write_ha_state()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1005, in async_write_ha_state
    self._async_write_ha_state()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1130, in _async_write_ha_state
    self.__async_calculate_state()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1067, in __async_calculate_state
    state = self._stringify_state(available)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1011, in _stringify_state
    if (state := self.state) is None:
                 ^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1670, in state
    if (is_on := self.is_on) is None:
                 ^^^^^^^^^^
  File "/config/custom_components/wyzeapi/switch.py", line 435, in is_on
    return self._device.motion
           ^^^^^^^^^^^^^^^^^^^
AttributeError: 'Camera' object has no attribute 'motion'

2024-08-08 04:05:22.079 INFO (MainThread) [reolink_aio.api] Reolink Reolink FE ONVIF event channel 0, Motion: True
2024-08-08 04:05:27.470 INFO (MainThread) [homeassistant.components.automation.multisensor_6_1_motion_detection_logging_on_state] MultiSensor 6 - 1 Motion detection - Logging - On state: Running automation actions
2024-08-08 04:05:27.470 INFO (MainThread) [homeassistant.components.automation.multisensor_6_1_motion_detection_logging_on_state] MultiSensor 6 - 1 Motion detection - Logging - On state: Executing step call service
2024-08-08 04:05:27.488 INFO (MainThread) [homeassistant.components.automation.aarons_room_motion_detection_camera_on] Aaron's room - Motion Detection - Camera - Off: Running automation actions
2024-08-08 04:05:27.489 INFO (MainThread) [homeassistant.components.automation.aarons_room_motion_detection_camera_on] Aaron's room - Motion Detection - Camera - Off: Executing step call service
2024-08-08 04:05:27.562 INFO (MainThread) [homeassistant.components.zwave_js.services] Set configuration parameter ConfigurationValue(value_id='2-112-0-3') on Node Node(node_id=2) with value 10
2024-08-08 04:05:27.563 INFO (MainThread) [homeassistant.components.automation.aarons_room_motion_detection_camera_on] Aaron's room - Motion Detection - Camera - Off: Executing step delay 0:05:00
2024-08-08 04:05:29.252 INFO (MainThread) [pyhap.hap_protocol] ('192.168.0.193', 56787): Connection made to HASS Bridge
2024-08-08 04:06:00.813 INFO (MainThread) [homeassistant.components.automation.multisensor_6_1_motion_detection_logging_on_state] MultiSensor 6 - 1 Motion detection - Logging - On state: Running automation actions
2024-08-08 04:06:00.814 INFO (MainThread) [homeassistant.components.automation.multisensor_6_1_motion_detection_logging_on_state] MultiSensor 6 - 1 Motion detection - Logging - On state: Executing step call service
2024-08-08 04:06:00.829 WARNING (MainThread) [homeassistant.components.automation.aarons_room_motion_detection_camera_on] Aaron's room - Motion Detection - Camera - Off: Already running
2024-08-08 04:07:15.116 INFO (MainThread) [reolink_aio.api] Reolink Reolink FE ONVIF event channel 0, Motion: False
2024-08-08 04:07:30.248 INFO (MainThread) [pyhap.hap_protocol] ('192.168.0.193', 56793): Connection made to HASS Bridge
2024-08-08 04:07:43.642 INFO (MainThread) [reolink_aio.api] Reolink Reolink FE ONVIF event channel 0, Motion: True
2024-08-08 04:07:48.721 INFO (MainThread) [pyhap.hap_protocol] ('192.168.0.193', 56794): Connection made to HASS Bridge
2024-08-08 04:08:14.295 INFO (MainThread) [homeassistant.components.automation.multisensor_6_1_motion_detection_logging_on_state] MultiSensor 6 - 1 Motion detection - Logging - On state: Running automation actions
2024-08-08 04:08:14.296 INFO (MainThread) [homeassistant.components.automation.multisensor_6_1_motion_detection_logging_on_state] MultiSensor 6 - 1 Motion detection - Logging - On state: Executing step call service
2024-08-08 04:08:14.321 WARNING (MainThread) [homeassistant.components.automation.aarons_room_motion_detection_camera_on] Aaron's room - Motion Detection - Camera - Off: Already running
2024-08-08 04:08:21.258 ERROR (MainThread) [homeassistant.helpers.dispatcher] Exception in handle_camera_update when dispatching 'wyzeapi.camera_updated-GW_GC2_D03F277828EB': (<Device: DeviceTypes.CAMERA, GW_GC2_D03F277828EB>,)
Traceback (most recent call last):
  File "/config/custom_components/wyzeapi/switch.py", line 446, in handle_camera_update
    self.async_write_ha_state()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1005, in async_write_ha_state
    self._async_write_ha_state()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1130, in _async_write_ha_state
    self.__async_calculate_state()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1067, in __async_calculate_state
    state = self._stringify_state(available)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1011, in _stringify_state
    if (state := self.state) is None:
                 ^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1670, in state
    if (is_on := self.is_on) is None:
                 ^^^^^^^^^^
  File "/config/custom_components/wyzeapi/switch.py", line 435, in is_on
    return self._device.motion
           ^^^^^^^^^^^^^^^^^^^
AttributeError: 'Camera' object has no attribute 'motion'

2024-08-08 04:08:22.765 INFO (MainThread) [reolink_aio.api] Reolink Reolink FE ONVIF event channel 0, Motion: False
2024-08-08 04:08:23.177 INFO (MainThread) [reolink_aio.api] Reolink Reolink FE ONVIF event channel 0, Motion: True
2024-08-08 04:08:24.536 INFO (MainThread) [pyhap.hap_protocol] ('192.168.0.193', 56795): Connection made to HASS Bridge
2024-08-08 04:09:55.714 INFO (MainThread) [reolink_aio.api] Reolink Reolink FE ONVIF event channel 0, Motion: False
2024-08-08 04:10:11.811 ERROR (MainThread) [homeassistant.helpers.dispatcher] Exception in handle_camera_update when dispatching 'wyzeapi.camera_updated-GW_GC1_D03F27714375': (<Device: DeviceTypes.CAMERA, GW_GC1_D03F27714375>,)
Traceback (most recent call last):
  File "/config/custom_components/wyzeapi/switch.py", line 446, in handle_camera_update
    self.async_write_ha_state()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1005, in async_write_ha_state
    self._async_write_ha_state()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1130, in _async_write_ha_state
    self.__async_calculate_state()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1067, in __async_calculate_state
    state = self._stringify_state(available)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1011, in _stringify_state
    if (state := self.state) is None:
                 ^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1670, in state
    if (is_on := self.is_on) is None:
                 ^^^^^^^^^^
  File "/config/custom_components/wyzeapi/switch.py", line 435, in is_on
    return self._device.motion
           ^^^^^^^^^^^^^^^^^^^
AttributeError: 'Camera' object has no attribute 'motion'

2024-08-08 04:10:14.236 INFO (MainThread) [reolink_aio.api] Reolink Reolink FE ONVIF event channel 0, Motion: True
2024-08-08 04:10:25.436 WARNING (MainThread) [homeassistant.helpers.entity] Update of fan.willows_air_purifier is taking over 10 seconds
2024-08-08 04:10:27.567 INFO (MainThread) [homeassistant.components.automation.aarons_room_motion_detection_camera_on] Aaron's room - Motion Detection - Camera - Off: Executing step call service
2024-08-08 04:10:27.628 INFO (MainThread) [homeassistant.components.zwave_js.services] Set configuration parameter ConfigurationValue(value_id='2-112-0-3') on Node Node(node_id=2) with value 120
2024-08-08 04:10:27.631 INFO (MainThread) [homeassistant.components.automation.aarons_room_motion_detection_camera_on] Aaron's room - Motion Detection - Camera - Off: If at step 4: Running automation actions
2024-08-08 04:10:27.632 INFO (MainThread) [homeassistant.components.automation.aarons_room_motion_detection_camera_on] Aaron's room - Motion Detection - Camera - Off: If at step 4: Executing step device automation
2024-08-08 04:10:28.692 INFO (MainThread) [homeassistant.components.automation.aarons_room_motion_detection_camera_on] Aaron's room - Motion Detection - Camera - Off: If at step 4: Executing step device automation
2024-08-08 04:10:29.237 INFO (MainThread) [homeassistant.components.automation.aarons_room_motion_detection_camera_on] Aaron's room - Motion Detection - Camera - Off: If at step 4: Executing step call service
2024-08-08 04:10:44.257 INFO (MainThread) [reolink_aio.api] Reolink Reolink FE ONVIF event channel 0, Motion: False
2024-08-08 04:10:50.264 INFO (MainThread) [reolink_aio.api] Reolink Reolink FE ONVIF event channel 0, Motion: True
2024-08-08 04:10:50.528 INFO (MainThread) [pyhap.hap_protocol] ('192.168.0.193', 56800): Connection made to HASS Bridge
2024-08-08 04:10:51.813 INFO (MainThread) [homeassistant.components.automation.multisensor_6_1_motion_detection_logging_on_state] MultiSensor 6 - 1 Motion detection - Logging - On state: Running automation actions
2024-08-08 04:10:51.813 INFO (MainThread) [homeassistant.components.automation.multisensor_6_1_motion_detection_logging_on_state] MultiSensor 6 - 1 Motion detection - Logging - On state: Executing step call service
2024-08-08 04:10:51.824 INFO (MainThread) [homeassistant.components.automation.aarons_room_motion_detection_camera_on] Aaron's room - Motion Detection - Camera - Off: Running automation actions
2024-08-08 04:10:51.826 INFO (MainThread) [homeassistant.components.automation.aarons_room_motion_detection_camera_on] Aaron's room - Motion Detection - Camera - Off: Executing step call service
2024-08-08 04:10:51.894 INFO (MainThread) [homeassistant.components.zwave_js.services] Set configuration parameter ConfigurationValue(value_id='2-112-0-3') on Node Node(node_id=2) with value 10
2024-08-08 04:10:51.896 INFO (MainThread) [homeassistant.components.automation.aarons_room_motion_detection_camera_on] Aaron's room - Motion Detection - Camera - Off: Executing step delay 0:05:00
2024-08-08 04:11:08.402 ERROR (MainThread) [homeassistant.helpers.dispatcher] Exception in handle_camera_update when dispatching 'wyzeapi.camera_updated-AN_RSCW_D03F276641D0': (<Device: DeviceTypes.CAMERA, AN_RSCW_D03F276641D0>,)
Traceback (most recent call last):
  File "/config/custom_components/wyzeapi/switch.py", line 446, in handle_camera_update
    self.async_write_ha_state()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1005, in async_write_ha_state
    self._async_write_ha_state()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1130, in _async_write_ha_state
    self.__async_calculate_state()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1067, in __async_calculate_state
    state = self._stringify_state(available)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1011, in _stringify_state
    if (state := self.state) is None:
                 ^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1670, in state
    if (is_on := self.is_on) is None:
                 ^^^^^^^^^^
  File "/config/custom_components/wyzeapi/switch.py", line 435, in is_on
    return self._device.motion
           ^^^^^^^^^^^^^^^^^^^
AttributeError: 'Camera' object has no attribute 'motion'

2024-08-08 04:11:18.283 INFO (MainThread) [reolink_aio.api] Reolink Reolink FE ONVIF event channel 0, Motion: False
2024-08-08 04:11:32.106 INFO (MainThread) [pyhap.hap_protocol] ('192.168.0.193', 56801): Connection made to HASS Bridge
2024-08-08 04:11:46.165 INFO (MainThread) [reolink_aio.api] Reolink Reolink FE ONVIF event channel 0, Motion: True
2024-08-08 04:11:46.319 INFO (MainThread) [pyhap.hap_protocol] ('192.168.0.193', 56802): Connection made to HASS Bridge
2024-08-08 04:11:57.895 ERROR (MainThread) [homeassistant.helpers.dispatcher] Exception in handle_camera_update when dispatching 'wyzeapi.camera_updated-GW_GC2_D03F277828EB': (<Device: DeviceTypes.CAMERA, GW_GC2_D03F277828EB>,)
Traceback (most recent call last):
  File "/config/custom_components/wyzeapi/switch.py", line 446, in handle_camera_update
    self.async_write_ha_state()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1005, in async_write_ha_state
    self._async_write_ha_state()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1130, in _async_write_ha_state
    self.__async_calculate_state()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1067, in __async_calculate_state
    state = self._stringify_state(available)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1011, in _stringify_state
    if (state := self.state) is None:
                 ^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1670, in state
    if (is_on := self.is_on) is None:
                 ^^^^^^^^^^
  File "/config/custom_components/wyzeapi/switch.py", line 435, in is_on
    return self._device.motion
           ^^^^^^^^^^^^^^^^^^^
AttributeError: 'Camera' object has no attribute 'motion'

2024-08-08 04:12:27.584 INFO (MainThread) [homeassistant.components.automation.multisensor_6_1_motion_detection_logging_on_state] MultiSensor 6 - 1 Motion detection - Logging - On state: Running automation actions
2024-08-08 04:12:27.585 INFO (MainThread) [homeassistant.components.automation.multisensor_6_1_motion_detection_logging_on_state] MultiSensor 6 - 1 Motion detection - Logging - On state: Executing step call service
2024-08-08 04:12:27.594 WARNING (MainThread) [homeassistant.components.automation.aarons_room_motion_detection_camera_on] Aaron's room - Motion Detection - Camera - Off: Already running
2024-08-08 04:12:31.930 INFO (MainThread) [pyhap.hap_protocol] ('192.168.0.193', 56803): Connection made to HASS Bridge
2024-08-08 04:12:39.949 INFO (MainThread) [homeassistant.components.automation.auto_brightness_nanoleaf] Auto brightness - Nanoleaf: Running automation actions
2024-08-08 04:12:39.950 INFO (MainThread) [homeassistant.components.automation.auto_brightness_nanoleaf] Auto brightness - Nanoleaf: Executing step delay 0:00:05
2024-08-08 04:12:47.874 INFO (MainThread) [homeassistant.components.automation.auto_brightness_nanoleaf] Auto brightness - Nanoleaf: Running automation actions
2024-08-08 04:12:47.876 INFO (MainThread) [homeassistant.components.automation.auto_brightness_nanoleaf] Auto brightness - Nanoleaf: Executing step delay 0:00:05
2024-08-08 04:13:29.348 INFO (MainThread) [reolink_aio.api] Reolink Reolink FE ONVIF event channel 0, Motion: False
2024-08-08 04:13:47.856 INFO (MainThread) [reolink_aio.api] Reolink Reolink FE ONVIF event channel 0, Motion: True
2024-08-08 04:13:47.985 INFO (MainThread) [homeassistant.components.automation.multisensor_6_1_motion_detection_logging_on_state] MultiSensor 6 - 1 Motion detection - Logging - On state: Running automation actions
2024-08-08 04:13:47.985 INFO (MainThread) [homeassistant.components.automation.multisensor_6_1_motion_detection_logging_on_state] MultiSensor 6 - 1 Motion detection - Logging - On state: Executing step call service
2024-08-08 04:13:47.994 WARNING (MainThread) [homeassistant.components.automation.aarons_room_motion_detection_camera_on] Aaron's room - Motion Detection - Camera - Off: Already running
2024-08-08 04:14:25.894 INFO (MainThread) [reolink_aio.api] Reolink Reolink FE ONVIF event channel 0, Motion: False
2024-08-08 04:14:31.898 INFO (MainThread) [reolink_aio.api] Reolink Reolink FE ONVIF event channel 0, Motion: True
2024-08-08 04:14:34.410 INFO (MainThread) [reolink_aio.api] Reolink Reolink FE ONVIF event channel 0, Motion: False
2024-08-08 04:14:45.924 INFO (MainThread) [reolink_aio.api] Reolink Reolink FE ONVIF event channel 0, Motion: True
2024-08-08 04:15:00.100 INFO (MainThread) [homeassistant.components.automation.runescape_player_count] RuneScape - Player count: Running automation actions
2024-08-08 04:15:00.101 INFO (MainThread) [homeassistant.components.automation.runescape_player_count] RuneScape - Player count: Executing step setting variables
2024-08-08 04:15:00.102 INFO (MainThread) [homeassistant.components.automation.runescape_player_count] RuneScape - Player count: Skipped disabled step variables
2024-08-08 04:15:00.102 INFO (MainThread) [homeassistant.components.automation.runescape_player_count] RuneScape - Player count: Executing step call service
2024-08-08 04:15:01.057 INFO (MainThread) [homeassistant.components.automation.runescape_player_count] RuneScape - Player count: Executing step delay 0:00:10
2024-08-08 04:15:02.074 INFO (MainThread) [pyhap.hap_protocol] ('192.168.0.193', 56804): Connection made to HASS Bridge
2024-08-08 04:15:02.708 INFO (MainThread) [homeassistant.components.automation.multisensor_6_1_motion_detection_logging_on_state] MultiSensor 6 - 1 Motion detection - Logging - On state: Running automation actions
2024-08-08 04:15:02.709 INFO (MainThread) [homeassistant.components.automation.multisensor_6_1_motion_detection_logging_on_state] MultiSensor 6 - 1 Motion detection - Logging - On state: Executing step call service
2024-08-08 04:15:02.726 WARNING (MainThread) [homeassistant.components.automation.aarons_room_motion_detection_camera_on] Aaron's room - Motion Detection - Camera - Off: Already running
2024-08-08 04:15:11.059 INFO (MainThread) [homeassistant.components.automation.runescape_player_count] RuneScape - Player count: Executing step setting variables
2024-08-08 04:15:11.062 INFO (MainThread) [homeassistant.components.automation.runescape_player_count] RuneScape - Player count: Skipped disabled step variables
2024-08-08 04:15:11.064 INFO (MainThread) [homeassistant.components.automation.runescape_player_count] RuneScape - Player count: Executing step delay 0:00:03
2024-08-08 04:15:12.231 INFO (MainThread) [homeassistant.components.automation.motion_sensor_light_path] Motion sensor - Light path: Running automation actions
2024-08-08 04:15:12.232 INFO (MainThread) [homeassistant.components.automation.motion_sensor_light_path] Motion sensor - Light path: Executing step call service
2024-08-08 04:15:13.188 INFO (MainThread) [homeassistant.components.automation.motion_sensor_light_path] Motion sensor - Light path: Executing step delay 0:00:02
2024-08-08 04:15:14.066 INFO (MainThread) [homeassistant.components.automation.runescape_player_count] RuneScape - Player count: Skipped disabled step if
2024-08-08 04:15:14.068 INFO (MainThread) [homeassistant.components.automation.runescape_player_count] RuneScape - Player count: If at step 9: Running automation actions
2024-08-08 04:15:14.069 INFO (MainThread) [homeassistant.components.automation.runescape_player_count] RuneScape - Player count: If at step 9: Skipped disabled step call_service
2024-08-08 04:15:14.399 INFO (MainThread) [homeassistant.components.automation.auto_brightness_nanoleaf] Auto brightness - Nanoleaf: Running automation actions
2024-08-08 04:15:14.401 INFO (MainThread) [homeassistant.components.automation.auto_brightness_nanoleaf] Auto brightness - Nanoleaf: Executing step delay 0:00:05
2024-08-08 04:15:15.190 INFO (MainThread) [homeassistant.components.automation.motion_sensor_light_path] Motion sensor - Light path: Executing step call service
2024-08-08 04:15:15.861 INFO (MainThread) [homeassistant.components.automation.motion_sensor_light_path] Motion sensor - Light path: Executing step delay 0:00:02
2024-08-08 04:15:17.863 INFO (MainThread) [homeassistant.components.automation.motion_sensor_light_path] Motion sensor - Light path: Executing step call service
2024-08-08 04:15:18.369 INFO (MainThread) [homeassistant.components.automation.motion_sensor_light_path] Motion sensor - Light path: Executing step delay 0:00:02
2024-08-08 04:15:20.372 INFO (MainThread) [homeassistant.components.automation.motion_sensor_light_path] Motion sensor - Light path: Executing step call service
2024-08-08 04:15:20.377 INFO (MainThread) [homeassistant.components.automation.motion_sensor_light_path] Motion sensor - Light path: Executing step delay 0:05:00
2024-08-08 04:15:21.124 ERROR (MainThread) [homeassistant.helpers.dispatcher] Exception in handle_camera_update when dispatching 'wyzeapi.camera_updated-GW_GC2_D03F277828EB': (<Device: DeviceTypes.CAMERA, GW_GC2_D03F277828EB>,)
Traceback (most recent call last):
  File "/config/custom_components/wyzeapi/switch.py", line 446, in handle_camera_update
    self.async_write_ha_state()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1005, in async_write_ha_state
    self._async_write_ha_state()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1130, in _async_write_ha_state
    self.__async_calculate_state()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1067, in __async_calculate_state
    state = self._stringify_state(available)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1011, in _stringify_state
    if (state := self.state) is None:
                 ^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1670, in state
    if (is_on := self.is_on) is None:
                 ^^^^^^^^^^
  File "/config/custom_components/wyzeapi/switch.py", line 435, in is_on
    return self._device.motion
           ^^^^^^^^^^^^^^^^^^^
AttributeError: 'Camera' object has no attribute 'motion'

2024-08-08 04:15:39.977 INFO (MainThread) [pyhap.hap_protocol] ('192.168.0.193', 56805): Connection made to HASS Bridge
2024-08-08 04:15:41.954 INFO (MainThread) [reolink_aio.api] Reolink Reolink FE ONVIF event channel 0, Motion: False
2024-08-08 04:15:51.898 INFO (MainThread) [homeassistant.components.automation.aarons_room_motion_detection_camera_on] Aaron's room - Motion Detection - Camera - Off: Executing step call service
2024-08-08 04:15:51.960 INFO (MainThread) [homeassistant.components.zwave_js.services] Set configuration parameter ConfigurationValue(value_id='2-112-0-3') on Node Node(node_id=2) with value 120
2024-08-08 04:15:51.962 INFO (MainThread) [homeassistant.components.automation.aarons_room_motion_detection_camera_on] Aaron's room - Motion Detection - Camera - Off: If at step 4: Running automation actions
2024-08-08 04:15:51.963 INFO (MainThread) [homeassistant.components.automation.aarons_room_motion_detection_camera_on] Aaron's room - Motion Detection - Camera - Off: If at step 4: Executing step device automation
2024-08-08 04:15:52.512 INFO (MainThread) [homeassistant.components.automation.aarons_room_motion_detection_camera_on] Aaron's room - Motion Detection - Camera - Off: If at step 4: Executing step device automation
2024-08-08 04:15:53.247 INFO (MainThread) [homeassistant.components.automation.aarons_room_motion_detection_camera_on] Aaron's room - Motion Detection - Camera - Off: If at step 4: Executing step call service
2024-08-08 04:16:01.468 INFO (MainThread) [pywizlight.discovery] Discovered bulb 192.168.0.235 with MAC 444f8ec95146
2024-08-08 04:16:01.468 INFO (MainThread) [pywizlight.discovery] Discovered bulb 192.168.0.232 with MAC 444f8e9f0160
2024-08-08 04:16:01.469 INFO (MainThread) [pywizlight.discovery] Discovered bulb 192.168.0.236 with MAC 444f8ec95f60
2024-08-08 04:16:01.469 INFO (MainThread) [pywizlight.discovery] Discovered bulb 192.168.0.233 with MAC 444f8e010c5a
2024-08-08 04:16:01.469 INFO (MainThread) [pywizlight.discovery] Discovered bulb 192.168.0.237 with MAC 444f8e9cf32c
2024-08-08 04:16:01.469 INFO (MainThread) [pywizlight.discovery] Discovered bulb 192.168.0.234 with MAC 444f8ec96080
2024-08-08 04:16:09.830 INFO (MainThread) [homeassistant.components.automation.auto_brightness_nanoleaf] Auto brightness - Nanoleaf: Running automation actions
2024-08-08 04:16:09.832 INFO (MainThread) [homeassistant.components.automation.auto_brightness_nanoleaf] Auto brightness - Nanoleaf: Executing step delay 0:00:05
2024-08-08 04:17:30.486 INFO (MainThread) [reolink_aio.api] Reolink Reolink FE ONVIF event channel 0, Motion: True
2024-08-08 04:17:56.505 INFO (MainThread) [reolink_aio.api] Reolink Reolink FE ONVIF event channel 0, Motion: False
2024-08-08 04:18:05.017 INFO (MainThread) [reolink_aio.api] Reolink Reolink FE ONVIF event channel 0, Motion: True
2024-08-08 04:18:20.647 ERROR (MainThread) [homeassistant.helpers.dispatcher] Exception in handle_camera_update when dispatching 'wyzeapi.camera_updated-GW_GC2_D03F277828EB': (<Device: DeviceTypes.CAMERA, GW_GC2_D03F277828EB>,)
Traceback (most recent call last):
  File "/config/custom_components/wyzeapi/switch.py", line 446, in handle_camera_update
    self.async_write_ha_state()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1005, in async_write_ha_state
    self._async_write_ha_state()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1130, in _async_write_ha_state
    self.__async_calculate_state()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1067, in __async_calculate_state
    state = self._stringify_state(available)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1011, in _stringify_state
    if (state := self.state) is None:
                 ^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1670, in state
    if (is_on := self.is_on) is None:
                 ^^^^^^^^^^
  File "/config/custom_components/wyzeapi/switch.py", line 435, in is_on
    return self._device.motion
           ^^^^^^^^^^^^^^^^^^^
AttributeError: 'Camera' object has no attribute 'motion'

2024-08-08 04:18:34.536 INFO (MainThread) [reolink_aio.api] Reolink Reolink FE ONVIF event channel 0, Motion: False
2024-08-08 04:18:53.039 INFO (MainThread) [reolink_aio.api] Reolink Reolink FE ONVIF event channel 0, Motion: True
2024-08-08 04:19:15.071 INFO (MainThread) [reolink_aio.api] Reolink Reolink FE ONVIF event channel 0, Motion: False
2024-08-08 04:19:35.585 INFO (MainThread) [reolink_aio.api] Reolink Reolink FE ONVIF event channel 0, Motion: True
2024-08-08 04:19:40.829 INFO (MainThread) [homeassistant.components.automation.multisensor_6_1_motion_detection_logging_on_state] MultiSensor 6 - 1 Motion detection - Logging - On state: Running automation actions
2024-08-08 04:19:40.830 INFO (MainThread) [homeassistant.components.automation.multisensor_6_1_motion_detection_logging_on_state] MultiSensor 6 - 1 Motion detection - Logging - On state: Executing step call service
2024-08-08 04:19:40.840 INFO (MainThread) [homeassistant.components.automation.aarons_room_motion_detection_camera_on] Aaron's room - Motion Detection - Camera - Off: Running automation actions
2024-08-08 04:19:40.840 INFO (MainThread) [homeassistant.components.automation.aarons_room_motion_detection_camera_on] Aaron's room - Motion Detection - Camera - Off: Executing step call service
2024-08-08 04:19:40.906 INFO (MainThread) [homeassistant.components.zwave_js.services] Set configuration parameter ConfigurationValue(value_id='2-112-0-3') on Node Node(node_id=2) with value 10
2024-08-08 04:19:40.907 INFO (MainThread) [homeassistant.components.automation.aarons_room_motion_detection_camera_on] Aaron's room - Motion Detection - Camera - Off: Executing step delay 0:05:00
2024-08-08 04:20:07.788 ERROR (Thread-33) [pychromecast.socket_client] [Aaron's Bedroom Display(192.168.0.30):8009] Error reading from socket.
2024-08-08 04:20:07.789 WARNING (Thread-33) [pychromecast.socket_client] [Aaron's Bedroom Display(192.168.0.30):8009] Error communicating with socket, resetting connection
2024-08-08 04:20:07.789 INFO (Thread-33) [pychromecast.controllers] Receiver:channel_disconnected
2024-08-08 04:20:07.824 ERROR (Thread-33) [pychromecast.socket_client] [Aaron's Bedroom Display(192.168.0.30):8009] Failed to connect to service HostServiceInfo(host='192.168.0.30', port=8009), retrying in 5.0s
2024-08-08 04:20:11.493 ERROR (MainThread) [homeassistant.helpers.dispatcher] Exception in handle_camera_update when dispatching 'wyzeapi.camera_updated-GW_GC1_D03F27714375': (<Device: DeviceTypes.CAMERA, GW_GC1_D03F27714375>,)

Additional information

I am willing to provide my DB (privately) to someone who can look into / fix the issue, but it is rather large.

Zunhammer commented 1 month ago

Same for me

bsegers73 commented 1 month ago

same for me. Updated to 2024.8 and it went even worse, so I used the backup to get back to 2024.7. Database is 11Gb and I'm trying to purge it to get it much smaller. After the normal purge at 4.11AM the logbook is not writing anymore. The only thing what worked is restart HA. After update to 2024.8 also the restart didn't work anymore, so get back to 2024.7 I tried also to purge manually but that also hangs the logbook and have to restart.

Zunhammer commented 1 month ago

A restart temporarily fixes it for me until the next day still in 2024.8. So I stay on 2024.8 but disabled auto pruge again until fixed.

home-assistant[bot] commented 1 month ago

Hey there @home-assistant/core, mind taking a look at this issue as it has been labeled with an integration (recorder) you are listed as a code owner for? Thanks!

Code owner commands Code owners of `recorder` 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 recorder` 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)


recorder documentation recorder source (message by IssueLinks)

bdraco commented 1 month ago

The safest way is to do a backup, than extract all the home-assistant_v2.db* files and send them in a compressed zip or tarball. I can put them into a test instance and than see if I can replicate the purge problem, or if a prior migration was unsuccessful, find the reason why.

You can share to my dropbox as nick@koston.org or gdrive as bdraco@gmail.com

talormanda commented 1 month ago

The safest way is to do a backup, than extract all the home-assistant_v2.db* files and send them in a compressed zip or tarball. I can put them into a test instance and than see if I can replicate the purge problem, or if a prior migration was unsuccessful, find the reason why.

You can share to my dropbox as nick@koston.org or gdrive as bdraco@gmail.com

Will get this ready and reply soon. Is there any compromise to my account(s) / security by handing this over?

bdraco commented 1 month ago

Unless you are storing passwords in the state machine (HA goes out of the way to prevent this in code reviews), the most worrisome thing in the database is likely GPS coordinates (likely the same as every app on your phone with location permissions)

talormanda commented 1 month ago

Unless you are storing passwords in the state machine (HA goes out of the way to prevent this in code reviews), the most worrisome thing in the database is likely GPS coordinates (likely the same as every app on your phone with location permissions)

The file has been uploaded and shared.

bdraco commented 1 month ago

I'll take a look after lunch. I'm working on getting a new aiohttp release done right now.

bdraco commented 1 month ago

It looks like it attempted to rebuild the table in database 4x and failed every time. The foreign key FOREIGN KEY(event_id) REFERENCES events (event_id) ON DELETE CASCADE, that causes the issue remains.

Before I start trying to figure out why the table rebuild failed, can you confirm how much free disk space you have?

talormanda commented 1 month ago

It looks like it attempted to rebuild the table in database 4x and failed every time. The foreign key FOREIGN KEY(event_id) REFERENCES events (event_id) ON DELETE CASCADE, that causes the issue remains.

Before I start trying to figure out why the table rebuild failed, can you confirm how much free disk space you have?

image

bdraco commented 1 month ago

17G home-assistant_v2.db https://www.home-assistant.io/integrations/recorder/#disk-space-requirements

Its likely unable to rebuild the table because its running out of disk space. To do a table rebuild, it has to create a temporary copy, and than replace the original table.

talormanda commented 1 month ago

I can try to move everything to another device where I have more storage allocated. Keep in mind before all this happened though, my DB was much smaller before. It only got this large because of the issue.

With that said, I can clone my VM and move it to another system where I can provide it more storage. Would you be able to tell me which recorder purge settings I need to run? image

bdraco commented 1 month ago

I'll load it up after lunch and make sure it does try to rebuild it again. You should have an error every time you startup in the log that it fails to migrate. I take it you don't so there might be something else wrong as well.

bdraco commented 1 month ago

There was another change in #122069 which made the change I made in #121938 ineffective so it is not trying to migrate it again.

I'll need to work out a solution.

giacomo892 commented 1 month ago

@bdraco sent an email with my db too which is affected by the issue. thanks

bdraco commented 1 month ago

@bdraco sent an email with my db too which is affected by the issue. thanks

Good news is its the same issue.

I'm working on a fix in https://github.com/home-assistant/core/pull/123388

bsegers73 commented 1 month ago

My core-log gives the following error: Could it be the same problem? Database is 11Gb and 41Gb free.

2024-08-08 19:14:08.298 ERROR (MainThread) [supervisor.host.logs] No systemd-journal-gatewayd Unix socket available
2024-08-08 19:14:08.299 ERROR (MainThread) [supervisor.api] Failed to get supervisor logs using advanced_logs API
Traceback (most recent call last):
  File "/usr/src/supervisor/supervisor/api/__init__.py", line 404, in get_supervisor_logs
    return await self._api_host.advanced_logs_handler(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/supervisor/supervisor/api/host.py", line 233, in advanced_logs_handler
    async with self.sys_host.logs.journald_logs(
  File "/usr/local/lib/python3.12/contextlib.py", line 210, in __aenter__
    return await anext(self.gen)
           ^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/supervisor/supervisor/host/logs.py", line 143, in journald_logs
    raise HostNotSupportedError(
supervisor.exceptions.HostNotSupportedError: No systemd-journal-gatewayd Unix socket available
2024-08-08 19:20:14.596 ERROR (MainThread) [supervisor.host.logs] No systemd-journal-gatewayd Unix socket available
2024-08-08 19:20:14.596 ERROR (MainThread) [supervisor.api] Failed to get supervisor logs using advanced_logs API
Traceback (most recent call last):
  File "/usr/src/supervisor/supervisor/api/__init__.py", line 404, in get_supervisor_logs
    return await self._api_host.advanced_logs_handler(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/supervisor/supervisor/api/host.py", line 233, in advanced_logs_handler
    async with self.sys_host.logs.journald_logs(
  File "/usr/local/lib/python3.12/contextlib.py", line 210, in __aenter__
    return await anext(self.gen)
           ^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/supervisor/supervisor/host/logs.py", line 143, in journald_logs
    raise HostNotSupportedError(
supervisor.exceptions.HostNotSupportedError: No systemd-journal-gatewayd Unix socket available
2024-08-08 19:20:14.821 ERROR (MainThread) [supervisor.host.logs] No systemd-journal-gatewayd Unix socket available
2024-08-08 19:20:14.821 ERROR (MainThread) [supervisor.api] Failed to get supervisor logs using advanced_logs API
Traceback (most recent call last):
  File "/usr/src/supervisor/supervisor/api/__init__.py", line 404, in get_supervisor_logs
    return await self._api_host.advanced_logs_handler(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/supervisor/supervisor/api/host.py", line 233, in advanced_logs_handler
    async with self.sys_host.logs.journald_logs(
  File "/usr/local/lib/python3.12/contextlib.py", line 210, in __aenter__
    return await anext(self.gen)
           ^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/supervisor/supervisor/host/logs.py", line 143, in journald_logs
    raise HostNotSupportedError(
supervisor.exceptions.HostNotSupportedError: No systemd-journal-gatewayd Unix socket available
2024-08-08 19:23:12.658 INFO (MainThread) [supervisor.resolution.check] Starting system checks with state running
2024-08-08 19:23:12.658 INFO (MainThread) [supervisor.resolution.checks.base] Run check for docker_config/system
2024-08-08 19:23:12.659 INFO (MainThread) [supervisor.resolution.checks.base] Run check for dns_server_failed/dns_server
2024-08-08 19:23:12.743 INFO (MainThread) [supervisor.resolution.checks.base] Run check for no_current_backup/system
2024-08-08 19:23:12.743 INFO (MainThread) [supervisor.resolution.checks.base] Run check for dns_server_ipv6_error/dns_server
2024-08-08 19:23:12.744 INFO (MainThread) [supervisor.resolution.checks.base] Run check for disabled_data_disk/system
2024-08-08 19:23:12.744 INFO (MainThread) [supervisor.resolution.checks.base] Run check for pwned/addon
2024-08-08 19:23:12.745 INFO (MainThread) [supervisor.resolution.checks.base] Run check for ipv4_connection_problem/system
2024-08-08 19:23:12.745 INFO (MainThread) [supervisor.resolution.checks.base] Run check for multiple_data_disks/system
2024-08-08 19:23:12.745 INFO (MainThread) [supervisor.resolution.checks.base] Run check for free_space/system
2024-08-08 19:23:12.745 INFO (MainThread) [supervisor.resolution.checks.base] Run check for security/core
2024-08-08 19:23:12.747 INFO (MainThread) [supervisor.resolution.checks.base] Run check for trust/supervisor
2024-08-08 19:23:12.823 INFO (MainThread) [supervisor.resolution.check] System checks complete
2024-08-08 19:23:12.824 INFO (MainThread) [supervisor.resolution.evaluate] Starting system evaluation with state running
2024-08-08 19:23:13.631 INFO (MainThread) [supervisor.resolution.evaluate] System evaluation complete
2024-08-08 19:23:13.632 INFO (MainThread) [supervisor.resolution.fixup] Starting system autofix at state running
2024-08-08 19:23:13.632 INFO (MainThread) [supervisor.resolution.fixup] System autofix complete
2024-08-08 19:25:45.659 INFO (MainThread) [supervisor.updater] Fetching update data from https://version.home-assistant.io/stable.json
2024-08-08 19:25:46.104 INFO (MainThread) [supervisor.jobs] 'MountManager.reload' blocked from execution, mounting not supported on system
2024-08-08 19:25:54.104 INFO (MainThread) [supervisor.homeassistant.api] Updated Home Assistant API token
2024-08-08 19:25:55.316 INFO (MainThread) [supervisor.store.git] Update add-on https://github.com/brenner-tobias/ha-addons repository
2024-08-08 19:25:55.405 INFO (MainThread) [supervisor.store.git] Update add-on https://github.com/egguy/grott-home-assistant-add-on repository
2024-08-08 19:25:55.420 INFO (MainThread) [supervisor.store.git] Update add-on https://github.com/jehy/hass-addons repository
2024-08-08 19:25:55.437 INFO (MainThread) [supervisor.store.git] Update add-on https://github.com/music-assistant/home-assistant-addon repository
2024-08-08 19:25:55.476 INFO (MainThread) [supervisor.store.git] Update add-on https://github.com/zigbee2mqtt/hassio-zigbee2mqtt repository
2024-08-08 19:25:55.507 INFO (MainThread) [supervisor.store.git] Update add-on https://github.com/sabeechen/hassio-google-drive-backup repository
2024-08-08 19:25:55.570 INFO (MainThread) [supervisor.store.git] Update add-on https://github.com/esphome/home-assistant-addon repository
2024-08-08 19:25:55.590 INFO (MainThread) [supervisor.store.git] Update add-on https://github.com/home-assistant/addons repository
2024-08-08 19:25:55.637 INFO (MainThread) [supervisor.store.git] Update add-on https://github.com/hassio-addons/repository repository
2024-08-08 19:26:03.635 INFO (MainThread) [supervisor.store] Loading add-ons from store: 89 all - 0 new - 0 remove
2024-08-08 19:26:03.635 INFO (MainThread) [supervisor.store] Loading add-ons from store: 89 all - 0 new - 0 remove
2024-08-08 19:26:47.825 ERROR (MainThread) [supervisor.host.logs] No systemd-journal-gatewayd Unix socket available
2024-08-08 19:26:47.825 ERROR (MainThread) [supervisor.api] Failed to get supervisor logs using advanced_logs API
Traceback (most recent call last):
  File "/usr/src/supervisor/supervisor/api/__init__.py", line 404, in get_supervisor_logs
    return await self._api_host.advanced_logs_handler(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/supervisor/supervisor/api/host.py", line 233, in advanced_logs_handler
    async with self.sys_host.logs.journald_logs(
  File "/usr/local/lib/python3.12/contextlib.py", line 210, in __aenter__
    return await anext(self.gen)
           ^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/supervisor/supervisor/host/logs.py", line 143, in journald_logs
    raise HostNotSupportedError(
supervisor.exceptions.HostNotSupportedError: No systemd-journal-gatewayd Unix socket available
2024-08-08 19:26:48.214 ERROR (MainThread) [supervisor.host.logs] No systemd-journal-gatewayd Unix socket available
2024-08-08 19:26:48.214 ERROR (MainThread) [supervisor.api] Failed to get supervisor logs using advanced_logs API
Traceback (most recent call last):
  File "/usr/src/supervisor/supervisor/api/__init__.py", line 404, in get_supervisor_logs
    return await self._api_host.advanced_logs_handler(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/supervisor/supervisor/api/host.py", line 233, in advanced_logs_handler
    async with self.sys_host.logs.journald_logs(
  File "/usr/local/lib/python3.12/contextlib.py", line 210, in __aenter__
    return await anext(self.gen)
           ^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/supervisor/supervisor/host/logs.py", line 143, in journald_logs
    raise HostNotSupportedError(
supervisor.exceptions.HostNotSupportedError: No systemd-journal-gatewayd Unix socket available
bdraco commented 1 month ago

My core-log gives the following error: Could it be the same problem?

Might be a different problem. Its not really possible to know without examining the database.

ivanfmartinez commented 1 month ago

@bdraco my database is very large now, more than 46GB (configured for 10 days), it does not lock the recorder, but apparently it does not pack. I still trying to understand.

I don´t know if my database fits in this case about failed migrations.

I have found that states_attributes is very large, with lot of data that are not used, maybe this big size I and others are having is related to this table contents.

I found tha recorder have a way to remove attributes, https://github.com/home-assistant/core/blob/c3ab72a1f9753070f8258695ee4caa28b21b03da/homeassistant/components/recorder/db_schema.py#L588 but apparently its only available for integrations, not for user configuration. Making this configurable is on the roadmap ?

Sn4k3E4t3r commented 1 month ago

Same problem. From 2024.7.2 on i have no reporter anymore. So i set the Value "recorder: auto_purge: false" i have an 40GB Database....

bdraco commented 1 month ago

If you have the issue, please share your database using the instructions above https://github.com/home-assistant/core/issues/123348#issuecomment-2276106936

If you don't want to share your database, please don't post me too comments as they notify everyone on this issue. Instead give the issue a 👍 in the opening text above.

bsegers73 commented 1 month ago

The safest way is to do a backup, than extract all the home-assistant_v2.db* files and send them in a compressed zip or tarball. I can put them into a test instance and than see if I can replicate the purge problem, or if a prior migration was unsuccessful, find the reason why.

You can share to my dropbox as nick@koston.org or gdrive as bdraco@gmail.com

See the email. Curious what it could be.

bdraco commented 1 month ago

The safest way is to do a backup, than extract all the home-assistant_v2.db* files and send them in a compressed zip or tarball. I can put them into a test instance and than see if I can replicate the purge problem, or if a prior migration was unsuccessful, find the reason why. You can share to my dropbox as nick@koston.org or gdrive as bdraco@gmail.com

See the email. Curious what it could be.

Good news. Its also the same issue

FOREIGN KEY(event_id) REFERENCES events (event_id) ON DELETE CASCADE,

https://github.com/home-assistant/core/pull/123388 is ready for review now so hopefully we can get it sorted in 2024.8.1

be sure to check https://www.home-assistant.io/integrations/recorder/#disk-space-requirements before updating

talormanda commented 1 month ago

How can we tell when this will be pushed to the next update?

bdraco commented 1 month ago

You can watch the milestone https://github.com/home-assistant/core/milestone/685

The date may change but its currently scheduled for today

bdraco commented 1 month ago

Please be sure your system meets the disk space requirements before updating to 2024.8.1

https://www.home-assistant.io/integrations/recorder/#disk-space-requirements

As there are multiple issue threads going, and your comments will likely be missed otherwise, please continue at https://community.home-assistant.io/t/psa-2024-7-recorder-problems/746428