dresden-elektronik / deconz-rest-plugin

deCONZ REST-API plugin to control ZigBee devices
BSD 3-Clause "New" or "Revised" License
1.9k stars 502 forks source link

Not all device groups (sensors/lights/switches) restoring on backup #3108

Open popy2k14 opened 4 years ago

popy2k14 commented 4 years ago

Describe the bug

I have restarted my raspberry pi4 today multiple times (nice shutdown/reboot with cmd - NO powerloss). After that i have lost half of my ~100 devices (hue motion sensors, dimmer switch, ...)

Steps to reproduce the behavior

unkown

Expected behavior

not loose half of my devices!

Environment

2.05.78 conbee II with latest firmware

Fix

I have pulled a backup prior to restore and saw that the file was almost ~500kB in size! Normaly my backups are ~50 kB. i have fixed it by restoring my last backup which was ~50 kB from last week. Now every device is up and running again.

I can provide the faulty ~500 kB backup if needed. But dont want to upload here because of sensible data in it (unique adresses...)

Mimiix commented 4 years ago

Hi!

Any logs?

Most of the time, the devices recover in function and it can take up to one hour before it is fully up again.

Also: how long was the downtime?

popy2k14 commented 4 years ago

Sorry, no logs :-(

The downtime was about ~1h because i moved my raspbian installation to an SSD. Ok, did'nt know that. I have also pressed every switch, jumped before every motion sensor .... but non of the devices showd up in a few minutes. After restoring the backup the was fully up in a few seconds. Maybe just had to wait longer...

Will keep an eye on this, thx

Mimiix commented 4 years ago

For next time:

I'll close this issue for now. If it happens again, let me know :) I'm happy you solved it.

popy2k14 commented 4 years ago

Just let you know:

With my initial post (LOST) i'll mean lost -> the lost devices where'nt reported over api with their ID. It was like they where never be paired!

When i'll got you right you mean the devices was just not online in the zigbee net for sending/receiving messages. That was not the case. They where not present in phoscon/fhem (over rest API).

Mimiix commented 4 years ago

@popy2k14 Aah! That changes things.

I've seen this hapening with a "group" of devices. Let's say: People losing their switches while having lights and sensors.

The backup just simply didn't restore them. Does this sound suitable for your case?

popy2k14 commented 4 years ago

Yes, this was the case. Some devices (mostly sensors) are just gone from phoscon/fhem. There was just missing IDs in between other devices, which where present. I have tried to repair one HUE dimmer switch and phoscon has created completly new ID, like the switch with the same zigbee MAC was never paired (in the deconz database).

In my case restoring a backup solved the issue.

I have'nt enabled additional debug logs, but i can look if i can find some. Can you please point me to the correct path to look for debug logs?

thx

Mimiix commented 4 years ago

I'll bring this up with @manup in person. He might request more information.

Thanks!

popy2k14 commented 4 years ago

thx, i am here if you need any additional informations.