Backup and restore Philips Hue bridge configuration in raw JSON for easy editing.
I have a number of complex Labs configured and I was looking for a way to backup (and modify?) and restore configuration on my Hue Bridge. The Hue app doesn't offer any backup options, but does provide a way to wipe the current configuration and automatically restore lights and groups.
npm install @klutchell/hue-bridge-backup
$ index.js --help
Usage: index.js <cmd> [options]
Commands:
index.js backup Backup data to a local directory
index.js restore Restore data from a local directory
Options:
-c, --config-file Path to JSON config file
-b, --bridge-ip Hue bridge address:port [string] [required]
-u, --bridge-user Hue bridge user [string] [required]
-d, --backup-dir Path to Hue backup directory [string]
-e, --endpoints Hue endpoints list
[array] [required] [choices: "config", "groups", "lights", "rules", "scenes",
"schedules", "sensors"] [default: ["rules","schedules","scenes"]]
-h, --help Show help [boolean]
-v, --version Show version number [boolean]
Examples:
index.js backup -b "192.168.86.131" -u <uuid> -d ./my-backup -e rules scenes
index.js restore -d ./my-backup
It seems that the only way to do a restore, is to:
- reset your old bridge (and all of the lights and accessories connected to it)
- add your lights (maximum 10 at a time) to the new bridge
- attempt to run the restore command
See klutchell#2
npm test
In lieu of a formal style guide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality. Lint and test your code.
Kyle Harding [email protected]
tbd
- https://www.developers.meethue.com/documentation/getting-started
- https://github.com/owagner/hue2mqtt
This project is licensed under MIT