Home Assistant periodically stops working

I have Home Assistant running on an old Windows 10 laptop. Once or twice a week, HA will randomly stop working: the Lovelace UI page doesn’t load, automations stop automating, my Zigbee stuff stops working. I can fix it by remote desktoping into my laptop and closing and re-opening the VirtualBox, but it’s annoying.

How do I figure out what’s causing this? I think I get an event in my Logbook that says “Forecast Home became unavailable” when HA dies, but nothing conspicuous.

My best guess is that VirtualBox doesn’t have a way to reconnect to the internet after a brief interruption. If this is what’s causing my HA to die, does anyone know of a solution? Either to get the VirtualBox instance to automatically reconnect, or automatically restart the VM when necessary?

If it was a networking issue ZigBee will continue to work.

It might be a memory issue or hardrive errors.

You’ll need at least to check the homeassistant.log file and your system log (of the VM)

Here’s what I see in my log:

Logger: aiohue.v2[192.168.0.115].events
Source: runner.py:128
First occurred: February 22, 2023 at 4:32:36 PM (40 occurrences)
Last logged: 11:39:07 AM

20 Attempts to (re)connect to bridge failed - This might be an indication of connection issues.
30 Attempts to (re)connect to bridge failed - This might be an indication of connection issues.
40 Attempts to (re)connect to bridge failed - This might be an indication of connection issues.
50 Attempts to (re)connect to bridge failed - This might be an indication of connection issues.
60 Attempts to (re)connect to bridge failed - This might be an indication of connection issues.

From the exported log:

2023-03-01 05:42:48.829 WARNING (MainThread) [aiohue.v2[192.168.0.115].events] 10 Attempts to (re)connect to bridge failed - This might be an indication of connection issues.
2023-03-01 05:56:32.894 WARNING (MainThread) [aiohue.v2[192.168.0.115].events] 10 Attempts to (re)connect to bridge failed - This might be an indication of connection issues.
2023-03-01 06:05:24.540 ERROR (MainThread) [wyzeapy.services.update_manager] Unknow error happened during updating device info
Traceback (most recent call last):
File “/usr/local/lib/python3.10/site-packages/aiohttp/connector.py”, line 1154, in _create_direct_connection
hosts = await asyncio.shield(host_resolved)
File “/usr/local/lib/python3.10/site-packages/aiohttp/connector.py”, line 880, in _resolve_host
addrs = await self._resolver.resolve(host, port, family=self._family)
File “/usr/local/lib/python3.10/site-packages/aiohttp/resolver.py”, line 33, in resolve
infos = await self._loop.getaddrinfo(
File “/usr/local/lib/python3.10/asyncio/base_events.py”, line 860, in getaddrinfo
return await self.run_in_executor(
File “/usr/local/lib/python3.10/concurrent/futures/thread.py”, line 58, in run
result = self.fn(*self.args, **self.kwargs)
File “/usr/local/lib/python3.10/socket.py”, line 955, in getaddrinfo
for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
socket.gaierror: [Errno -3] Try again

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

Traceback (most recent call last):
File “/usr/local/lib/python3.10/site-packages/wyzeapy/services/update_manager.py”, line 40, in update
self.device = await self.service.update(self.device)
File “/usr/local/lib/python3.10/site-packages/wyzeapy/services/bulb_service.py”, line 71, in update
device_info = await self._get_property_list(bulb)
File “/usr/local/lib/python3.10/site-packages/wyzeapy/services/base_service.py”, line 164, in _get_property_list
response_json = await self._auth_lib.post(“https://api.wyzecam.com/app/v2/device/get_property_list”,
File “/usr/local/lib/python3.10/site-packages/wyzeapy/wyze_auth_lib.py”, line 219, in post
response = await _session.post(url, json=json, headers=headers, data=data)
File “/usr/local/lib/python3.10/site-packages/aiohttp/client.py”, line 535, in _request
conn = await self._connector.connect(
File “/usr/local/lib/python3.10/site-packages/aiohttp/connector.py”, line 542, in connect
proto = await self._create_connection(req, traces, timeout)
File “/usr/local/lib/python3.10/site-packages/aiohttp/connector.py”, line 907, in _create_connection
_, proto = await self._create_direct_connection(req, traces, timeout)
File “/usr/local/lib/python3.10/site-packages/aiohttp/connector.py”, line 1166, in _create_direct_connection
raise ClientConnectorError(req.connection_key, exc) from exc
aiohttp.client_exceptions.ClientConnectorError: Cannot connect to host api.wyzecam.com:443 ssl:default [Try again]

…repeated several hundred times.

I don’t see anything in my VM logs. There’s literally nothing between me starting up the VM and, several days later, remote desktoping to that PC.

The best advice I can give, (from personal VBox experience) you need to ditch it.

I moved to VMware and oh man, what a HUGE difference.

VBox, IMO is junk.

Hum maybe the whole thing crash because there’s is too much network errors and thus it cannot handle ZigBee as well

Or maybe all your I/O fails, which includes USB and ZigBee

I was using it in the past but I’ve heard a lot of security issues with ESXI recently.

You may also try QEMU