How to restart zigbee2MQTT after a Home Assistant Restart

Since you use VM, you could move Zigbee2mqtt and Mosquitto to a second VM.

1 Like

Settings/System/Logs —> at the bottom ‘download full log’

Make a restart, and wait until HA is up and running…:wink:

1 Like

Absolutely - as I transitioned to Home Assistant I wanted to keep as much vanilla as I could possibly do.

In fact I transitioned zigbee2MQTT and MQTT across into Home Assistant to reduce the admin load, ie updates to zigbee2MQTT and mqtt and just streamline it.

Is the recommendation to maintain them outside of Home Assistant ?

I am open any and all ideas :slight_smile:

I have seen there are issues with Ikea and Hue bulbs so will transition them back to hue hub and see if that helps.

I’ll also restart Home Assistant and grab full logs and see if we can hunt down the issues

All I can say, I have been running Zigbee2MQTT since 2019, and never had to restart Zigbee2MQTT after a HA restart. But Zigbee2MQTT and Mosquitto have always run independent of HA.

2 Likes

I had been running zigbee2MQTT and mqtt with Node Red for about a year without issue before migrating it under Home Assistant.

Let’s not rule out I have done something incredibly stupid here, not outside the realm of possibility :slight_smile:

1 Like

Ok restarted Home Assistant selected download full log.

Trying to find now.

I have in the config folder, home-assistant.log and home-assistant.log.1

Is that what you need? DO I post it here is there going to be stuff in there I should not share publicly?

Please use the DownLoad Full Logs button…

And then upload it somewhere (google-drive, dropbox etc) and share it?

(and if you post it here, everyone can analyze it instead of just me (i will be busy traveling until Thursday))

1 Like

Took a quick look and noted you use a lot of custom integrations.
For starters I would (temporary) disable the custom integrations, and see if that solves it.
If it does, re-enable them one by one…

We found a custom integration robovac 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
etc etc

(which is quite self explanatory :wink: )

1 Like

We’re now getting ot in this thread. And you might like to post on z2m’s GitHub.

Ok thanks.

I have disabled 25 of the custom integrations, had to leave some running to keep baseline functionality.

I have disabled auto Home Assistant reboot everyday at 4am.

Let’s see if Home Assistant stabilises.

I’ll give it two weeks. If the issue reappears I’ll migrate the hue bulbs off zigbee2MQTT and back to hue as the official Hue integration appears stable.

I am keeping a journal, so when I post their I have log captures, times, dates etc rather than the more vague reporting I started with here.

When this only happens once a week, but is catastrophic, and invariably are not aware of the issue until hours later, it is difficult to be specific.

I have learned a lot about Home Assistant logging :slight_smile:

Are the ‘weird’ log entries still there?

Am rebooting and will capture logs and post somewhere for you to access.

I will disable the automation that restarts zigbee2MQTT and see if the issue remains.

Mmm

Logs still moaning about now disabled integrations…

2024-04-16 11:39:59.969 WARNING (SyncWorker_3) [homeassistant.loader] We found a custom integration robovac 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-04-16 11:39:59.969 WARNING (SyncWorker_3) [homeassistant.loader] We found a custom integration sonoff 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-04-16 11:39:59.970 WARNING (SyncWorker_3) [homeassistant.loader] We found a custom integration battery_consumption 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-04-16 11:39:59.970 WARNING (SyncWorker_3) [homeassistant.loader] We found a custom integration daily 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-04-16 11:39:59.970 WARNING (SyncWorker_3) [homeassistant.loader] We found a custom integration streamdeck 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-04-16 11:39:59.971 WARNING (SyncWorker_3) [homeassistant.loader] We found a custom integration alarmo 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-04-16 11:39:59.971 WARNING (SyncWorker_3) [homeassistant.loader] We found a custom integration unifigateway 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-04-16 11:39:59.972 WARNING (SyncWorker_3) [homeassistant.loader] We found a custom integration webrtc 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-04-16 11:39:59.972 WARNING (SyncWorker_3) [homeassistant.loader] We found a custom integration battery_notes 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-04-16 11:39:59.973 WARNING (SyncWorker_3) [homeassistant.loader] We found a custom integration energy_meter 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-04-16 11:39:59.973 WARNING (SyncWorker_3) [homeassistant.loader] We found a custom integration myenergi 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-04-16 11:39:59.973 WARNING (SyncWorker_3) [homeassistant.loader] We found a custom integration eufy_security 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-04-16 11:39:59.974 WARNING (SyncWorker_3) [homeassistant.loader] We found a custom integration hildebrand_glow_ihd 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-04-16 11:39:59.974 WARNING (SyncWorker_3) [homeassistant.loader] We found a custom integration nodered 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-04-16 11:39:59.975 WARNING (SyncWorker_3) [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

2024-04-16 11:39:59.975 WARNING (SyncWorker_3) [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-04-16 11:39:59.975 WARNING (SyncWorker_3) [homeassistant.loader] We found a custom integration victron 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-04-16 11:40:01.320 WARNING (MainThread) [homeassistant.helpers.frame] Detected that custom integration ‘hacs’ accesses hass.components.frontend. This is deprecated and will stop working in Home Assistant 2024.9, it should be updated to import functions used from frontend directly at custom_components/hacs/frontend.py, line 68: hass.components.frontend.async_register_built_in_panel(, please create a bug report at Issues · hacs/integration · GitHub

2024-04-16 11:40:01.543 WARNING (MainThread) [custom_components.govee] API is back online.

2024-04-16 11:40:02.107 WARNING (MainThread) [slixmpp.stringprep] Using slower stringprep, consider compiling the faster cython/libidn one.

2024-04-16 11:40:02.189 WARNING (MainThread) [homeassistant.components.mqtt.discovery] Unable to parse JSON vacuumcleaner-state: ‘null’

2024-04-16 11:40:02.189 WARNING (MainThread) [homeassistant.components.mqtt.discovery] Unable to parse JSON measure-work-mode: ‘null’

2024-04-16 11:40:02.189 WARNING (MainThread) [homeassistant.components.mqtt.discovery] Unable to parse JSON measure-work-status: ‘null’

2024-04-16 11:40:02.189 WARNING (MainThread) [homeassistant.components.mqtt.discovery] Unable to parse JSON measure-battery: ‘null’

2024-04-16 11:40:02.189 WARNING (MainThread) [homeassistant.components.mqtt.discovery] Unable to parse JSON measure-error: ‘null’

2024-04-16 11:40:02.189 WARNING (MainThread) [homeassistant.components.mqtt.discovery] Unable to parse JSON charge-mode-selector: ‘null’

2024-04-16 11:40:02.189 WARNING (MainThread) [homeassistant.components.mqtt.discovery] Unable to parse JSON set-minimum-green-level: ‘null’

2024-04-16 11:40:02.189 WARNING (MainThread) [homeassistant.components.mqtt.discovery] Unable to parse JSON charge-mode: ‘null’

2024-04-16 11:40:02.189 WARNING (MainThread) [homeassistant.components.mqtt.discovery] Unable to parse JSON charge-mode-txt: ‘null’

2024-04-16 11:40:02.189 WARNING (MainThread) [homeassistant.components.mqtt.discovery] Unable to parse JSON charger-status: ‘null’

2024-04-16 11:40:02.189 WARNING (MainThread) [homeassistant.components.mqtt.discovery] Unable to parse JSON charger-status-txt: ‘null’

2024-04-16 11:40:02.189 WARNING (MainThread) [homeassistant.components.mqtt.discovery] Unable to parse JSON charge-session-consumption: ‘null’

2024-04-16 11:40:02.189 WARNING (MainThread) [homeassistant.components.mqtt.discovery] Unable to parse JSON meter-power: ‘null’

2024-04-16 11:40:02.189 WARNING (MainThread) [homeassistant.components.mqtt.discovery] Unable to parse JSON measure-power: ‘null’

2024-04-16 11:40:02.189 WARNING (MainThread) [homeassistant.components.mqtt.discovery] Unable to parse JSON measure-current: ‘null’

2024-04-16 11:40:02.189 WARNING (MainThread) [homeassistant.components.mqtt.discovery] Unable to parse JSON measure-voltage: ‘null’

2024-04-16 11:40:02.189 WARNING (MainThread) [homeassistant.components.mqtt.discovery] Unable to parse JSON measure-frequency: ‘null’

2024-04-16 11:40:02.189 WARNING (MainThread) [homeassistant.components.mqtt.discovery] Unable to parse JSON zappi-boost-mode: ‘null’

2024-04-16 11:40:02.190 WARNING (MainThread) [homeassistant.components.mqtt.discovery] Unable to parse JSON minimum-green-level: ‘null’

2024-04-16 11:40:02.190 WARNING (MainThread) [homeassistant.components.mqtt.discovery] Unable to parse JSON zappi-boost-kwh: ‘null’

2024-04-16 11:40:02.190 WARNING (MainThread) [homeassistant.components.mqtt.discovery] Unable to parse JSON zappi-boost-time: ‘null’

2024-04-16 11:40:02.190 WARNING (MainThread) [homeassistant.components.mqtt.discovery] Unable to parse JSON zappi-boost-kwh-remaining: ‘null’

2024-04-16 11:40:02.190 WARNING (MainThread) [homeassistant.components.mqtt.discovery] Unable to parse JSON meter-power: ‘null’

2024-04-16 11:40:02.190 WARNING (MainThread) [homeassistant.components.mqtt.discovery] Unable to parse JSON measure-power: ‘null’

2024-04-16 11:40:02.190 WARNING (MainThread) [homeassistant.components.mqtt.discovery] Unable to parse JSON ct1-type: ‘null’

2024-04-16 11:40:02.190 WARNING (MainThread) [homeassistant.components.mqtt.discovery] Unable to parse JSON measure-power-ct1: ‘null’

2024-04-16 11:40:02.190 WARNING (MainThread) [homeassistant.components.mqtt.discovery] Unable to parse JSON ct2-type: ‘null’

2024-04-16 11:40:02.190 WARNING (MainThread) [homeassistant.components.mqtt.discovery] Unable to parse JSON measure-power-ct2: ‘null’

2024-04-16 11:40:02.190 WARNING (MainThread) [homeassistant.components.mqtt.discovery] Unable to parse JSON ct3-type: ‘null’

2024-04-16 11:40:02.190 WARNING (MainThread) [homeassistant.components.mqtt.discovery] Unable to parse JSON measure-power-ct3: ‘null’

2024-04-16 11:40:02.190 WARNING (MainThread) [homeassistant.components.mqtt.discovery] Unable to parse JSON vacuumcleaner-state: ‘null’

2024-04-16 11:40:02.190 WARNING (MainThread) [homeassistant.components.mqtt.discovery] Unable to parse JSON measure-work-mode: ‘null’

2024-04-16 11:40:02.190 WARNING (MainThread) [homeassistant.components.mqtt.discovery] Unable to parse JSON measure-work-status: ‘null’

2024-04-16 11:40:02.190 WARNING (MainThread) [homeassistant.components.mqtt.discovery] Unable to parse JSON measure-battery: ‘null’

2024-04-16 11:40:02.190 WARNING (MainThread) [homeassistant.components.mqtt.discovery] Unable to parse JSON measure-error: ‘null’

2024-04-16 11:40:02.463 WARNING (MainThread) [homeassistant.components.light] Entity None (<class ‘custom_components.govee.light.GoveeLightEntity’>) is using deprecated supported features values which will be removed in HA Core 2025.1. Instead it should use <LightEntityFeature: 19> and color modes, please create a bug report at Issues · LaggAt/hacs-govee · GitHub and reference Deprecating all magic numbers for supported features | Home Assistant Developer Docs

2024-04-16 11:40:02.463 WARNING (MainThread) [homeassistant.components.light] None (<class ‘custom_components.govee.light.GoveeLightEntity’>) does not set supported color modes, this will stop working in Home Assistant Core 2025.3, please create a bug report at Issues · LaggAt/hacs-govee · GitHub

2024-04-16 11:40:02.463 WARNING (MainThread) [homeassistant.components.light] Entity None (<class ‘custom_components.govee.light.GoveeLightEntity’>) is using deprecated supported features values which will be removed in HA Core 2025.1. Instead it should use <LightEntityFeature: 19> and color modes, please create a bug report at Issues · LaggAt/hacs-govee · GitHub and reference Deprecating all magic numbers for supported features | Home Assistant Developer Docs

2024-04-16 11:40:02.463 WARNING (MainThread) [homeassistant.components.light] None (<class ‘custom_components.govee.light.GoveeLightEntity’>) does not set supported color modes, this will stop working in Home Assistant Core 2025.3, please create a bug report at Issues · LaggAt/hacs-govee · GitHub

2024-04-16 11:40:02.660 WARNING (MainThread) [homeassistant.components.sensor] Entity sensor.energy_battery_discharge_to_house (<class ‘homeassistant.components.integration.sensor.IntegrationSensor’>) is using native unit of measurement ‘kWd’ which is not a valid unit for the device class (‘energy’) it is using; expected one of [‘MWh’, ‘MJ’, ‘GJ’, ‘kWh’, ‘Wh’]; Please update your configuration if your entity is manually configured, otherwise create a bug report at Issues · home-assistant/core · GitHub

2024-04-16 11:40:03.327 WARNING (MainThread) [homeassistant.helpers.frame] Detected that custom integration ‘myenergi’ calls async_add_job, which is deprecated and will be removed in Home Assistant 2025.4; Please review Deprecating `async_run_job` and `async_add_job` | Home Assistant Developer Docs for replacement options at custom_components/myenergi/init.py, line 57: hass.async_add_job(, please create a bug report at Issues · CJNE/ha-myenergi · GitHub

Actually I suspect I may have an idea about the issue and I am investigating it.

I suspect an issue with Mqtt, need to confirm.

On first reboot Home Assistant has loads of issues with Mqtt devices, my automations kicks in restarts zigbee2MQTT and Home Assistant restores all the devices.

Investigating will return.


2024-04-16 11:59:26.142 WARNING (MainThread) [homeassistant.components.mqtt.discovery] Unable to parse JSON vacuumcleaner-state: 'null'
2024-04-16 11:59:26.142 WARNING (MainThread) [homeassistant.components.mqtt.discovery] Unable to parse JSON measure-work-mode: 'null'
2024-04-16 11:59:26.143 WARNING (MainThread) [homeassistant.components.mqtt.discovery] Unable to parse JSON measure-work-status: 'null'
2024-04-16 11:59:26.143 WARNING (MainThread) [homeassistant.components.mqtt.discovery] Unable to parse JSON measure-battery: 'null'
2024-04-16 11:59:26.143 WARNING (MainThread) [homeassistant.components.mqtt.discovery] Unable to parse JSON measure-error: 'null'
2024-04-16 11:59:26.143 WARNING (MainThread) [homeassistant.components.mqtt.discovery] Unable to parse JSON charge-mode-selector: 'null'
2024-04-16 11:59:26.143 WARNING (MainThread) [homeassistant.components.mqtt.discovery] Unable to parse JSON set-minimum-green-level: 'null'
2024-04-16 11:59:26.143 WARNING (MainThread) [homeassistant.components.mqtt.discovery] Unable to parse JSON charge-mode: 'null'
2024-04-16 11:59:26.143 WARNING (MainThread) [homeassistant.components.mqtt.discovery] Unable to parse JSON charge-mode-txt: 'null'
2024-04-16 11:59:26.143 WARNING (MainThread) [homeassistant.components.mqtt.discovery] Unable to parse JSON charger-status: 'null'
2024-04-16 11:59:26.143 WARNING (MainThread) [homeassistant.components.mqtt.discovery] Unable to parse JSON charger-status-txt: 'null'
2024-04-16 11:59:26.143 WARNING (MainThread) [homeassistant.components.mqtt.discovery] Unable to parse JSON charge-session-consumption: 'null'
2024-04-16 11:59:26.143 WARNING (MainThread) [homeassistant.components.mqtt.discovery] Unable to parse JSON meter-power: 'null'
2024-04-16 11:59:26.143 WARNING (MainThread) [homeassistant.components.mqtt.discovery] Unable to parse JSON measure-power: 'null'
2024-04-16 11:59:26.143 WARNING (MainThread) [homeassistant.components.mqtt.discovery] Unable to parse JSON measure-current: 'null'
2024-04-16 11:59:26.143 WARNING (MainThread) [homeassistant.components.mqtt.discovery] Unable to parse JSON measure-voltage: 'null'
2024-04-16 11:59:26.143 WARNING (MainThread) [homeassistant.components.mqtt.discovery] Unable to parse JSON measure-frequency: 'null'
2024-04-16 11:59:26.143 WARNING (MainThread) [homeassistant.components.mqtt.discovery] Unable to parse JSON zappi-boost-mode: 'null'
2024-04-16 11:59:26.143 WARNING (MainThread) [homeassistant.components.mqtt.discovery] Unable to parse JSON minimum-green-level: 'null'
2024-04-16 11:59:26.143 WARNING (MainThread) [homeassistant.components.mqtt.discovery] Unable to parse JSON zappi-boost-kwh: 'null'
2024-04-16 11:59:26.143 WARNING (MainThread) [homeassistant.components.mqtt.discovery] Unable to parse JSON zappi-boost-time: 'null'
2024-04-16 11:59:26.143 WARNING (MainThread) [homeassistant.components.mqtt.discovery] Unable to parse JSON zappi-boost-kwh-remaining: 'null'
2024-04-16 11:59:26.143 WARNING (MainThread) [homeassistant.components.mqtt.discovery] Unable to parse JSON meter-power: 'null'
2024-04-16 11:59:26.143 WARNING (MainThread) [homeassistant.components.mqtt.discovery] Unable to parse JSON measure-power: 'null'
2024-04-16 11:59:26.143 WARNING (MainThread) [homeassistant.components.mqtt.discovery] Unable to parse JSON ct1-type: 'null'
2024-04-16 11:59:26.143 WARNING (MainThread) [homeassistant.components.mqtt.discovery] Unable to parse JSON measure-power-ct1: 'null'
2024-04-16 11:59:26.143 WARNING (MainThread) [homeassistant.components.mqtt.discovery] Unable to parse JSON ct2-type: 'null'
2024-04-16 11:59:26.143 WARNING (MainThread) [homeassistant.components.mqtt.discovery] Unable to parse JSON measure-power-ct2: 'null'
2024-04-16 11:59:26.143 WARNING (MainThread) [homeassistant.components.mqtt.discovery] Unable to parse JSON ct3-type: 'null'
2024-04-16 11:59:26.143 WARNING (MainThread) [homeassistant.components.mqtt.discovery] Unable to parse JSON measure-power-ct3: 'null'
2024-04-16 11:59:26.143 WARNING (MainThread) [homeassistant.components.mqtt.discovery] Unable to parse JSON vacuumcleaner-state: 'null'
2024-04-16 11:59:26.143 WARNING (MainThread) [homeassistant.components.mqtt.discovery] Unable to parse JSON measure-work-mode: 'null'
2024-04-16 11:59:26.143 WARNING (MainThread) [homeassistant.components.mqtt.discovery] Unable to parse JSON measure-work-status: 'null'
2024-04-16 11:59:26.143 WARNING (MainThread) [homeassistant.components.mqtt.discovery] Unable to parse JSON measure-battery: 'null'
2024-04-16 11:59:26.144 WARNING (MainThread) [homeassistant.components.mqtt.discovery] Unable to parse JSON measure-error: 'null'
2024-04-16 11:59:26.175 WARNING (MainThread) [homeassistant.components.mqtt.discovery] Unable to parse JSON onoff: 'null'
2024-04-16 11:59:26.175 WARNING (MainThread) [homeassistant.components.mqtt.discovery] Unable to parse JSON buttonreset-meter: 'null'
2024-04-16 11:59:26.175 WARNING (MainThread) [homeassistant.components.mqtt.discovery] Unable to parse JSON buttonreload-capabilities: 'null'
2024-04-16 11:59:26.175 WARNING (MainThread) [homeassistant.components.mqtt.discovery] Unable to parse JSON ev-connected: 'null'
2024-04-16 11:59:26.175 WARNING (MainThread) [homeassistant.components.mqtt.discovery] Unable to parse JSON buttonreset-meter: 'null'
2024-04-16 11:59:26.175 WARNING (MainThread) [homeassistant.components.mqtt.discovery] Unable to parse JSON buttonreload-capabilities: 'null'

Ok these all appear to be disabled integrations so no surprise there.

Ok the disable auto zigbee2MQTT reboot after a Home Assistant restart failed

Now all my battery powered zigbee devices are:

“This entity is no longer being provided by the mqtt integration. If the entity is no longer in use, delete it in settings.”

They are fine in zigbee2MQTT and respond to commands - Home Assistant just loses them

Logger: homeassistant.helpers.service
Source: helpers/service.py:275
First occurred: 12:00:00 (1 occurrences)
Last logged: 12:00:00

Referenced entities cover.blind_ensuite are missing or not currently available

A restart of zigbee2MQTT restores them all in Home Assistant

Tried un-installing z2m and re-install it?

No

Would that involve re-pairing every device and fixing in Home Assistant ?

If I do - I’ll have to think about building a production version of Home Assistant and create another using a spare Home Assistant green theoretically I could share the zigbee2MQTT / mqtt between them maybe

No, it shouldn’t, z2m is a docker, but it’s database is stored in the shared folder and shouldn’t be deleted (but just made a full backup before you do, just in case) :wink:

1 Like