quentinsf/qhue

Using qhue for backup/restore

Opened this issue · 0 comments

gig67 commented

Thanks for this great utility which possibly is the best tool to get something close to a much needed backup and recovery. I am decent in python but new to Hue Hub and its APIs

I assume that in case of a Hue Hub dying, all devices would need to be reassigned to a new hub. The numbering of these devices will be random, but their unique ID will stay the same (hope this is correct!)
As you are much better versed with the APIs and qhue, maybe you could draft a simple example to achieve the following:

  • for the existing hub, save the configuration file in some "reasonable" format (JSON, pickle, etc)
  • let us assume old hub dies and user then reassigns lights/sensors to a new hub
  • for the new hub, from an old configuration file, indicate which devices present in the old hub are not present in the new one, based on their unique ID
  • for the new hub, from an old configuration file, recreate (POST) the various scenes, routines, etc replacing the old device number with the new one, based on a match of the unique ID. If the unique ID is not found, either that device is skipped or the entire routine/scene is skipped, and an error message is printed

I cannot understand if the above is trivial or complex, would appreciate your thoughts. How do you address the need for backup otherwise?