Migrate from ZHA to Zigbee2MQTT resulting in multiple reboots of HA

Hi guys,

I was previously on ZHA for my Zigbee network setup via Conbee II stick.
I decided to migrate from ZHA to Zigbee2MQTT, as i wanted to add CC2531 to extend my Zigbee network.

Upon migration and successfully setup, i saw there was an update to Core and Supervisor and had upgraded it. That’s where my nightmare started, for the past 2 days, my Home Assistant kept rebooting several times every 10-15mins.

My Current setup: Raspberry Pi4 on SSD, with Conbee II stick.

Core
Version : core-2021.10.6
Supervisor
Version : supervisor-2021.10.0

Tried to trouble shoot but didnt work, so assuming it could be related to the upgrade of the Core, i reverted my HA back to an earlier backup.

This is the current version now as below:
Core
Version : core-2021.97
Supervisor
Version : supervisor-2021.10.0

Everything went back to normal, without any issues of the reboot. So i proceed to setup the Zigbee2MQTT and it was running fine for just 1 day, and the reboot issue is hitting back again. Can anyone advise what could be the issue?

I do notice my Core CPU usage spikes from usual 2-5% to 25-45%

Supervisor Logs

21-10-20 14:33:35 INFO (MainThread) [supervisor.api.proxy] Home Assistant WebSocket API request initialize
21-10-20 14:33:35 INFO (MainThread) [supervisor.api.proxy] WebSocket access from a0d7b954_nodered
21-10-20 14:33:35 INFO (MainThread) [supervisor.api.proxy] WebSocket access from a0d7b954_nodered
21-10-20 14:33:35 INFO (MainThread) [supervisor.api.proxy] WebSocket access from a0d7b954_nodered
21-10-20 14:33:35 INFO (MainThread) [supervisor.api.proxy] WebSocket access from a0d7b954_nodered
21-10-20 14:33:35 INFO (MainThread) [supervisor.api.proxy] WebSocket access from a0d7b954_nodered
21-10-20 14:33:35 INFO (MainThread) [supervisor.api.proxy] WebSocket access from a0d7b954_nodered
21-10-20 14:33:35 INFO (MainThread) [supervisor.api.proxy] WebSocket access from a0d7b954_nodered
21-10-20 14:33:35 INFO (MainThread) [supervisor.api.proxy] WebSocket access from a0d7b954_nodered
21-10-20 14:33:35 INFO (MainThread) [supervisor.api.proxy] WebSocket access from a0d7b954_nodered
21-10-20 14:33:35 INFO (MainThread) [supervisor.api.proxy] WebSocket access from a0d7b954_nodered
21-10-20 14:33:35 INFO (MainThread) [supervisor.api.proxy] WebSocket access from a0d7b954_nodered
21-10-20 14:33:35 INFO (MainThread) [supervisor.api.proxy] WebSocket access from a0d7b954_nodered
21-10-20 14:33:35 INFO (MainThread) [supervisor.api.proxy] WebSocket access from a0d7b954_nodered
21-10-20 14:33:35 INFO (MainThread) [supervisor.api.proxy] WebSocket access from a0d7b954_nodered
21-10-20 14:33:35 INFO (MainThread) [supervisor.api.proxy] WebSocket access from a0d7b954_nodered
21-10-20 14:33:35 INFO (MainThread) [supervisor.api.proxy] WebSocket access from a0d7b954_nodered
21-10-20 14:33:36 INFO (MainThread) [supervisor.api.proxy] Home Assistant WebSocket API request running
21-10-20 14:33:36 INFO (MainThread) [supervisor.api.proxy] Home Assistant WebSocket API request running
21-10-20 14:33:36 INFO (MainThread) [supervisor.api.proxy] Home Assistant WebSocket API request running
21-10-20 14:33:36 INFO (MainThread) [supervisor.api.proxy] Home Assistant WebSocket API request running
21-10-20 14:33:36 INFO (MainThread) [supervisor.api.proxy] Home Assistant WebSocket API request running
21-10-20 14:33:36 INFO (MainThread) [supervisor.api.proxy] Home Assistant WebSocket API request running
21-10-20 14:33:36 INFO (MainThread) [supervisor.api.proxy] Home Assistant WebSocket API request running
21-10-20 14:33:36 INFO (MainThread) [supervisor.api.proxy] Home Assistant WebSocket API request running
21-10-20 14:33:36 INFO (MainThread) [supervisor.api.proxy] Home Assistant WebSocket API request running
21-10-20 14:33:36 INFO (MainThread) [supervisor.api.proxy] Home Assistant WebSocket API request running
21-10-20 14:33:36 INFO (MainThread) [supervisor.api.proxy] Home Assistant WebSocket API request running
21-10-20 14:33:36 INFO (MainThread) [supervisor.api.proxy] Home Assistant WebSocket API request running
21-10-20 14:33:36 INFO (MainThread) [supervisor.api.proxy] Home Assistant WebSocket API request running
21-10-20 14:33:36 INFO (MainThread) [supervisor.api.proxy] Home Assistant WebSocket API request running
21-10-20 14:33:36 INFO (MainThread) [supervisor.api.proxy] Home Assistant WebSocket API request running
21-10-20 14:33:36 INFO (MainThread) [supervisor.api.proxy] Home Assistant WebSocket API request running
21-10-20 14:33:36 INFO (MainThread) [supervisor.api.proxy] Home Assistant WebSocket API request running
21-10-20 14:33:36 INFO (MainThread) [supervisor.api.proxy] Home Assistant WebSocket API request running
21-10-20 14:33:36 INFO (MainThread) [supervisor.api.proxy] Home Assistant WebSocket API request running
21-10-20 14:33:36 INFO (MainThread) [supervisor.api.proxy] Home Assistant WebSocket API request running
21-10-20 14:33:36 INFO (MainThread) [supervisor.api.proxy] Home Assistant WebSocket API request running
21-10-20 14:33:36 INFO (MainThread) [supervisor.api.proxy] Home Assistant WebSocket API request running
21-10-20 14:33:36 INFO (MainThread) [supervisor.api.proxy] Home Assistant WebSocket API request running
21-10-20 14:33:36 INFO (MainThread) [supervisor.api.proxy] Home Assistant WebSocket API request running
21-10-20 14:33:36 INFO (MainThread) [supervisor.api.proxy] Home Assistant WebSocket API request running
21-10-20 14:33:36 INFO (MainThread) [supervisor.api.proxy] Home Assistant WebSocket API request running
21-10-20 14:33:36 INFO (MainThread) [supervisor.api.proxy] Home Assistant WebSocket API request running
21-10-20 14:33:36 INFO (MainThread) [supervisor.api.proxy] Home Assistant WebSocket API request running
21-10-20 14:33:36 INFO (MainThread) [supervisor.api.proxy] Home Assistant WebSocket API request running
21-10-20 14:33:36 INFO (MainThread) [supervisor.api.proxy] Home Assistant WebSocket API request running
21-10-20 14:33:36 INFO (MainThread) [supervisor.api.proxy] Home Assistant WebSocket API request running
21-10-20 14:33:36 INFO (MainThread) [supervisor.api.proxy] Home Assistant WebSocket API request running
21-10-20 14:33:36 INFO (MainThread) [supervisor.api.proxy] Home Assistant WebSocket API request running
21-10-20 14:33:36 INFO (MainThread) [supervisor.api.proxy] Home Assistant WebSocket API request running
21-10-20 14:33:36 INFO (MainThread) [supervisor.api.proxy] Home Assistant WebSocket API request running
21-10-20 14:33:36 INFO (MainThread) [supervisor.api.proxy] Home Assistant WebSocket API request running
21-10-20 14:33:36 INFO (MainThread) [supervisor.api.proxy] Home Assistant WebSocket API request running
21-10-20 14:33:36 INFO (MainThread) [supervisor.api.proxy] Home Assistant WebSocket API request running
21-10-20 14:33:37 INFO (MainThread) [supervisor.api.proxy] Home Assistant WebSocket API request running
21-10-20 14:33:37 INFO (MainThread) [supervisor.api.proxy] Home Assistant WebSocket API request running
21-10-20 14:33:37 INFO (MainThread) [supervisor.api.proxy] Home Assistant WebSocket API request running
21-10-20 14:33:37 INFO (MainThread) [supervisor.api.proxy] Home Assistant WebSocket API request running
21-10-20 14:33:37 INFO (MainThread) [supervisor.api.proxy] Home Assistant WebSocket API request running
21-10-20 14:33:37 INFO (MainThread) [supervisor.api.proxy] Home Assistant WebSocket API request running
21-10-20 14:33:37 INFO (MainThread) [supervisor.api.proxy] Home Assistant WebSocket API request running
21-10-20 14:33:37 INFO (MainThread) [supervisor.api.proxy] Home Assistant WebSocket API request running
21-10-20 14:33:37 INFO (MainThread) [supervisor.api.proxy] Home Assistant WebSocket API request running
21-10-20 14:33:37 INFO (MainThread) [supervisor.api.proxy] Home Assistant WebSocket API request running
21-10-20 14:33:37 INFO (MainThread) [supervisor.api.proxy] Home Assistant WebSocket API request running
21-10-20 14:33:37 INFO (MainThread) [supervisor.api.proxy] Home Assistant WebSocket API request running
21-10-20 14:33:37 INFO (MainThread) [supervisor.api.proxy] Home Assistant WebSocket API request running
21-10-20 14:33:37 INFO (MainThread) [supervisor.api.proxy] Home Assistant WebSocket API request running
21-10-20 14:33:37 INFO (MainThread) [supervisor.api.proxy] Home Assistant WebSocket API request running
21-10-20 14:33:37 INFO (MainThread) [supervisor.api.proxy] Home Assistant WebSocket API request running
21-10-20 14:33:37 INFO (MainThread) [supervisor.api.proxy] Home Assistant WebSocket API request running
21-10-20 14:33:37 INFO (MainThread) [supervisor.api.proxy] Home Assistant WebSocket API request running
21-10-20 14:33:37 INFO (MainThread) [supervisor.api.proxy] Home Assistant WebSocket API request running
21-10-20 14:33:37 INFO (MainThread) [supervisor.api.proxy] Home Assistant WebSocket API request running
21-10-20 14:33:37 INFO (MainThread) [supervisor.api.proxy] Home Assistant WebSocket API request running
21-10-20 14:33:37 INFO (MainThread) [supervisor.api.proxy] Home Assistant WebSocket API request running
21-10-20 14:33:37 INFO (MainThread) [supervisor.api.proxy] Home Assistant WebSocket API request running
21-10-20 14:33:37 INFO (MainThread) [supervisor.api.proxy] Home Assistant WebSocket API request running
21-10-20 14:33:37 INFO (MainThread) [supervisor.api.proxy] Home Assistant WebSocket API request running
21-10-20 14:33:37 INFO (MainThread) [supervisor.api.proxy] Home Assistant WebSocket API request running
21-10-20 14:33:37 INFO (MainThread) [supervisor.api.proxy] Home Assistant WebSocket API request running
21-10-20 14:33:37 INFO (MainThread) [supervisor.api.proxy] Home Assistant WebSocket API request running
21-10-20 14:33:37 INFO (MainThread) [supervisor.api.proxy] Home Assistant WebSocket API request running
21-10-20 14:33:37 INFO (MainThread) [supervisor.api.proxy] Home Assistant WebSocket API request running
21-10-20 14:33:37 INFO (MainThread) [supervisor.api.proxy] Home Assistant WebSocket API request running
21-10-20 14:33:37 INFO (MainThread) [supervisor.api.proxy] Home Assistant WebSocket API request running
21-10-20 14:33:37 INFO (MainThread) [supervisor.api.proxy] Home Assistant WebSocket API request running
21-10-20 14:33:37 INFO (MainThread) [supervisor.api.proxy] Home Assistant WebSocket API request running
21-10-20 14:33:37 INFO (MainThread) [supervisor.api.proxy] Home Assistant WebSocket API request running
21-10-20 14:33:37 INFO (MainThread) [supervisor.api.proxy] Home Assistant WebSocket API request running
21-10-20 14:34:46 ERROR (MainThread) [supervisor.homeassistant.api] Error on call http://172.30.32.1:8123/api/config: 
21-10-20 14:34:56 WARNING (MainThread) [supervisor.misc.tasks] Watchdog/Application found a problem with observer plugin!
21-10-20 14:34:56 INFO (SyncWorker_1) [supervisor.docker.interface] Stopping hassio_observer application
21-10-20 14:35:00 INFO (SyncWorker_1) [supervisor.docker.interface] Cleaning hassio_observer application
21-10-20 14:35:00 INFO (MainThread) [supervisor.plugins.observer] Starting observer plugin
21-10-20 14:35:02 INFO (SyncWorker_3) [supervisor.docker.observer] Starting Observer ghcr.io/home-assistant/aarch64-hassio-observer with version 2021.06.0 - 172.30.32.6
21-10-20 14:36:06 ERROR (MainThread) [supervisor.homeassistant.api] Error on call http://172.30.32.1:8123/api/config: 
21-10-20 14:36:06 WARNING (MainThread) [supervisor.misc.tasks] Watchdog miss API response from Home Assistant
File "/usr/src/homeassistant/homeassistant/components/smartthings/smartapp.py", line 508, in smartapp_webhook
    result = await manager.handle_request(data, request.headers)
  File "/usr/local/lib/python3.9/site-packages/pysmartapp/smartapp.py", line 173, in handle_request
    raise SmartAppNotRegisteredError(req.installed_app_id)
pysmartapp.errors.SmartAppNotRegisteredError: SmartApp handler for installed app '01b825e8-31b8-4e54-814c-427c330a59fe' was not found.
2021-10-20 14:40:36 ERROR (MainThread) [homeassistant.components.webhook] Error processing webhook 4a2c0b3fdf0ae503d995aacb7ae39f9cb58ae57c6da8062cc178675981b04200
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/webhook/__init__.py", line 106, in async_handle_webhook
    response = await webhook["handler"](hass, webhook_id, request)
  File "/usr/src/homeassistant/homeassistant/components/smartthings/smartapp.py", line 508, in smartapp_webhook
    result = await manager.handle_request(data, request.headers)
  File "/usr/local/lib/python3.9/site-packages/pysmartapp/smartapp.py", line 173, in handle_request
    raise SmartAppNotRegisteredError(req.installed_app_id)
pysmartapp.errors.SmartAppNotRegisteredError: SmartApp handler for installed app '01b825e8-31b8-4e54-814c-427c330a59fe' was not found.
2021-10-20 14:40:37 WARNING (MainThread) [custom_components.govee] Could not connect to Govee API: API: API-Error -1: _api_request_internal: error from aiohttp: ServerDisconnectedError('Server disconnected')
2021-10-20 14:40:37 ERROR (MainThread) [homeassistant.config_entries] Error setting up entry govee for govee
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 304, in async_setup
    result = await component.async_setup_entry(hass, self)  # type: ignore
  File "/config/custom_components/govee/__init__.py", line 67, in async_setup_entry
    await hub.rate_limit_delay()
AttributeError: 'Govee' object has no attribute 'rate_limit_delay'
2021-10-20 14:40:44 ERROR (MainThread) [snitun.client.client_peer] Challenge/Response error with SniTun server
2021-10-20 14:40:44 ERROR (MainThread) [hass_nabucasa.remote] Connection problem to snitun server
2021-10-20 14:40:53 WARNING (MainThread) [homeassistant.setup] Setup of automation is taking over 10 seconds.
2021-10-20 14:40:54 ERROR (MainThread) [homeassistant.components.yeelight] Failed to connect to bulb at 192.168.50.62
Traceback (most recent call last):
  File "/usr/local/lib/python3.9/asyncio/streams.py", line 52, in open_connection
    transport, _ = await loop.create_connection(
  File "/usr/local/lib/python3.9/asyncio/base_events.py", line 1041, in create_connection
    sock = await self._connect_sock(
  File "/usr/local/lib/python3.9/asyncio/base_events.py", line 955, in _connect_sock
    await self.sock_connect(sock, address)
  File "/usr/local/lib/python3.9/asyncio/selector_events.py", line 502, 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.9/asyncio/tasks.py", line 492, in wait_for
    fut.result()
asyncio.exceptions.CancelledError
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
  File "/usr/local/lib/python3.9/site-packages/yeelight/aio.py", line 225, in async_listen
    reader, writer = await asyncio.wait_for(
  File "/usr/local/lib/python3.9/asyncio/tasks.py", line 494, in wait_for
    raise exceptions.TimeoutError() from exc
asyncio.exceptions.TimeoutError
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/yeelight/__init__.py", line 291, in _async_from_discovery
    await _async_initialize(hass, entry, host)
  File "/usr/src/homeassistant/homeassistant/components/yeelight/__init__.py", line 211, in _async_initialize
    device = await _async_get_device(hass, host, entry)
  File "/usr/src/homeassistant/homeassistant/components/yeelight/__init__.py", line 782, in _async_get_device
    await device.bulb.async_listen(device.async_update_callback)
  File "/usr/local/lib/python3.9/site-packages/yeelight/aio.py", line 229, in async_listen
    raise_from(BulbException("Failed to connecto the the bulb."), ex)
  File "/usr/local/lib/python3.9/site-packages/future/utils/__init__.py", line 403, in raise_from
    exec(execstr, myglobals, mylocals)
  File "<string>", line 1, in <module>
yeelight.main.BulbException: Failed to connecto the the bulb.
2021-10-20 14:41:11 ERROR (MainThread) [homeassistant.components.light] Platform alexa_media does not generate unique IDs. ID 0be9c88e-0ddd-4762-8c9b-50095b4f9f4f already exists - ignoring light.ganesha_lamp_4
2021-10-20 14:41:11 ERROR (MainThread) [homeassistant.components.light] Platform alexa_media does not generate unique IDs. ID 2d038181-0782-4444-a1df-2502f376dfac already exists - ignoring light.hue_play_2_2
2021-10-20 14:41:11 ERROR (MainThread) [homeassistant.components.light] Platform alexa_media does not generate unique IDs. ID 39cb0a19-b6c9-438d-a9c3-88c42cea7558 already exists - ignoring light.hue_play_1_2
2021-10-20 14:41:11 ERROR (MainThread) [homeassistant.components.light] Platform alexa_media does not generate unique IDs. ID 631756d9-3ed2-4773-b2b3-eb9d4d8a8e10 already exists - ignoring light.bedroom_4
2021-10-20 14:41:11 ERROR (MainThread) [homeassistant.components.light] Platform alexa_media does not generate unique IDs. ID 5f3a3633-6a7b-4cbc-86aa-ac97d338921b already exists - ignoring light.study_room_4
2021-10-20 14:41:11 ERROR (MainThread) [homeassistant.components.light] Platform alexa_media does not generate unique IDs. ID 71fce062-a848-41c6-9467-828f7b4c49a5 already exists - ignoring light.hue_color_lamp_1_4
2021-10-20 14:41:11 ERROR (MainThread) [homeassistant.components.light] Platform alexa_media does not generate unique IDs. ID 587b4d98-f117-4438-95f6-c0a35d620766 already exists - ignoring light.hue_ambiance_lamp_2_4
2021-10-20 14:41:14 ERROR (MainThread) [homeassistant] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/discovery.py", line 158, in async_load_platform
    assert hass_config, "You need to pass in the real hass config"
AssertionError: You need to pass in the real hass config
2021-10-20 14:41:14 ERROR (MainThread) [homeassistant] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/discovery.py", line 158, in async_load_platform
    assert hass_config, "You need to pass in the real hass config"
AssertionError: You need to pass in the real hass config
2021-10-20 14:41:14 ERROR (MainThread) [homeassistant] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/discovery.py", line 158, in async_load_platform
    assert hass_config, "You need to pass in the real hass config"
AssertionError: You need to pass in the real hass config
2021-10-20 14:41:14 ERROR (MainThread) [homeassistant] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/discovery.py", line 158, in async_load_platform
    assert hass_config, "You need to pass in the real hass config"
AssertionError: You need to pass in the real hass config
2021-10-20 14:41:14 ERROR (MainThread) [homeassistant] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/discovery.py", line 158, in async_load_platform
    assert hass_config, "You need to pass in the real hass config"
AssertionError: You need to pass in the real hass config

Are you sure ZHA is completely uninstalled ?

Yes, i have removed all devices from ZHA first before removing the integration and also the Zigbee.db inside Config, before migrating to Z2Mqtt.

Is there any steps that i have missed?

After much troubleshooting and disabling couple of Add-Ons, i found that NodeRed is the cause of the Reboots, not sure why. When i disabled it the rebooting issue stopped.

Right now not sure, how i am going to get this resolved…