homebridge-myq
homebridge-myq copied to clipboard
Support injection of secrets via the environment
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 overemail
if set. -
$MYQ_PASSWORD
: Takes precedence overpassword
if set. -
$MYQ_MQTT_URL
: Takes precedence overmqttUrl
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.