dresden-elektronik / deconz-rest-plugin

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

Restore is not working. Nodes are messed up and same goes for groups. #697

Closed donnib closed 5 years ago

donnib commented 6 years ago

image

Most of the nodes are 0x0000, Why is that ? I can't identify which one is what. The groups also are weird and doesn't show the right lights in them.

nero01 commented 6 years ago

I had the exact same, when i connected my new remotes, but the devices were detected correctly after waiting for about an hour.

donnib commented 6 years ago

@nero01 unfortunately that's not happening for me.

@manup My guess is that since the nodes knew it's gateway they connected to the gateway before i had a chance to restore the backup so now after backup is restored the system is confused ? Am i right in this assumption ? If so how can i solve it ? It would be nice if you had some time to answer this since i don't know what to do now to get my system back. I was hoping the backup/restore would work perfectly.

manup commented 6 years ago

The 0x0000 is just a gui bug and doesn't affect functionality. It will will be fixed in the next versions so that correct name from the database (or nwk address if not given) will be shown.

donnib commented 6 years ago

@manup ok but i see is the my groups does not include the light they did before the backup/restore. I see all nodes are up but somehow the relation has been messed up. What could be the cause for that ?

manup commented 6 years ago

Do you mean the group membership of the lights? It is kept in the backup, so when you go in the group > 'manage lights' editor of the Phoscon app you should see the same lights as before the backup?

donnib commented 6 years ago

@manup Yes that's what i mean. I am not sure what happened but here is what i did.

  1. I made a new SD card with latest deconz (the official one from you)
  2. Took a backup and saved the dat file.
  3. Remove the old SD card from the rPi and replaced with the one from step 1 and booted the (same) rPi
  4. At this moment i think i remember seeing lights in deConz BEFORE i did the restore.
  5. I did the restore and this is were i am now.

I guess after step 4 deconz already has the nodes in the database. What happens when i do the restore ? Does the database get wiped ?

manup commented 6 years ago

And do you see the groups in the Phoscon app after restore? If yes it might take a "while" until the group membership will be restored in the lights. The gateway periodically checks lights that the configured group membership is intact and will correct if neccessary.

It is absolutely possible that you see lights before the restore because the ZigBee network is still running (configuration is active on the shield).

I guess after step 4 deconz already has the nodes in the database. What happens when i do the restore ? Does the database get wiped ?

The database (zll.db) file will be replaced by the one in the backup file (which is just a tar.gz file).

donnib commented 6 years ago

@manup i did the restore a day ago. I presume it doesn't take that long ? I see the groups but some of them are empty i mean no lights associated with them.

manup commented 6 years ago

@manup i did the restore a day ago. I presume it doesn't take that long ?

No it shouldn't depending on the network size 30–60 minutes.

I see the groups but some of them are empty i mean no lights associated with them.

That should not happen either, in the app correct group memberships should be visible instantly after restore.

Which versions of deCONZ are you using before and after restore?

Do you still have the old sd-card? Might be worth a try to copy the files directly, while deCONZ isn't running.

donnib commented 6 years ago

I think it was 2.05.31 but based on the Jessie image. The new one is stretch image and 2.05.32

Yes i do have the SD card (i kept it on purpose). So what do you recommend me doing now ? Should i boot the system again with the old SD card then do a backup again then try restore again ? Should i do a reset of the gateway first or ?

manup commented 6 years ago

Should i boot the system again with the old SD card then do a backup again then try restore again ? Should i do a reset of the gateway first or ?

2.05.31/32 should work fine, I'll schedules some tests to check the backup feature.

Short guide for manual backup:

...

donnib commented 6 years ago

@manup thx will try

donnib commented 6 years ago

@manup that did the trick. I noticed not all files are in the dat file. Not everything is backed up ? I also noticed the placement of the nodes in the graphic was not backed up using the backup but doing manually they were retained ?

stale[bot] commented 5 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

manup commented 5 years ago

Backup will be refactored for the next stable release, we identified quite some issues. Closing the issue for now