Need help - reboot on fresh installation on Pi 4 still takes too long

Hi there,

my first installation on a Pi4 B 4GB with the recommend 32bit Version was working fine, but the restart took 15 minutes.

So I bought a new SD Card (Samsung Evo Plus 32GB) and run a fresh install on it.

The pure Hassio image is still taking 15 minutes in the logbook for stopped -> started without any compontent installed.

I read in multiple articles, that this should take 1-2 minutes, but not 15.

What could I try or analyse to find the problem?

Thank you so much!!!

Every time or just on first reboot?

Really every time.

your log will give some clues, you may need to bump up the loglevel.

This happens all the time in the Supervisor Section:

20-08-09 07:32:28 INFO (SyncWorker_0) [supervisor.docker.interface] Restart homeassistant/raspberrypi4-homeassistant
20-08-09 07:32:54 INFO (MainThread) [supervisor.homeassistant] Updated Home Assistant API token
20-08-09 07:36:40 INFO (MainThread) [supervisor.store.git] Update add-on https://github.com/home-assistant/hassio-addons repository
20-08-09 07:36:40 INFO (MainThread) [supervisor.store.git] Update add-on https://github.com/hassio-addons/repository repository
20-08-09 07:36:40 INFO (MainThread) [supervisor.updater] Fetch update data from https://version.home-assistant.io/stable.json
20-08-09 07:36:42 INFO (MainThread) [supervisor.store] Load add-ons from store: 66 all - 0 new - 0 remove
20-08-09 07:42:47 WARNING (MainThread) [supervisor.homeassistant] Don't wait anymore of Home Assistant startup!
20-08-09 07:42:47 ERROR (MainThread) [asyncio] Task exception was never retrieved
future: <Task finished name='Task-9190' coro=<process_lock.<locals>.wrap_api() done, defined at /usr/src/supervisor/supervisor/utils/__init__.py:22> exception=HomeAssistantError()>
Traceback (most recent call last):
  File "/usr/src/supervisor/supervisor/utils/__init__.py", line 31, in wrap_api
    return await method(api, *args, **kwargs)
  File "/usr/src/supervisor/supervisor/homeassistant.py", line 421, in restart
    await self._block_till_run()
  File "/usr/src/supervisor/supervisor/homeassistant.py", line 638, in _block_till_run
    raise HomeAssistantError()
supervisor.exceptions.HomeAssistantError

In my debug log I find a thousands of zeroconf entries.

But my guess is that this entries causes the long startup:

2020-08-09 13:35:43 DEBUG (MainThread) [homeassistant.core] Waited 540 seconds for task: <Task pending name='Task-616' coro=<CloudOAuth2Implementation.async_generate_authorize_url.<locals>.await_tokens() running at /usr/src/homeassistant/homeassistant/components/cloud/account_link.py:122> wait_for=<Future pending cb=[<TaskWakeupMethWrapper object at 0xab77f6b8>()]> cb=[_wait.<locals>._on_completion() at /usr/local/lib/python3.8/asyncio/tasks.py:507]>
2020-08-09 13:35:43 DEBUG (MainThread) [homeassistant.core] Waited 540 seconds for task: <Task pending name='Task-615' coro=<CloudOAuth2Implementation.async_generate_authorize_url.<locals>.await_tokens() running at /usr/src/homeassistant/homeassistant/components/cloud/account_link.py:122> wait_for=<Future pending cb=[<TaskWakeupMethWrapper object at 0xab71cfb8>()]> cb=[_wait.<locals>._on_completion() at /usr/local/lib/python3.8/asyncio/tasks.py:507]>
2020-08-09 13:35:43 DEBUG (MainThread) [homeassistant.core] Waited 540 seconds for task: <Task pending name='Task-614' coro=<CloudOAuth2Implementation.async_generate_authorize_url.<locals>.await_tokens() running at /usr/src/homeassistant/homeassistant/components/cloud/account_link.py:122> wait_for=<Future pending cb=[<TaskWakeupMethWrapper object at 0xabb1c958>()]> cb=[_wait.<locals>._on_completion() at /usr/local/lib/python3.8/asyncio/tasks.py:507]>

I found the solution after one day of research.

The netatmo plugin is causing this.

https://community.home-assistant.io/t/after-new-installation-of-ha-without-any-big-modifications-every-restart-fails-with-supervisor-homeassistant-dont-wait-anymore-of-home-assistant-startup-and-takes-over-16-minutes/191334

To be honest, I seriously doubt that the netatmo integration is causing this, we would see many more incidents of this.

Well, I have four netatmo camera in my WiFi.

Adding the “dummy” configuration from the link changed the startup time to one minute, before it was 16 minutes on each startup.

I tried this on a fresh installation.