Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Bug: HASS.Agent POTENTIALLY Causing Fatal HA Crash. #424

Open
2 of 4 tasks
Anon666333 opened this issue Sep 17, 2024 · 7 comments
Open
2 of 4 tasks

Bug: HASS.Agent POTENTIALLY Causing Fatal HA Crash. #424

Anon666333 opened this issue Sep 17, 2024 · 7 comments

Comments

@Anon666333
Copy link

Anon666333 commented Sep 17, 2024

Describe the bug
I want to start off with saying I do not use HASS Agent for media player requests, as this is an open bug.
I'm only syncing sensors from my PC to HA, and have a couple quick action scripts mapped to macro keys,
Sensors that are syncing:

  • Current Volume
  • Last Boot
  • Geolocation
  • GPU Load
  • Memory Usage
  • Webcam Active
  • Session State
  • Microphone Active
  • Webcam Process
  • Microphone Process
  • Storage
  • Network
  • Windows Updates

To Reproduce
I'm honestly not sure, and this is what's frustrating. There is no consistency, other than the same errors showing up in the logs just before HA crashes and restarts.
I've been trying to figure out why HA is crashing and the best I have narrowed it down to is these errors, but I can't seem to understand why.

Expected behavior
To not crash HA.

Misc info (please complete the following information):

  • Windows build (ideally screenshot/info of winver.exe output):
    image
  • Windows' UI language: English
  • HASS.Agent version: 2022.14.0

Please check what's applicable (multiple answers possible):

  • Installed via installer
  • Installed manually
  • Problem occurs in HASS.Agent
  • Problem occurs in Satellite Service

Additional context
HA has been running fine, so has HASS.Agent, however, HA has been restarting unexpectedly, so I've been digging through the logs to figure out why this would be happening.
I've come to the conclusion, after weeding out other options, that HASS.Agent may be the culprit, though I'm not entirely sure.

Logs
Home assistant log:

2024-09-17 16:30:21.533 WARNING (SyncWorker_24) [homeassistant.helpers.frame] Detected that custom integration 'hass_agent' calls device_registry.async_update_device from a thread other than the event loop, which may cause Home Assistant to crash or data to corrupt. For more information, see https://developers.home-assistant.io/docs/asyncio_thread_safety/#device_registryasync_update_device at custom_components/hass_agent/__init__.py, line 29: device_registry.async_get_or_create(, please report it to the author of the 'hass_agent' custom integration
2024-09-17 16:30:21.556 ERROR (SyncWorker_24) [homeassistant.util.logging] Exception in updated when handling msg on 'hass.agent/devices/GHOST': '{"serial_number":"xxxxxxxxxxxxxxxxxxxx","device":{"identifiers":"hass.agent-GHOST","manufacturer":"LAB02 Research","model":"Microsoft Windows NT 10.0.19045.0","name":"GHOST","sw_version":"2022.14.0"},"apis":{"notifications":true,"media_player":true}}'
Traceback (most recent call last):
  File "/config/custom_components/hass_agent/__init__.py", line 144, in updated
    update_device_info(hass, entry, payload)
  File "/config/custom_components/hass_agent/__init__.py", line 29, in update_device_info
    device_registry.async_get_or_create(
  File "/usr/src/homeassistant/homeassistant/helpers/device_registry.py", line 834, in async_get_or_create
    device = self.async_update_device(
             ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/device_registry.py", line 1066, in async_update_device
    self.hass.verify_event_loop_thread("device_registry.async_update_device")
  File "/usr/src/homeassistant/homeassistant/core.py", line 462, in verify_event_loop_thread
    frame.report_non_thread_safe_operation(what)
  File "/usr/src/homeassistant/homeassistant/helpers/frame.py", line 225, in report_non_thread_safe_operation
    report(
  File "/usr/src/homeassistant/homeassistant/helpers/frame.py", line 159, in report
    _report_integration(what, integration_frame, level, error_if_integration)
  File "/usr/src/homeassistant/homeassistant/helpers/frame.py", line 197, in _report_integration
    raise RuntimeError(
RuntimeError: Detected that custom integration 'hass_agent' calls device_registry.async_update_device from a thread other than the event loop, which may cause Home Assistant to crash or data to corrupt. For more information, see https://developers.home-assistant.io/docs/asyncio_thread_safety/#device_registryasync_update_device at custom_components/hass_agent/__init__.py, line 29: device_registry.async_get_or_create(. Please report it to the author of the 'hass_agent' custom integration.

2024-09-17 16:30:51.571 WARNING (SyncWorker_9) [homeassistant.helpers.frame] Detected that custom integration 'hass_agent' calls device_registry.async_update_device from a thread other than the event loop, which may cause Home Assistant to crash or data to corrupt. For more information, see https://developers.home-assistant.io/docs/asyncio_thread_safety/#device_registryasync_update_device at custom_components/hass_agent/__init__.py, line 29: device_registry.async_get_or_create(, please report it to the author of the 'hass_agent' custom integration
2024-09-17 16:30:51.599 ERROR (SyncWorker_9) [homeassistant.util.logging] Exception in updated when handling msg on 'hass.agent/devices/GHOST': '{"serial_number":"xxxxxxxxxxxxxxxxx","device":{"identifiers":"hass.agent-GHOST","manufacturer":"LAB02 Research","model":"Microsoft Windows NT 10.0.19045.0","name":"GHOST","sw_version":"2022.14.0"},"apis":{"notifications":true,"media_player":true}}'
Traceback (most recent call last):
  File "/config/custom_components/hass_agent/__init__.py", line 144, in updated
    update_device_info(hass, entry, payload)
  File "/config/custom_components/hass_agent/__init__.py", line 29, in update_device_info
    device_registry.async_get_or_create(
  File "/usr/src/homeassistant/homeassistant/helpers/device_registry.py", line 834, in async_get_or_create
    device = self.async_update_device(
             ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/device_registry.py", line 1066, in async_update_device
    self.hass.verify_event_loop_thread("device_registry.async_update_device")
  File "/usr/src/homeassistant/homeassistant/core.py", line 462, in verify_event_loop_thread
    frame.report_non_thread_safe_operation(what)
  File "/usr/src/homeassistant/homeassistant/helpers/frame.py", line 225, in report_non_thread_safe_operation
    report(
  File "/usr/src/homeassistant/homeassistant/helpers/frame.py", line 159, in report
    _report_integration(what, integration_frame, level, error_if_integration)
  File "/usr/src/homeassistant/homeassistant/helpers/frame.py", line 197, in _report_integration
    raise RuntimeError(
RuntimeError: Detected that custom integration 'hass_agent' calls device_registry.async_update_device from a thread other than the event loop, which may cause Home Assistant to crash or data to corrupt. For more information, see https://developers.home-assistant.io/docs/asyncio_thread_safety/#device_registryasync_update_device at custom_components/hass_agent/__init__.py, line 29: device_registry.async_get_or_create(. Please report it to the author of the 'hass_agent' custom integration.

HASS.Agent Log (Unfortunately this is all that was there):

2024-09-17 07:29:45.642 -04:00 [INF] [SYSTEMSTATE] Session resuming
2024-09-17 07:29:54.849 -04:00 [WRN] [MQTT] Disconnected: UnspecifiedError
2024-09-17 07:29:54.850 -04:00 [ERR] [MQTT] Error while connecting: Error while connecting with host 'xxx.xxx.xxx.xx:1883'.
2024-09-17 07:29:56.355 -04:00 [FTL] [HASS_API] Error while fetching HA config: A socket operation was attempted to an unreachable network. (xxx.xxx.xxx.xx:8123)
2024-09-17 07:29:59.437 -04:00 [INF] [HASS_API] Server recovered from failed state
2024-09-17 07:29:59.868 -04:00 [INF] [MQTT] Connected
2024-09-17 16:31:49.520 -04:00 [INF] [HASS_API] Server recovered from failed state
2024-09-17 16:31:49.538 -04:00 [WRN] [HASS_API] Server returned 404 (not found) while getting entity state. This can happen after a server reboot, or if you've deleted the entity. If the problem persists, please file a ticket on github.
Entity: switch.coffee_heater
Error message: Response status code does not indicate success: 404 (Not Found).
2024-09-17 16:31:49.544 -04:00 [WRN] [HASS_API] Server returned 404 (not found) while getting entity state. This can happen after a server reboot, or if you've deleted the entity. If the problem persists, please file a ticket on github.
Entity: scene.office_lights_work_day
Error message: Response status code does not indicate success: 404 (Not Found).
2024-09-17 16:31:49.549 -04:00 [WRN] [HASS_API] Server returned 404 (not found) while getting entity state. This can happen after a server reboot, or if you've deleted the entity. If the problem persists, please file a ticket on github.
Entity: scene.office_lights_weekend
Error message: Response status code does not indicate success: 404 (Not Found).
2024-09-17 16:31:49.555 -04:00 [WRN] [HASS_API] Server returned 404 (not found) while getting entity state. This can happen after a server reboot, or if you've deleted the entity. If the problem persists, please file a ticket on github.
Entity: inputboolean.kill_switch_office_lights
Error message: Response status code does not indicate success: 404 (Not Found).
2024-09-17 16:31:49.560 -04:00 [WRN] [HASS_API] Server returned 404 (not found) while getting entity state. This can happen after a server reboot, or if you've deleted the entity. If the problem persists, please file a ticket on github.
Entity: script.matt_ai_calendar_events
Error message: Response status code does not indicate success: 404 (Not Found).
2024-09-17 17:29:04.337 -04:00 [INF] [SETTINGS] Configuration stored
2024-09-17 17:29:07.750 -04:00 [INF] [SYSTEM] Application shutting down
2024-09-17 17:29:07.756 -04:00 [INF] [MQTT] Disconnected
2024-09-17 17:29:07.826 -04:00 [INF] [SYSTEM] Application shutdown complete

There were no logs for this timeframe for the Satellite Service, however, this is from a previous day which follows the same pattern.

2024-09-16 06:56:47.085 -04:00 [INF] [MAIN] Version: 2022.20.0.0
2024-09-16 06:56:47.164 -04:00 [INF] [MAIN] Service started, initializing ..
2024-09-16 06:56:47.528 -04:00 [INF] [MAIN] Running as a service, initializing lifetime manager
2024-09-16 06:56:47.625 -04:00 [INF] [LIFETIMEMANAGER] Initialized
2024-09-16 06:56:47.801 -04:00 [INF] [WORKER] Startup completed, commencing execution ..
2024-09-16 06:56:47.804 -04:00 [INF] [SETTINGS] Config storage path: C:\Program Files (x86)\LAB02 Research\HASS.Agent Satellite Service\config
2024-09-16 06:56:48.205 -04:00 [INF] [SETTINGS] Configuration loaded
2024-09-16 06:56:48.214 -04:00 [INF] [SETTINGS] MQTT configuration loaded
2024-09-16 06:56:48.215 -04:00 [INF] [SETTINGS_COMMANDS] Config not found, no entities loaded
2024-09-16 06:56:48.217 -04:00 [INF] [SETTINGS_SENSORS] Config not found, no entities loaded
2024-09-16 06:56:48.231 -04:00 [INF] [MQTT] Identifying as device: GHOST-satellite
2024-09-16 06:56:48.251 -04:00 [INF] Application started. Hosting environment: Production; Content root path: C:\Program Files (x86)\LAB02 Research\HASS.Agent Satellite Service\
2024-09-16 06:56:48.316 -04:00 [INF] [MQTT] Connecting ..
2024-09-16 06:56:48.357 -04:00 [INF] [RPCMANAGER] Listening
2024-09-16 06:56:48.533 -04:00 [INF] [MQTT] Connected
2024-09-16 06:56:50.344 -04:00 [INF] [MQTT] Initial registration completed
2024-09-16 10:31:23.308 -04:00 [WRN] [MQTT] Disconnected: NormalDisconnection
2024-09-16 10:31:34.074 -04:00 [FTL] [MQTT] Error while connecting: Error while authenticating. Exception of type 'MQTTnet.Exceptions.MqttCommunicationTimedOutException' was thrown.
MQTTnet.Adapter.MqttConnectingFailedException: Error while authenticating. Exception of type 'MQTTnet.Exceptions.MqttCommunicationTimedOutException' was thrown.
 ---> MQTTnet.Exceptions.MqttCommunicationTimedOutException: Exception of type 'MQTTnet.Exceptions.MqttCommunicationTimedOutException' was thrown.
   at MQTTnet.PacketDispatcher.MqttPacketAwaitable`1.WaitOneAsync(TimeSpan timeout)
   at MQTTnet.Client.MqttClient.SendAndReceiveAsync[TResponsePacket](MqttBasePacket requestPacket, CancellationToken cancellationToken)
   at MQTTnet.Client.MqttClient.AuthenticateAsync(IMqttChannelAdapter channelAdapter, MqttApplicationMessage willApplicationMessage, CancellationToken cancellationToken)
   --- End of inner exception stack trace ---
   at MQTTnet.Client.MqttClient.AuthenticateAsync(IMqttChannelAdapter channelAdapter, MqttApplicationMessage willApplicationMessage, CancellationToken cancellationToken)
   at MQTTnet.Client.MqttClient.ConnectAsync(IMqttClientOptions options, CancellationToken cancellationToken)
   at MQTTnet.Client.MqttClient.ConnectAsync(IMqttClientOptions options, CancellationToken cancellationToken)
   at MQTTnet.Extensions.ManagedClient.ManagedMqttClient.ReconnectIfRequiredAsync(CancellationToken cancellationToken)
2024-09-16 10:32:52.077 -04:00 [INF] [MQTT] Connected
2024-09-16 10:32:56.257 -04:00 [WRN] [MQTT] Disconnected: UnspecifiedError
2024-09-16 10:32:56.257 -04:00 [FTL] [MQTT] Error while connecting: Error while connecting with host 'xxx.xxx.xxx.xx:1883'.
MQTTnet.Exceptions.MqttCommunicationException: Error while connecting with host 'xxx.xxx.xxx.xx:1883'.
 ---> System.Net.Sockets.SocketException (10061): No connection could be made because the target machine actively refused it.
   at System.Net.Sockets.Socket.AwaitableSocketAsyncEventArgs.ThrowException(SocketError error, CancellationToken cancellationToken)
   at System.Net.Sockets.Socket.AwaitableSocketAsyncEventArgs.System.Threading.Tasks.Sources.IValueTaskSource.GetResult(Int16 token)
   at System.Threading.Tasks.ValueTask.ValueTaskSourceAsTask.<>c.<.cctor>b__4_0(Object state)
--- End of stack trace from previous location ---
   at MQTTnet.Implementations.CrossPlatformSocket.ConnectAsync(String host, Int32 port, CancellationToken cancellationToken)
   --- End of inner exception stack trace ---
   at MQTTnet.Implementations.CrossPlatformSocket.ConnectAsync(String host, Int32 port, CancellationToken cancellationToken)
   at MQTTnet.Implementations.MqttTcpChannel.ConnectAsync(CancellationToken cancellationToken)
   at MQTTnet.Internal.MqttTaskTimeout.WaitAsync(Func`2 action, TimeSpan timeout, CancellationToken cancellationToken)
   at MQTTnet.Adapter.MqttChannelAdapter.ConnectAsync(TimeSpan timeout, CancellationToken cancellationToken)
   at MQTTnet.Client.MqttClient.ConnectAsync(IMqttClientOptions options, CancellationToken cancellationToken)
   at MQTTnet.Client.MqttClient.ConnectAsync(IMqttClientOptions options, CancellationToken cancellationToken)
   at MQTTnet.Extensions.ManagedClient.ManagedMqttClient.ReconnectIfRequiredAsync(CancellationToken cancellationToken)
2024-09-16 16:55:12.779 -04:00 [INF] [MAIN] Version: 2022.20.0.0
2024-09-16 16:55:12.816 -04:00 [INF] [MAIN] Service started, initializing ..
2024-09-16 16:55:13.092 -04:00 [INF] [MAIN] Running as a service, initializing lifetime manager
2024-09-16 16:55:13.205 -04:00 [INF] [LIFETIMEMANAGER] Initialized
2024-09-16 16:55:13.560 -04:00 [INF] [WORKER] Startup completed, commencing execution ..
2024-09-16 16:55:13.563 -04:00 [INF] [SETTINGS] Config storage path: C:\Program Files (x86)\LAB02 Research\HASS.Agent Satellite Service\config
2024-09-16 16:55:14.095 -04:00 [INF] [SETTINGS] Configuration loaded
2024-09-16 16:55:14.117 -04:00 [INF] [SETTINGS] MQTT configuration loaded
2024-09-16 16:55:14.118 -04:00 [INF] [SETTINGS_COMMANDS] Config not found, no entities loaded
2024-09-16 16:55:14.120 -04:00 [INF] [SETTINGS_SENSORS] Config not found, no entities loaded
2024-09-16 16:55:14.131 -04:00 [INF] [MQTT] Identifying as device: GHOST-satellite
2024-09-16 16:55:14.156 -04:00 [INF] Application started. Hosting environment: Production; Content root path: C:\Program Files (x86)\LAB02 Research\HASS.Agent Satellite Service\
2024-09-16 16:55:14.230 -04:00 [INF] [MQTT] Connecting ..
2024-09-16 16:55:14.279 -04:00 [INF] [RPCMANAGER] Listening
2024-09-16 16:55:14.403 -04:00 [INF] [MQTT] Connected
2024-09-16 16:55:16.254 -04:00 [INF] [MQTT] Initial registration completed
2024-09-16 19:05:30.906 -04:00 [INF] [SYSTEMSTATE] Session halting: system suspending
2024-09-16 21:15:31.722 -04:00 [WRN] [MQTT] Disconnected: NormalDisconnection
2024-09-16 21:15:32.279 -04:00 [FTL] [MQTT] Error while connecting: Error while connecting with host 'xxx.xxx.xxx.xx:1883'.
MQTTnet.Exceptions.MqttCommunicationException: Error while connecting with host 'xxx.xxx.xxx.xx:1883'.
 ---> System.Net.Sockets.SocketException (10051): A socket operation was attempted to an unreachable network.
   at System.Net.Sockets.Socket.AwaitableSocketAsyncEventArgs.ThrowException(SocketError error, CancellationToken cancellationToken)
   at System.Net.Sockets.Socket.AwaitableSocketAsyncEventArgs.System.Threading.Tasks.Sources.IValueTaskSource.GetResult(Int16 token)
   at System.Threading.Tasks.ValueTask.GetTaskForValueTaskSource(IValueTaskSource t)
--- End of stack trace from previous location ---
   at MQTTnet.Implementations.CrossPlatformSocket.ConnectAsync(String host, Int32 port, CancellationToken cancellationToken)
   --- End of inner exception stack trace ---
   at MQTTnet.Implementations.CrossPlatformSocket.ConnectAsync(String host, Int32 port, CancellationToken cancellationToken)
   at MQTTnet.Implementations.MqttTcpChannel.ConnectAsync(CancellationToken cancellationToken)
   at MQTTnet.Internal.MqttTaskTimeout.WaitAsync(Func`2 action, TimeSpan timeout, CancellationToken cancellationToken)
   at MQTTnet.Adapter.MqttChannelAdapter.ConnectAsync(TimeSpan timeout, CancellationToken cancellationToken)
   at MQTTnet.Client.MqttClient.ConnectAsync(IMqttClientOptions options, CancellationToken cancellationToken)
   at MQTTnet.Client.MqttClient.ConnectAsync(IMqttClientOptions options, CancellationToken cancellationToken)
   at MQTTnet.Extensions.ManagedClient.ManagedMqttClient.ReconnectIfRequiredAsync(CancellationToken cancellationToken)
2024-09-16 21:15:37.329 -04:00 [INF] [MQTT] Connected
2024-09-16 21:15:40.891 -04:00 [INF] [SYSTEMSTATE] Session resuming
2024-09-16 23:36:54.390 -04:00 [INF] [SYSTEMSTATE] Session halting: system suspending

@7542
Copy link

7542 commented Sep 19, 2024

same on my installation! HASS.Agent V2.0.1

Logger: homeassistant.util.logging
Quelle: util/logging.py:95
Erstmals aufgetreten: 10:49:50 (31 Vorkommnisse)
Zuletzt protokolliert: 11:04:48

Exception in updated when handling msg on 'hass.agent/devices/AM-DESKTOP': '{"serial_number":"xxxxxxxxxxxxxxxxx","device":{"identifiers":"hass.agent-DESKTOP","manufacturer":"LAB02 Research","model":"Microsoft Windows NT 10.0.19045.0","name":"AM-DESKTOP","sw_version":"2022.14.0"},"apis":{"notifications":true,"media_player":true}}' Traceback (most recent call last): File "/config/custom_components/hass_agent/__init__.py", line 144, in updated update_device_info(hass, entry, payload) File "/config/custom_components/hass_agent/__init__.py", line 29, in update_device_info device_registry.async_get_or_create( File "/usr/src/homeassistant/homeassistant/helpers/device_registry.py", line 834, in async_get_or_create device = self.async_update_device( ^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/helpers/device_registry.py", line 1066, in async_update_device self.hass.verify_event_loop_thread("device_registry.async_update_device") File "/usr/src/homeassistant/homeassistant/core.py", line 462, in verify_event_loop_thread frame.report_non_thread_safe_operation(what) File "/usr/src/homeassistant/homeassistant/helpers/frame.py", line 225, in report_non_thread_safe_operation report( File "/usr/src/homeassistant/homeassistant/helpers/frame.py", line 159, in report _report_integration(what, integration_frame, level, error_if_integration) File "/usr/src/homeassistant/homeassistant/helpers/frame.py", line 197, in _report_integration raise RuntimeError( RuntimeError: Detected that custom integration 'hass_agent' calls device_registry.async_update_device from a thread other than the event loop, which may cause Home Assistant to crash or data to corrupt. For more information, see https://developers.home-assistant.io/docs/asyncio_thread_safety/#device_registryasync_update_device at custom_components/hass_agent/__init__.py, line 29: device_registry.async_get_or_create(. Please report it to the author of the 'hass_agent' custom integration.

@Nexinal
Copy link

Nexinal commented Oct 4, 2024

I've installed HASS.Agent for the first time on my Home Assistant Pi and received this same error.

I've setup sensors on the PC side but while I can see the PC on the HA side, there are no entities associated and there is no "notify.*" service - I assume due to this error.

Basically, I have nothing at all in HA other than this error message.

@rjbrown99
Copy link

Same situation here. Strange crashes of Home Assistant, same errors as you call out here. I disabled HASS on both Home Assistant and my Windows client, I'll monitor to see if it crashes again in the next day or two.

@jsolarin
Copy link

Same error after updating HA to 2024.10.1

2024-10-10 00:42:05.761 ERROR (SyncWorker_14) [homeassistant.util.logging] Exception in updated when handling msg on 'hass.agent/devices/': '{"serial_number":"","device":{"identifiers":"hass.agent-","manufacturer":"LAB02 Research","model":"Microsoft Windows NT 10.0.22631.0","name":"","sw_version":"2022.14.0"},"apis":{"notifications":false,"media_player":false}}'
Traceback (most recent call last):
File "/config/custom_components/hass_agent/init.py", line 144, in updated
update_device_info(hass, entry, payload)
File "/config/custom_components/hass_agent/init.py", line 29, in update_device_info
device_registry.async_get_or_create(
File "/usr/src/homeassistant/homeassistant/helpers/device_registry.py", line 834, in async_get_or_create
device = self.async_update_device(
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/device_registry.py", line 1066, in async_update_device
self.hass.verify_event_loop_thread("device_registry.async_update_device")
File "/usr/src/homeassistant/homeassistant/core.py", line 462, in verify_event_loop_thread
frame.report_non_thread_safe_operation(what)
File "/usr/src/homeassistant/homeassistant/helpers/frame.py", line 229, in report_non_thread_safe_operation
report(
File "/usr/src/homeassistant/homeassistant/helpers/frame.py", line 163, in report
_report_integration(what, integration_frame, level, error_if_integration)
File "/usr/src/homeassistant/homeassistant/helpers/frame.py", line 201, in _report_integration
raise RuntimeError(
RuntimeError: Detected that custom integration 'hass_agent' calls device_registry.async_update_device from a thread other than the event loop, which may cause Home Assistant to crash or data to corrupt. For more information, see https://developers.home-assistant.io/docs/asyncio_thread_safety/#device_registryasync_update_device at custom_components/hass_agent/init.py, line 29: device_registry.async_get_or_create(. Please report it to the author of the 'hass_agent' custom integration.

@jsolarin
Copy link

Looks like this is a bug in the HASS_Agent HACS integration...

hass-agent/HASS.Agent-Integration#2 (comment)

@Anon666333
Copy link
Author

Looks like this is a bug in the HASS_Agent HACS integration...

hass-agent/HASS.Agent-Integration#2 (comment)

This might do it. The main issue (I think) causing the crash here is due to the device_registry.async_update_device....
I'll dive into this tonight and see if I can update everyone here.
Happy I'm not going crazy though.....

@Anon666333
Copy link
Author

Anon666333 commented Oct 13, 2024

Just updating, it's been two days since applying the fix that @jsolarin highlighted, no unexpected restarts and logs seem clear....
Log level: warning

2024-10-11 12:59:50.100 WARNING (SyncWorker_0) [homeassistant.loader] We found a custom integration hass_agent_notifier which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant
2024-10-11 12:59:50.158 WARNING (SyncWorker_0) [homeassistant.loader] We found a custom integration hass_agent which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant
2024-10-11 12:59:50.165 WARNING (SyncWorker_0) [homeassistant.loader] We found a custom integration hass_agent_mediaplayer which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant
status = await self._async_request_sync_devices(agent_user_id)
2024-10-11 13:03:44.846 WARNING (ImportExecutor_0) [homeassistant.components.media_player.const] MEDIA_TYPE_MUSIC was used from hass_agent, this is a deprecated constant which will be removed in HA Core 2025.10. Use MediaType.MUSIC instead, please report it to the author of the 'hass_agent' custom integration

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants