Home Assistant constantly losing connection - pls help

This might be related?

Logger: homeassistant.components.websocket_api.http.connection
Source: components/websocket_api/http.py:519
integration: Home Assistant WebSocket API (documentation, issues)
First occurred: 10:47:53 (3 occurrences)
Last logged: 10:50:18

  • [546604747792] from 127.0.0.1 (Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/128.0.0.0 Safari/537.36): Disconnected: Did not receive auth message within 10 seconds
  • [546604744912] from 127.0.0.1 (Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/128.0.0.0 Safari/537.36): Disconnected: Did not receive auth message within 10 seconds
  • [546495433168] from 127.0.0.1 (Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/128.0.0.0 Safari/537.36): Disconnected: Did not receive auth message within 10 seconds
1 Like

Having similar issues but I have a few different browsers with different logins and I noticed that it happens more in the login that has the most dashboards. Since I can’t find details in the logs I’m going to try disabling dashboards to see if I can narrow down the problematic integrations or dashboards. This only started happening for me in the last few 2024 releases.

I think I have a little update that might be progress in this issue. I feel a little silly that I didn’t make the connection sooner (pun intended). I have this integration that helped me figure out what might be happening: hass-browser_mod/README.md at de87d5b4f57e2f0d02ad2868e5532ddcac296359 · thomasloven/hass-browser_mod · GitHub.

I did two things and so far connections are stable. First I removed my busiest dashboard from my profile view for a couple hours. Next I logged off my phone app and logged back in.

The I was poking around the browser mod integration and it appears to interact with the web sockets and suggests if you have problems clear your browser cache. Anyway, I’m thinking that I had something from an older integration that was hanging around in cache. So I went through the browser mod integration and cleared out all the older connection entries.

1 Like

I dont have that one…

I did notice that when a connection is lost…deactivating and reactivating the remote connection of NC resolved it withing a second

I am having the same problem of HA going offline every couple of minutes. Sometimes it re-establishes connection but mostly have to do a hard power reset to reconnect…then loses connection again within a few minutes. This has just began happening the last couple of days. Prior to that, running same hardware for last two years. No new devices/automations/YAML edits performed. Only change to software is accepted normal updates. I can successfully ping the device even when “not connected”. Below is log file. Any help/suggestions would be greatly appreciated.

2024-10-04 22:34:49.826 WARNING (SyncWorker_0) [homeassistant.loader] We found a custom integration alexa_media 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-04 22:34:49.829 WARNING (SyncWorker_0) [homeassistant.loader] We found a custom integration dreame_vacuum 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-04 22:34:49.832 WARNING (SyncWorker_0) [homeassistant.loader] We found a custom integration presence_simulation 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-04 22:34:49.833 WARNING (SyncWorker_0) [homeassistant.loader] We found a custom integration aarlo 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-04 22:34:49.836 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
2024-10-04 22:34:49.838 WARNING (SyncWorker_0) [homeassistant.loader] We found a custom integration watchman 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-04 22:34:51.419 WARNING (Recorder) [homeassistant.components.recorder.util] The system could not validate that the sqlite3 database at //config/home-assistant_v2.db was shutdown cleanly
2024-10-04 22:34:51.512 WARNING (Recorder) [homeassistant.components.recorder.util] Ended unfinished session (id=745 from 2024-10-05 04:31:50.675183)
2024-10-04 22:35:03.185 WARNING (MainThread) [homeassistant.util.loop] Detected blocking call to load_verify_locations with args (<ssl.SSLContext object at 0xffff55553f50>, ‘/usr/local/lib/python3.12/site-packages/certifi/cacert.pem’, None, None) inside the event loop by custom integration ‘alexa_media’ at custom_components/alexa_media/init.py, line 341: AlexaLogin( (offender: /usr/local/lib/python3.12/ssl.py, line 708: context.load_verify_locations(cafile, capath, cadata)), please create a bug report at Issues · alandtse/alexa_media_player · GitHub
For developers, please see Blocking operations with asyncio | Home Assistant Developer Docs
Traceback (most recent call last):
File “”, line 198, in _run_module_as_main
File “”, line 88, in _run_code
File “/usr/src/homeassistant/homeassistant/main.py”, line 223, in
sys.exit(main())
File “/usr/src/homeassistant/homeassistant/main.py”, line 209, in main
exit_code = runner.run(runtime_conf)
File “/usr/src/homeassistant/homeassistant/runner.py”, line 189, in run
return loop.run_until_complete(setup_and_run_hass(runtime_config))
File “/usr/local/lib/python3.12/asyncio/base_events.py”, line 674, in run_until_complete
self.run_forever()
File “/usr/local/lib/python3.12/asyncio/base_events.py”, line 641, in run_forever
self._run_once()
File “/usr/local/lib/python3.12/asyncio/base_events.py”, line 1990, in _run_once
handle._run()
File “/usr/local/lib/python3.12/asyncio/events.py”, line 88, in _run
self._context.run(self._callback, *self._args)
File “/usr/src/homeassistant/homeassistant/setup.py”, line 165, in async_setup_component
result = await _async_setup_component(hass, domain, config)
File “/usr/src/homeassistant/homeassistant/setup.py”, line 461, in async_setup_component
await asyncio.gather(
File “/usr/src/homeassistant/homeassistant/setup.py”, line 463, in
create_eager_task(
File "/usr/src/homeassistant/homeassistant/util/async
.py", line 45, in create_eager_task
return Task(coro, loop=loop, name=name, eager_start=True)
File “/usr/src/homeassistant/homeassistant/config_entries.py”, line 742, in async_setup_locked
await self.async_setup(hass, integration=integration)
File “/usr/src/homeassistant/homeassistant/config_entries.py”, line 594, in async_setup
result = await component.async_setup_entry(hass, self)
File “/config/custom_components/alexa_media/init.py”, line 341, in async_setup_entry
AlexaLogin(

2024-10-04 22:35:03.232 WARNING (MainThread) [homeassistant.components.rachio] 1 Rachio device(s) found; The url https://hooks.nabu.casa/gAAAAABh-f3Sl0UcqcxtgYDnRSYJZK-i8v56UZdSsy1Xcmi-moDXqfeL95E8seVtdlR80TMzsuzQy_KcXJxOoWrWdm1tmyMTEQ15n1sBmhqpSPEUcy0CFhPUxDAOLrBpxnxHlaa3q3KHnIKrtEFtsYXesW4uZXhE9YJA8mvpBTPNsJbpHm_ESZk= must be accessible from the internet in order to receive updates
2024-10-04 22:35:03.303 WARNING (MainThread) [homeassistant.util.loop] Detected blocking call to open with args (PosixPath(‘/config/.storage/[email protected]’),) inside the event loop by custom integration ‘alexa_media’ at custom_components/alexa_media/init.py, line 361: await login.login(cookies=await login.load_cookie()) (offender: /usr/local/lib/python3.12/site-packages/aiohttp/cookiejar.py, line 126: with file_path.open(mode=“rb”) as f:), please create a bug report at Issues · alandtse/alexa_media_player · GitHub
For developers, please see Blocking operations with asyncio | Home Assistant Developer Docs
Traceback (most recent call last):
File “”, line 198, in _run_module_as_main
File “”, line 88, in _run_code
File “/usr/src/homeassistant/homeassistant/main.py”, line 223, in
sys.exit(main())
File “/usr/src/homeassistant/homeassistant/main.py”, line 209, in main
exit_code = runner.run(runtime_conf)
File “/usr/src/homeassistant/homeassistant/runner.py”, line 189, in run
return loop.run_until_complete(setup_and_run_hass(runtime_config))
File “/usr/local/lib/python3.12/asyncio/base_events.py”, line 674, in run_until_complete
self.run_forever()
File “/usr/local/lib/python3.12/asyncio/base_events.py”, line 641, in run_forever
self._run_once()
File “/usr/local/lib/python3.12/asyncio/base_events.py”, line 1990, in _run_once
handle._run()
File “/usr/local/lib/python3.12/asyncio/events.py”, line 88, in _run
self._context.run(self._callback, *self._args)
File “/usr/src/homeassistant/homeassistant/config_entries.py”, line 742, in async_setup_locked
await self.async_setup(hass, integration=integration)
File “/usr/src/homeassistant/homeassistant/config_entries.py”, line 594, in async_setup
result = await component.async_setup_entry(hass, self)
File “/config/custom_components/alexa_media/init.py”, line 361, in async_setup_entry
await login.login(cookies=await login.load_cookie())

2024-10-04 22:35:05.416 WARNING (MainThread) [homeassistant.util.loop] Detected blocking call to open with args (PosixPath(‘/config/.storage/[email protected]’),) inside the event loop by custom integration ‘alexa_media’ at custom_components/alexa_media/init.py, line 361: await login.login(cookies=await login.load_cookie()) (offender: /usr/local/lib/python3.12/site-packages/aiohttp/cookiejar.py, line 121: with file_path.open(mode=“wb”) as f:), please create a bug report at Issues · alandtse/alexa_media_player · GitHub
For developers, please see Blocking operations with asyncio | Home Assistant Developer Docs
Traceback (most recent call last):
File “”, line 198, in _run_module_as_main
File “”, line 88, in _run_code
File “/usr/src/homeassistant/homeassistant/main.py”, line 223, in
sys.exit(main())
File “/usr/src/homeassistant/homeassistant/main.py”, line 209, in main
exit_code = runner.run(runtime_conf)
File “/usr/src/homeassistant/homeassistant/runner.py”, line 189, in run
return loop.run_until_complete(setup_and_run_hass(runtime_config))
File “/usr/local/lib/python3.12/asyncio/base_events.py”, line 674, in run_until_complete
self.run_forever()
File “/usr/local/lib/python3.12/asyncio/base_events.py”, line 641, in run_forever
self._run_once()
File “/usr/local/lib/python3.12/asyncio/base_events.py”, line 1990, in _run_once
handle._run()
File “/usr/local/lib/python3.12/asyncio/events.py”, line 88, in _run
self._context.run(self._callback, *self._args)
File “/usr/src/homeassistant/homeassistant/config_entries.py”, line 742, in async_setup_locked
await self.async_setup(hass, integration=integration)
File “/usr/src/homeassistant/homeassistant/config_entries.py”, line 594, in async_setup
result = await component.async_setup_entry(hass, self)
File “/config/custom_components/alexa_media/init.py”, line 361, in async_setup_entry
await login.login(cookies=await login.load_cookie())

2024-10-04 22:35:05.438 WARNING (MainThread) [homeassistant.util.loop] Detected blocking call to load_verify_locations with args (<ssl.SSLContext object at 0xffff54069050>,) inside the event loop by custom integration ‘alexa_media’ at custom_components/alexa_media/init.py, line 922: http2 = HTTP2EchoClient( (offender: /usr/local/lib/python3.12/site-packages/httpx/_config.py, line 149: context.load_verify_locations(cafile=cafile)), please create a bug report at Issues · alandtse/alexa_media_player · GitHub
For developers, please see Blocking operations with asyncio | Home Assistant Developer Docs
Traceback (most recent call last):
File “”, line 198, in _run_module_as_main
File “”, line 88, in _run_code
File “/usr/src/homeassistant/homeassistant/main.py”, line 223, in
sys.exit(main())
File “/usr/src/homeassistant/homeassistant/main.py”, line 209, in main
exit_code = runner.run(runtime_conf)
File “/usr/src/homeassistant/homeassistant/runner.py”, line 189, in run
return loop.run_until_complete(setup_and_run_hass(runtime_config))
File “/usr/local/lib/python3.12/asyncio/base_events.py”, line 674, in run_until_complete
self.run_forever()
File “/usr/local/lib/python3.12/asyncio/base_events.py”, line 641, in run_forever
self._run_once()
File “/usr/local/lib/python3.12/asyncio/base_events.py”, line 1990, in _run_once
handle._run()
File “/usr/local/lib/python3.12/asyncio/events.py”, line 88, in _run
self._context.run(self._callback, *self._args)
File “/usr/src/homeassistant/homeassistant/config_entries.py”, line 742, in async_setup_locked
await self.async_setup(hass, integration=integration)
File “/usr/src/homeassistant/homeassistant/config_entries.py”, line 594, in async_setup
result = await component.async_setup_entry(hass, self)
File “/config/custom_components/alexa_media/init.py”, line 363, in async_setup_entry
await setup_alexa(hass, config_entry, login)
File “/config/custom_components/alexa_media/init.py”, line 1312, in setup_alexa
await http2_connect()
File “/config/custom_components/alexa_media/init.py”, line 922, in http2_connect
http2 = HTTP2EchoClient(

2024-10-04 22:35:16.635 WARNING (MainThread) [zigpy.application] Zigbee channel 15 utilization is 89.94%!
2024-10-04 22:35:16.635 WARNING (MainThread) [zigpy.application] If you are having problems joining new devices, are missing sensor updates, or have issues keeping devices joined, ensure your coordinator is away from interference sources such as USB 3.0 devices, SSDs, WiFi routers, etc.
2024-10-04 22:35:18.271 ERROR (MainThread) [homeassistant] Error doing job: Task exception was never retrieved (None)
Traceback (most recent call last):
File “/usr/src/homeassistant/homeassistant/helpers/discovery_flow.py”, line 135, in async_start
await gather_with_limited_concurrency(FLOW_INIT_LIMIT, *init_coros)
File "/usr/src/homeassistant/homeassistant/util/async
.py", line 114, in gather_with_limited_concurrency
return await gather(
^^^^^^^^^^^^^
File “/usr/src/homeassistant/homeassistant/util/async_.py”, line 112, in sem_task
return await task
^^^^^^^^^^
File “/usr/src/homeassistant/homeassistant/config_entries.py”, line 1287, in async_init
flow, result = await self._async_init(flow_id, handler, context, data)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/usr/src/homeassistant/homeassistant/config_entries.py”, line 1322, in _async_init
result = await self._async_handle_step(flow, flow.init_step, data)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/usr/src/homeassistant/homeassistant/data_entry_flow.py”, line 520, in _async_handle_step
result: _FlowResultT = await getattr(flow, method)(user_input)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/usr/src/homeassistant/homeassistant/components/wled/config_flow.py”, line 81, in async_step_zeroconf
self.discovered_device = await self._async_get_device(discovery_info.host)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/usr/src/homeassistant/homeassistant/components/wled/config_flow.py”, line 117, in _async_get_device
return await wled.update()
^^^^^^^^^^^^^^^^^^^
File “/usr/local/lib/python3.12/site-packages/backoff/_async.py”, line 151, in retry
ret = await target(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/usr/local/lib/python3.12/site-packages/wled/wled.py”, line 259, in update
if not (presets := await self.request(“/presets.json”)):
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/usr/local/lib/python3.12/site-packages/backoff/_async.py”, line 151, in retry
ret = await target(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/usr/local/lib/python3.12/site-packages/wled/wled.py”, line 205, in request
raise WLEDError(
wled.exceptions.WLEDError: (404, {‘message’: ‘Not Found’})

1 Like
1 Like

Mant thanks! Rolling Media Player back to 4.13.2 seems to have resolved.

Temporary solution: disable Alexa media player integration. It works for me. :heart_eyes:

Can you explain, How to roll back ? Thanks

Restore your latest backup from the last working version is the way I usually use, accepting that my recorder data will have gaps

1 Like

Back to the original topic…

Lately I have also noticed the “Connection Lost…” popup while editing an ESPHome configuration. It comes back online in a few seconds. I have to wonder if connection has always been dropping offline then recovering seconds later and I only observed it because I was looking at the screen continuously? Sometimes a switch doesn’t toggle, or Alexa doesn’t respond, then seconds later everything is working again.

Am I alone here?

same problem, keeps reconnecting.
Solved by replacing a power supply with a more powerful → 5V 3A
(for Raspberry Pi3 B+)

Adding my voice to the choir of people who are seeing this issue. The weirdest thing is I can connect to the host instance over ssh and samba and watch the logs showing every component fail to connect to any resource over the network while the webserver also doesn’t accept any connections

1 Like

I’m not sure we are talking about the same thing. Replacing the PSU fixes a server rebooting at random. The problem we are discussing is the server going offline at random. Mine is on an Intel NUC with an Intel power supply. It never reboots unless I tell it to.

1 Like

Craig’s description exactly describes the symptom I have been seeing. I am still systematically searching for the cause

You are spot on. I am running HA via Proxmox on a NUC as well. Random loosing connection.

I wonder how widespread this is. If I weren’t doing so much with ESPHome (six simultaneous projects for our Halloween experience- that’s what the neighbors call it), I wouldn’t have noticed the occasional “Connection Lost” message.

I have to wonder if this is happening all the time, and I don’t see it because I am not looking at the UI and Home Assistant isn’t actively controlling anything? Sometimes when we tell Alexa to turn on a light, she beeps as if the command went smoothly, but no light. A few seconds later, repeating the instruction to Alexa works. Could the Home Assistant server be in a restart? (The timing would be right as Home Assistant restart only takes about 15-seconds on the NUC.)

I will try logging every Home Assistant startup to see what a typical day looks like.

Just checked and appeared again:

image

This is happening a lot.
I am not sure which log to check but if someone can tell me then i will do a search.

Try this. In the UI, click your user profile at the bottom left of the side bar. Then, in your profile page, check that Advanced mode is on - if it’s not, turn it on (hard refresh or clear your browser cache just in case).
Then, in the same profile page, scroll down to the Browser settings section - you’ll see a “Automatically close connection” option. Turn it off and your connection should no longer disconnect after 5 minutes.

2 Likes