Closed jodelamo closed 5 years ago
Thanks for reaching out Joacim.
I recommend that you never, ever share your config.json
via version control or any file sharing protocol.
This file is the main place to store secrets for homebridge and installed plugins. I'm not currently aware of any plugin that pulls in secrets from the environment.
With this said, you should also create a separate Verisure user for homebridge with minimal permissions to suit the needs of your deployment.
If you still think this would be a great addition to the plugin, please share some details about your setup that lead your to this path.
I recommend that you never, ever share your
config.json
via version control or any file sharing protocol.
Yep. It's currently being gitignored.
It was mostly a convenience thing, inspired by this. I'm using this in a Docker context and wanted to read environment variables from an .env
file. The end result would essentially be the same as putting values in config.json
and gitignoring it.
Very "nice to have", but certainly not immediately useful to everyone.
This do makes sense to me when dealing with Docker containers, and I agree that this addition would be convenient in your case.
Looking at the Dyson plugin you referred to for inspiration; would it make sense to flip that conditional as proposed below?
const password = process.env.VERISURE_PASSWORD || config.password;
Yes. When providing an environment variable my assumption would be for it to take presedence.
It would be nice if email, password and other sensitive values could be read from environment variables.
Something like:
It would allow for checking in
config.json
files without sensitive key/values.