Homeassistant UI crash

Hi, my name is jonas and i have a problem with my HA VM.
I hope I’m in the correct Category, if not please move my topic to the right one.
I have a small Windows Client with Hyper-V and have the problem that my HA UI crash two times a day. After a reboot there is no problem. I also have reinstalled the complete HA. After it i installed some addons from my backup but the problem is not solved with it.
I can open the CLI via remotedesktop on the server. I can ping my HA. everything works fine.

The HA VM has 6CPU cores and 8GB RAM so I think i’ll be enough.

I do not know what i can check.
Is there anybody who can help me?

Check the home-assistant.log.1 file.

1 Like

Well i found:

2025-01-31 12:38:13.220 WARNING (SyncWorker_0) [homeassistant.loader] We found a custom integration hacs which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant
2025-01-31 12:38:13.221 WARNING (SyncWorker_0) [homeassistant.loader] We found a custom integration govee 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
2025-01-31 12:38:13.222 WARNING (SyncWorker_0) [homeassistant.loader] We found a custom integration smartthinq_sensors 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
2025-01-31 12:38:19.529 ERROR (MainThread) [homeassistant.components.automation] Automation with alias ‘Backlight Ein’ failed to setup actions and has been disabled: Unknown device ‘7687666d007a0713a5d818db2e5a7a5e’
2025-01-31 12:38:19.537 ERROR (MainThread) [homeassistant.components.automation] Automation with alias ‘Backlight aus’ failed to setup actions and has been disabled: Unknown device ‘7687666d007a0713a5d818db2e5a7a5e’
2025-01-31 12:38:26.051 WARNING (MainThread) [homeassistant.components.ssdp] Could not set up UPnP/SSDP server, as a presentation URL could not be determined; Please configure your internal URL in the Home Assistant general configuration
2025-01-31 12:38:26.094 ERROR (MainThread) [homeassistant.components.homekit.util] media_player.tv_samsung_6_series_75 does not support any media_player features
2025-01-31 12:39:33.764 ERROR (MainThread) [homeassistant.components.shelly] Error fetching shellyem3-485519D69F48 data: Error fetching data: DeviceConnectionTimeoutError(TimeoutError())
2025-01-31 12:43:01.764 ERROR (MainThread) [homeassistant.components.shelly] Error fetching shellyem3-485519D69F48 data: Error fetching data: DeviceConnectionTimeoutError(TimeoutError())
2025-01-31 13:27:57.600 ERROR (MainThread) [homeassistant.components.shelly] Error fetching shellyplug-s-C8C9A38914AB data: Error fetching data: DeviceConnectionTimeoutError(TimeoutError())
2025-01-31 13:39:40.600 ERROR (MainThread) [homeassistant.components.shelly] Error fetching shellyplug-s-C8C9A38914AB data: Error fetching data: DeviceConnectionTimeoutError(TimeoutError())
2025-01-31 14:00:11.762 ERROR (MainThread) [homeassistant.components.shelly] Error fetching shellyem3-485519D69F48 data: Error fetching data: DeviceConnectionTimeoutError(TimeoutError())
2025-01-31 14:07:33.656 ERROR (MainThread) [homeassistant.components.shelly] Error fetching shellyplug-s-C8C9A389377F data: Error fetching data: DeviceConnectionTimeoutError(TimeoutError())
2025-01-31 14:17:04.656 ERROR (MainThread) [homeassistant.components.shelly] Error fetching shellyplug-s-C8C9A389377F data: Error fetching data: DeviceConnectionTimeoutError(TimeoutError())
2025-01-31 14:27:08.657 ERROR (MainThread) [homeassistant.components.shelly] Error fetching shellyplug-s-C8C9A389377F data: Error fetching data: DeviceConnectionTimeoutError(TimeoutError())
2025-01-31 14:33:44.598 ERROR (MainThread) [homeassistant.components.shelly] Error fetching shellyplug-s-C8C9A38914AB data: Error fetching data: DeviceConnectionTimeoutError(TimeoutError())
2025-01-31 14:50:24.657 ERROR (MainThread) [homeassistant.components.shelly] Error fetching shellyplug-s-C8C9A389377F data: Error fetching data: DeviceConnectionTimeoutError(TimeoutError())
2025-01-31 15:36:13.656 ERROR (MainThread) [homeassistant.components.shelly] Error fetching shellyplug-s-C8C9A389377F data: Error fetching data: DeviceConnectionTimeoutError(TimeoutError())
2025-01-31 15:50:21.762 ERROR (MainThread) [homeassistant.components.shelly] Error fetching shellyem3-485519D69F48 data: Error fetching data: DeviceConnectionTimeoutError(TimeoutError())
2025-01-31 16:28:51.599 ERROR (MainThread) [homeassistant.components.shelly] Error fetching shellyplug-s-C8C9A38914AB data: Error fetching data: DeviceConnectionTimeoutError(TimeoutError())
2025-01-31 17:00:22.600 ERROR (MainThread) [homeassistant.components.shelly] Error fetching shellyplug-s-C8C9A38914AB data: Error fetching data: DeviceConnectionTimeoutError(TimeoutError())
2025-01-31 17:14:33.743 ERROR (MainThread) [homeassistant.components.shelly] Error fetching shellyplug-s-7C87CEBA5271 data: Error fetching data: DeviceConnectionTimeoutError(TimeoutError())
2025-01-31 17:15:23.601 ERROR (MainThread) [homeassistant.components.shelly] Error fetching shellyplug-s-C8C9A38914AB data: Error fetching data: DeviceConnectionTimeoutError(TimeoutError())
2025-01-31 17:18:41.657 ERROR (MainThread) [homeassistant.components.shelly] Error fetching shellyplug-s-C8C9A389377F data: Error fetching data: DeviceConnectionTimeoutError(TimeoutError())
2025-01-31 17:24:59.649 WARNING (MainThread) [homeassistant.helpers.service] Referenced entities lock.vordereingang_lock are missing or not currently available
2025-01-31 17:27:39.657 ERROR (MainThread) [homeassistant.components.shelly] Error fetching shellyplug-s-C8C9A389377F data: Error fetching data: DeviceConnectionTimeoutError(TimeoutError())
2025-01-31 17:28:55.657 ERROR (MainThread) [homeassistant.components.shelly] Error fetching shellyplug-s-C8C9A389377F data: Error fetching data: DeviceConnectionTimeoutError(TimeoutError())
2025-01-31 17:30:40.744 ERROR (MainThread) [homeassistant.components.shelly] Error fetching shellyplug-s-7C87CEBA5271 data: Error fetching data: DeviceConnectionTimeoutError(TimeoutError())
2025-01-31 17:50:05.743 ERROR (MainThread) [homeassistant.components.shelly] Error fetching shellyplug-s-7C87CEBA5271 data: Error fetching data: DeviceConnectionTimeoutError(TimeoutError())
2025-01-31 18:50:09.599 ERROR (MainThread) [homeassistant.components.shelly] Error fetching shellyplug-s-C8C9A38914AB data: Error fetching data: DeviceConnectionTimeoutError(TimeoutError())
2025-01-31 19:00:46.599 ERROR (MainThread) [homeassistant.components.shelly] Error fetching shellyplug-s-C8C9A38914AB data: Error fetching data: DeviceConnectionTimeoutError(TimeoutError())
2025-01-31 19:02:01.403 ERROR (MainThread) [aiohttp.server] Error handling request
Traceback (most recent call last):
File “/usr/local/lib/python3.13/site-packages/aiohttp/web_protocol.py”, line 380, in data_received
messages, upgraded, tail = self._request_parser.feed_data(data)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^
File “aiohttp/_http_parser.pyx”, line 558, in aiohttp._http_parser.HttpParser.feed_data
aiohttp.http_exceptions.BadHttpMessage: 400, message:
Pause on PRI/Upgrade:

b''
  ^

2025-01-31 19:14:24.744 ERROR (MainThread) [homeassistant.components.shelly] Error fetching shellyplug-s-7C87CEBA5271 data: Error fetching data: DeviceConnectionTimeoutError(TimeoutError())

Good morning, well this just not works.
Same problem this morning.

This is the new log:

2025-01-31 21:50:48.632 WARNING (SyncWorker_0) [homeassistant.loader] We found a custom integration hacs which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant
2025-01-31 21:50:48.633 WARNING (SyncWorker_0) [homeassistant.loader] We found a custom integration govee 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
2025-01-31 21:50:48.634 WARNING (SyncWorker_0) [homeassistant.loader] We found a custom integration smartthinq_sensors 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
2025-01-31 21:55:10.193 WARNING (Recorder) [homeassistant.components.sensor.recorder] The unit of sensor.energy_import_daily (kWh) cannot be converted to the unit of previously compiled statistics (None). Generation of long term statistics will be suppressed unless the unit changes back to None or a compatible unit. Go to https://my.home-assistant.io/redirect/developer_statistics to fix this
2025-01-31 21:55:24.886 ERROR (MainThread) [homeassistant.components.shelly] Error fetching shellyplug-s-C8C9A38914AB data: Error fetching data: DeviceConnectionTimeoutError(TimeoutError())
2025-01-31 22:00:58.730 ERROR (MainThread) [homeassistant.components.shelly] Error fetching shellyplug-s-C8C9A38914AB data: Error fetching data: DeviceConnectionTimeoutError(TimeoutError())
2025-01-31 22:22:59.604 WARNING (MainThread) [homeassistant.components.websocket_api.http.connection] [140302032270192] HA from 192.168.6.202 (Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/132.0.0.0 Safari/537.36 Edg/132.0.0.0): Disconnected: Received non-Text message.
2025-01-31 22:24:03.980 ERROR (MainThread) [homeassistant.components.shelly] Error fetching shellyplug-s-C8C9A38914AB data: Error fetching data: DeviceConnectionTimeoutError(TimeoutError())
2025-01-31 22:34:31.603 WARNING (MainThread) [homeassistant.components.websocket_api.http.connection] [140302032257808] HA from 192.168.6.202 (Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/132.0.0.0 Safari/537.36 Edg/132.0.0.0): Disconnected: Received non-Text message.
2025-01-31 22:37:01.605 WARNING (MainThread) [homeassistant.components.websocket_api.http.connection] [140301733690048] HA from 192.168.4.202 (Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/132.0.0.0 Safari/537.36 Edg/132.0.0.0): Disconnected: Received non-Text message.
2025-01-31 22:41:03.352 WARNING (MainThread) [homeassistant.components.apple_tv] Connection lost to Apple TV "Wohnzimmer"
2025-01-31 22:42:11.416 WARNING (MainThread) [homeassistant.components.apple_tv] Connection was re-established to device "Wohnzimmer"
2025-01-31 22:50:04.979 ERROR (MainThread) [homeassistant.components.shelly] Error fetching shellyplug-s-C8C9A38914AB data: Error fetching data: DeviceConnectionTimeoutError(TimeoutError())
2025-02-01 00:39:48.603 ERROR (MainThread) [homeassistant.components.ring.coordinator] Error fetching devices data: Timeout communicating with API for device Vordereingang: Timeout error during query of url https://api.ring.com/clients_api/doorbots/617133530/history: 
2025-02-01 00:40:59.064 ERROR (MainThread) [homeassistant.components.shelly] Error fetching shellyem3-485519D69F48 data: Error fetching data: DeviceConnectionTimeoutError(TimeoutError())
2025-02-01 00:41:32.078 WARNING (MainThread) [homeassistant.components.utility_meter.sensor] Energy Export Daily received an invalid new state from sensor.energy_export_sum : unknown
2025-02-01 00:41:32.078 WARNING (MainThread) [homeassistant.components.utility_meter.sensor] Energy Export Monthly received an invalid new state from sensor.energy_export_sum : unknown
2025-02-01 01:01:30.064 ERROR (MainThread) [homeassistant.components.shelly] Error fetching shellyem3-485519D69F48 data: Error fetching data: DeviceConnectionTimeoutError(TimeoutError())
2025-02-01 01:02:03.078 WARNING (MainThread) [homeassistant.components.utility_meter.sensor] Energy Export Daily received an invalid new state from sensor.energy_export_sum : unknown
2025-02-01 01:02:03.078 WARNING (MainThread) [homeassistant.components.utility_meter.sensor] Energy Export Monthly received an invalid new state from sensor.energy_export_sum : unknown
2025-02-01 01:33:47.073 ERROR (MainThread) [homeassistant.components.shelly] Error fetching shellyplug-s-7C87CEBA5271 data: Error fetching data: DeviceConnectionTimeoutError(TimeoutError())

I think this are not problems which stop the UI
Is there anybody who can help me find the mistake?

It’ll we great.

How does the performance look like before a crash, high memory usage for example? Your logs doesn’t say much other than that you are missing the device 7687666d007a0713a5d818db2e5a7a5e, that a lot of Shelly devices are unreachable and that you haven’t configured the internal URL.

How is your network set up, is it flat or segmented? Also, please do not write in German, this is an English only forum.

I Cannot Check the Memory usage and cpu, because it stops working on different times.
I have a Network with Unifi and i have different ip Ranges but no rules to Block Traffic.

So normally the HA can reach the Shelly.

I do Not know why there is this Problem now. A few weeks ago everything was normal.

:face_with_peeking_eye: I am also Open for a Remote Session if someone want and can help me Finding an solution for this case.

This probably explains the issues you are having with unreachable devices. Not sure that is related to the crashing though, but a good place to start.

Ok I do Not know what should be here the Problem?

Is it Not possible to use different ip Ranges for some usecases?

It is, but it is not officially supported so you need to know what you are doing when setting it up. As you can see your HA cannot reach a lot of devices.

Hi, ok thanks for this information. Now i have reconfigured my networks and everything is in one IP Area.
But could be this a problem for ui crashes?

No idea, you will need to test that yourself. But at least your devices are working again?

1 Like

Yes actuaoly everything is ok.
Can I find a another log with errors? To Check Where the Problem is?

After a crash you should find the home-assisant.log.1 contains the relevant info. If it is a Hyper-V issue try looking in those logs.

2025-02-01 10:11:57.225 WARNING (SyncWorker_0) [homeassistant.loader] We found a custom integration hacs which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant
2025-02-01 10:11:57.226 WARNING (SyncWorker_0) [homeassistant.loader] We found a custom integration govee 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
2025-02-01 10:11:57.227 WARNING (SyncWorker_0) [homeassistant.loader] We found a custom integration smartthinq_sensors 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
2025-02-01 10:11:58.252 WARNING (Recorder) [homeassistant.components.recorder.util] The system could not validate that the sqlite3 database at //config/home-assistant_v2.db was shutdown cleanly
2025-02-01 10:11:58.275 WARNING (Recorder) [homeassistant.components.recorder.util] Ended unfinished session (id=37 from 2025-02-01 09:02:40.526800)
2025-02-01 10:12:04.544 ERROR (MainThread) [homeassistant.components.home_connect.switch] An error occurred: {'description': 'HomeAppliance is offline', 'key': 'SDK.Error.HomeAppliance.Connection.Initialization.Failed'}
2025-02-01 10:12:18.944 ERROR (MainThread) [homeassistant.components.cert_expiry.coordinator] Error fetching home.dein-franke.de:8123 data: Connection timeout with server: home.dein-franke.de:8123
2025-02-01 10:12:28.949 WARNING (MainThread) [homeassistant.components.sensor] Setup of sensor platform cert_expiry is taking over 10 seconds.
2025-02-01 10:18:12.803 ERROR (MainThread) [homeassistant] Error doing job: Task exception was never retrieved (None)
Traceback (most recent call last):
  File "/usr/local/lib/python3.13/asyncio/staggered.py", line 104, in run_one_coro
    result = await coro_fn()
             ^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.13/asyncio/base_events.py", line 1039, in _connect_sock
    await self.sock_connect(sock, address)
  File "/usr/local/lib/python3.13/asyncio/selector_events.py", line 641, in sock_connect
    return await fut
           ^^^^^^^^^
asyncio.exceptions.CancelledError

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.13/asyncio/staggered.py", line 108, in run_one_coro
    exceptions[this_index] = e
    ^^^^^^^^^^
NameError: cannot access free variable 'exceptions' where it is not associated with a value in enclosing scope. Did you mean: 'Exception'?
2025-02-01 11:08:00.857 WARNING (MainThread) [async_upnp_client.profiles.profile] Failed (re-)subscribing to: uuid:553daf2d-944d-4617-acad-9b21e3efde45, reason: UpnpConnectionError('ClientConnectorError(ConnectionKey(host=\'192.168.6.1\', port=39221, is_ssl=False, ssl=True, proxy=None, proxy_auth=None, proxy_headers_hash=None), ConnectionRefusedError(111, "Connect call failed (\'192.168.6.1\', 39221)"))', None)
2025-02-01 11:08:00.860 WARNING (MainThread) [async_upnp_client.profiles.profile] Failed (re-)subscribing to: uuid:4758f747-7d74-418b-b6c4-125fc9afe8a4, reason: UpnpConnectionError('ClientConnectorError(ConnectionKey(host=\'192.168.6.1\', port=39221, is_ssl=False, ssl=True, proxy=None, proxy_auth=None, proxy_headers_hash=None), ConnectionRefusedError(111, "Connect call failed (\'192.168.6.1\', 39221)"))', None)
2025-02-01 11:08:00.863 WARNING (MainThread) [async_upnp_client.profiles.profile] Failed (re-)subscribing to: uuid:2418af3d-8658-49ce-9f78-b01e26de1351, reason: UpnpConnectionError('ClientConnectorError(ConnectionKey(host=\'192.168.6.1\', port=39221, is_ssl=False, ssl=True, proxy=None, proxy_auth=None, proxy_headers_hash=None), ConnectionRefusedError(111, "Connect call failed (\'192.168.6.1\', 39221)"))', None)
2025-02-01 11:08:00.866 WARNING (MainThread) [async_upnp_client.profiles.profile] Failed (re-)subscribing to: uuid:6021a4ea-6e7a-44fe-93e1-206ddbdf5d7d, reason: UpnpConnectionError('ClientConnectorError(ConnectionKey(host=\'192.168.6.1\', port=39221, is_ssl=False, ssl=True, proxy=None, proxy_auth=None, proxy_headers_hash=None), ConnectionRefusedError(111, "Connect call failed (\'192.168.6.1\', 39221)"))', None)

after the last reboot i got this errors

1 Like

You possibly have a corrupt database The system could not validate that the sqlite3 database at //config/home-assistant_v2.db was shutdown cleanly

Also seems you have some certificate issues.

To fix the db you can try to rename or delete the db files (warning this will delete all your history). The db is located here /config/home-assistant_v2.db Or even better do a restore from a known point in time when the db was not corrupt.

2 Likes

Hey thanks a lot. I hope this will help. I have renamed the db and restartet my HA. After it the DB was new created. Now i have to check if it better.

1 Like

Hi i have reinstalled HA now directly on my hardware.

But i have the same problem again.
Now i will stop any service after another one to check if it solves my problem. I am not sure what it could be.

2025-02-02 20:50:57.496 WARNING (SyncWorker_0) [homeassistant.loader] We found a custom integration hacs which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant
2025-02-02 20:50:57.496 WARNING (SyncWorker_0) [homeassistant.loader] We found a custom integration smartthinq_sensors 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
2025-02-02 20:50:58.166 WARNING (MainThread) [homeassistant.components.hassio] Not connected with the supervisor / system too busy!
2025-02-02 20:50:58.173 ERROR (MainThread) [homeassistant.components.hassio.issues] Failed to update supervisor issues: SupervisorBadRequestError('System is not ready with state: shutdown')
2025-02-02 20:50:58.174 WARNING (MainThread) [homeassistant.components.hassio] Can't read Supervisor data: System is not ready with state: shutdown
2025-02-02 20:50:58.176 ERROR (MainThread) [homeassistant.components.hassio.addon_panel] Can't read panel info: System is not ready with state: shutdown
2025-02-02 20:50:58.843 ERROR (MainThread) [homeassistant] Error doing job: Task exception was never retrieved (None)
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/backup/manager.py", line 345, in _async_reload_backup_agents
    agents = await platform.async_get_backup_agents(self.hass)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/hassio/backup.py", line 52, in async_get_backup_agents
    mounts = await client.mounts.info()
             ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.13/site-packages/aiohasupervisor/mounts.py", line 12, in info
    result = await self._client.get("mounts")
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.13/site-packages/aiohasupervisor/client.py", line 163, in get
    return await self._request(
           ^^^^^^^^^^^^^^^^^^^^
    ...<5 lines>...
    )
    ^
  File "/usr/local/lib/python3.13/site-packages/aiohasupervisor/client.py", line 129, in _request
    await self._raise_on_status(response)
  File "/usr/local/lib/python3.13/site-packages/aiohasupervisor/client.py", line 76, in _raise_on_status
    raise exc_type(result.message, result.job_id)
aiohasupervisor.exceptions.SupervisorBadRequestError: System is not ready with state: shutdown
2025-02-02 20:51:08.178 ERROR (MainThread) [homeassistant.components.hassio.issues] Failed to update supervisor issues: SupervisorBadRequestError('System is not ready with state: shutdown')
2025-02-02 20:51:11.331 ERROR (MainThread) [homeassistant.components.hassio.discovery] Can't read discover info: System is not ready with state: shutdown
2025-02-02 20:51:11.550 WARNING (MainThread) [homeassistant.helpers.system_info] No Home Assistant Supervisor info available
2025-02-02 20:51:16.556 ERROR (MainThread) [homeassistant] Error doing job: Task exception was never retrieved (None)
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/mqtt/client.py", line 974, in _async_resubscribe_and_publish_birth_message
    await self.async_publish(
    ...<4 lines>...
    )
  File "/usr/src/homeassistant/homeassistant/components/mqtt/client.py", line 646, in async_publish
    await self._async_wait_for_mid_or_raise(msg_info.mid, msg_info.rc)
  File "/usr/src/homeassistant/homeassistant/components/mqtt/client.py", line 1226, in _async_wait_for_mid_or_raise
    raise HomeAssistantError(
    ...<5 lines>...
    )
homeassistant.exceptions.HomeAssistantError: Error talking to MQTT: The client is not currently connected.
2025-02-02 20:51:18.183 ERROR (MainThread) [homeassistant.components.hassio.issues] Failed to update supervisor issues: SupervisorBadRequestError('System is not ready with state: shutdown')

If somebody have informations for me please contact me. :slight_smile: