Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow to store MQTT credentials separate from configuration.yaml #2201

Closed
LukasK13 opened this issue Oct 24, 2019 · 7 comments
Closed

Allow to store MQTT credentials separate from configuration.yaml #2201

LukasK13 opened this issue Oct 24, 2019 · 7 comments
Labels
feature request Feature request

Comments

@LukasK13
Copy link

In order to use version control for the configuration file, the MQTT credentials shouldn't be store within that file. It would be great to be able to store the MQTT credentials in a separate YAML-file or in case of docker, include the credentials as environment variable.

@nikolaykasyanov
Copy link

I second this! Something like Home Assistant does with secrets.yaml.

@Koenkk
Copy link
Owner

Koenkk commented Oct 25, 2019

Good idea, what should be the syntax for this?

@Koenkk Koenkk added the feature request Feature request label Oct 25, 2019
@LukasK13
Copy link
Author

I think we could adapt the syntax from home-assistant here as @nikolaykasyanov mentioned, so using password: !secret mqtt_password. This could be detected using simple regex.
Alternatively, the syntax for splitting up devices and groups could be used, but I prefer the first solution.

@Koenkk
Copy link
Owner

Koenkk commented Oct 25, 2019

Implemented, documentation: https://github.com/Koenkk/zigbee2mqtt.io/blob/develop/docs/configuration/configuration.md#specifying-mqtt-user-and-password-in-a-different-file

@airdrummingfool
Copy link
Contributor

@Koenkk can this be used for other configuration parameters, e.g. network_key? I've been wondering about a way to separate that out for a bit, and this seems like it would be a great way to do it!

@LukasK13
Copy link
Author

LukasK13 commented Oct 26, 2019

Wow, this was incredibly fast.
Thank you for your effort and your amazing work!
When will this be available in the arm32v6 Docker image?

@Koenkk
Copy link
Owner

Koenkk commented Oct 26, 2019

It's available in latest-dev (which replaced the arm32v6 image as it is multi arch now).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request Feature request
Projects
None yet
Development

No branches or pull requests

4 participants