homebridge-myq icon indicating copy to clipboard operation
homebridge-myq copied to clipboard

Support injection of secrets via the environment

Open prhiggins opened this issue 2 years ago • 0 comments

While setting email and password is fine for most use cases, being able to pass them in through the environment gives the user flexibility to decide how to handle their secrets. This PR adds the following environment variables:

  • $MYQ_EMAIL: Takes precedence over email if set.
  • $MYQ_PASSWORD: Takes precedence over password if set.
  • $MYQ_MQTT_URL: Takes precedence over mqttUrl if set.

I am opening this PR because I implemented this as a convenience feature when using this plugin in an ephermal Docker context, and preferred this approach to storing credentials in config.json.

This commit also includes draft changes to the documentation to reflect these changes.

prhiggins avatar Aug 07 '22 07:08 prhiggins