sabeechen / hassio-google-drive-backup

Automatically create and sync Home Assistant backups into Google Drive
MIT License
3.19k stars 197 forks source link

Zigbee2MQTT never restarts after being stopped by google drive backup. #930

Closed thestraycat closed 1 year ago

thestraycat commented 1 year ago

I've noticed in my Zigbee2MQTT logs that when the google backup plugin stops it, that it never seems to restart properly. (it has a dependancy on Mosquitto MQTT Broker) I'm wondering whether google backup restarts the Z2M plugin before it restarts the Mosquitto Broker MQTT plugin (this would be in reverse order) and that this is why Z2M plugin never recovers once google drive backup has stopped it. Logs show:

[08:01:58] INFO: Preparing to start... [08:01:59] INFO: Socat not enabled [08:02:02] INFO: Starting Zigbee2MQTT... Zigbee2MQTT:info 2023-11-06 08:02:09: Logging to console and directory: '/config/zigbee2mqtt/log/2023-11-06.08-02-09' filename: log.txt Zigbee2MQTT:info 2023-11-06 08:02:09: Starting Zigbee2MQTT version 1.33.2 (commit #unknown) Zigbee2MQTT:info 2023-11-06 08:02:09: Starting zigbee-herdsman (0.21.0) Assertion failed: Command (setConfigurationValue) returned unexpected state: [object Object] Zigbee2MQTT:info 2023-11-06 08:02:12: zigbee-herdsman started (resumed) Zigbee2MQTT:info 2023-11-06 08:02:12: Coordinator firmware version: '{"meta":{"maintrel":"1 ","majorrel":"7","minorrel":"3","product":12,"revision":"7.3.1.0 build 176"},"type":"EZSP v12"}' Zigbee2MQTT:info 2023-11-06 08:02:12: Set transmit power to '20' Zigbee2MQTT:info 2023-11-06 08:02:12: Currently 12 devices are joined: Zigbee2MQTT:info 2023-11-06 08:02:12: Studio Light (0xdc8e95fffe357ffe): HK-DIM-A - Candeo Zigbee LED dimmer smart switch (Router) Zigbee2MQTT:info 2023-11-06 08:02:12: Hallway Light (0xdc8e95fffe357888): HK-DIM-A - Candeo Zigbee LED dimmer smart switch (Router) Zigbee2MQTT:info 2023-11-06 08:02:12: Kitchen Light (0xdc8e95fffe357320): HK-DIM-A - Candeo Zigbee LED dimmer smart switch (Router) Zigbee2MQTT:info 2023-11-06 08:02:12: Sunroom Light (0xdc8e95fffe356f42): HK-DIM-A - Candeo Zigbee LED dimmer smart switch (Router) Zigbee2MQTT:info 2023-11-06 08:02:12: Olly_Cube (0x54ef441000712068): CTP-R01 - Xiaomi Aqara magic cube T1 Pro (EndDevice) Zigbee2MQTT:info 2023-11-06 08:02:12: Reception Light (0xdc8e95fffe357606): HK-DIM-A - Candeo Zigbee LED dimmer smart switch (Router) Zigbee2MQTT:info 2023-11-06 08:02:12: Lounge Light (0xdc8e95fffe3575f4): HK-DIM-A - Candeo Zigbee LED dimmer smart switch (Router) Zigbee2MQTT:info 2023-11-06 08:02:12: Dining Light (0xdc8e95fffe2539a0): HK-DIM-A - Candeo Zigbee LED dimmer smart switch (Router) Zigbee2MQTT:info 2023-11-06 08:02:12: Study Light (0xdc8e95fffe2539e8): HK-DIM-A - Candeo Zigbee LED dimmer smart switch (Router) Zigbee2MQTT:info 2023-11-06 08:02:12: Porch Light (0xdc8e95fffe2564e3): HK-DIM-A - Candeo Zigbee LED dimmer smart switch (Router) Zigbee2MQTT:info 2023-11-06 08:02:12: Bedroom Light (0xdc8e95fffe357614): HK-DIM-A - Candeo Zigbee LED dimmer smart switch (Router) Zigbee2MQTT:info 2023-11-06 08:02:12: Letter Box (0x00158d0008a756df): MCCGQ11LM - Xiaomi Aqara door & window contact sensor (EndDevice) Zigbee2MQTT:info 2023-11-06 08:02:12: Zigbee: disabling joining new devices. Zigbee2MQTT:info 2023-11-06 08:02:12: Connecting to MQTT server at mqtt://core-mosquitto:1883 Zigbee2MQTT:error 2023-11-06 08:02:16: MQTT error: getaddrinfo ENOTFOUND core-mosquitto Zigbee2MQTT:error 2023-11-06 08:02:16: MQTT failed to connect, exiting... Zigbee2MQTT:info 2023-11-06 08:02:16: Stopping zigbee-herdsman... Zigbee2MQTT:info 2023-11-06 08:02:16: Stopped zigbee-herdsman

sabeechen commented 1 year ago

Sorry its taken me a while to get back to you on this. I plan to remove this feature in the near future, as now that Home Assistant allows addons to "prepare" for backups appropriately I'm not aware of a situation where it still needs to happen (maybe you know of one?). It'd recommend just disabling the addon stops.

thestraycat commented 1 year ago

Ah cool - And thank you for the reply. So to confirm when running (mosquitto, Zigbee2mqtt and others... )its safe to set google backup to not turn off addons during backup?

sabeechen commented 1 year ago

As far as I know, yes. I'm not aware of any situation where an addon can't be beaked up without stopping it.