hassio-zigbee2mqtt icon indicating copy to clipboard operation
hassio-zigbee2mqtt copied to clipboard

Backup file coordinator_backup.json is not updated when the addon is restarted

Open Enzokot opened this issue 4 years ago • 15 comments

Description of problem: Backup file coordinator_backup.json is not updated when the addon is restarted or stoped. Only UI restart button update the backup file.

Running platform (details from Suypervisor > System)

Add-on: 1.21.0-1
Core: core-2021.7.4
Supervisor: supervisor-2021.06.8
Operating System: Raspbian GNU/Linux 10 (buster)

Enzokot avatar Aug 02 '21 17:08 Enzokot

I can look to fix this if you can point me to how the UI is triggering the backup update.

ciotlosm avatar Aug 12 '21 12:08 ciotlosm

In UI go to the Settings->Tools->Restart Zigbee2MQTT

Screenshot_20210812-155024_Home Assistant

Enzokot avatar Aug 12 '21 12:08 Enzokot

@ciotlosm did I misunderstand the question?

Enzokot avatar Aug 15 '21 09:08 Enzokot

Nope, but was curious of the code behind the restart backup, not the button. I will have to dig more in the code to see what I could add to the s6 container to perform the backup at restart

ciotlosm avatar Aug 15 '21 09:08 ciotlosm

+1. Same behavior in 1.21.1 HA add-on.

hacker-cb avatar Sep 27 '21 16:09 hacker-cb

@ciotlosm any news?

Enzokot avatar Oct 10 '21 10:10 Enzokot

@Koenkk can you help us with fix?

Enzokot avatar Dec 27 '21 09:12 Enzokot

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 7 days

github-actions[bot] avatar Jun 07 '22 00:06 github-actions[bot]

Keep alive

Enzokot avatar Jun 07 '22 03:06 Enzokot

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 7 days

github-actions[bot] avatar Jul 08 '22 00:07 github-actions[bot]

Keep alive

Enzokot avatar Jul 08 '22 04:07 Enzokot

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 7 days

github-actions[bot] avatar Aug 08 '22 00:08 github-actions[bot]

Keep alive

Enzokot avatar Aug 08 '22 04:08 Enzokot

Can you provide the herdsman debug log of this?

See https://www.zigbee2mqtt.io/guide/usage/debug.html on how to enable the herdsman debug logging. Note that this is only logged to STDOUT and not to log files.

Koenkk avatar Aug 08 '22 15:08 Koenkk

Can you provide the herdsman debug log of this?

See https://www.zigbee2mqtt.io/guide/usage/debug.html on how to enable the herdsman debug logging. Note that this is only logged to STDOUT and not to log files.

Yes, I add zigbee_herdsman_debug: true and grab log file with command docker logs CONTAINER_ID > log.txt 2>&1 After that restart addon twice, the last one log file in attachment log.txt

Enzokot avatar Aug 08 '22 15:08 Enzokot

Just wanted to let you know that I found a possible solution, will update you probably later this week.

Koenkk avatar Aug 17 '22 20:08 Koenkk

This should be partially fixed now (https://github.com/zigbee2mqtt/hassio-zigbee2mqtt/commit/5fb69e744271487ed0bc333b8148d015b37ad643). However if the backup takes longer than 10 seconds docker will kill the container resulting in no backup.

Can you check if this fixed the issue for you @Enzokot ? (use the edge addon)

Koenkk avatar Aug 19 '22 21:08 Koenkk

@Koenkk Seems this fix work correctly for me with edge addon

Enzokot avatar Aug 20 '22 04:08 Enzokot

Great! Then this can be closed now 😄

Koenkk avatar Aug 21 '22 08:08 Koenkk

Thanks!

Enzokot avatar Aug 21 '22 08:08 Enzokot