Skip to content

Add environment variable support#33

Open
bjoern-r wants to merge 3 commits intohardwario:masterfrom
bjoern-r:master
Open

Add environment variable support#33
bjoern-r wants to merge 3 commits intohardwario:masterfrom
bjoern-r:master

Conversation

@bjoern-r
Copy link
Copy Markdown
Contributor

This PR ads support for reading the username and password config values from environment variables

Supported environment variables:

  • MQTT_USERNAME MQTT_PASSWORD
  • HTTP_USERNAME HTTP_PASSWORD
  • INFLUXDB_USERNAME INFLUXDB_PASSWORD

This variables will override the value from the config

Supported environment variables:
- MQTT_USERNAME MQTT_PASSWORD
- HTTP_USERNAME HTTP_PASSWORD
- INFLUXDB_USERNAME INFLUXDB_PASSWORD

This variables will override the value from the config
@hubpav
Copy link
Copy Markdown
Contributor

hubpav commented Dec 28, 2025

@bjoern-r Thank you for contributing! This is a great idea.

I am working on a rewrite of this project:
https://github.com/hardwario/mqtt2influxdb/commits/main/

And I took your idea about the environment variables and enhanced it (please let me know if you like it):
https://github.com/hardwario/mqtt2influxdb/tree/main?tab=readme-ov-file#environment-variables

Also, we now have a more documented configuration template:
https://github.com/hardwario/mqtt2influxdb/blob/main/config-template.yml

Feedback appreciated! Can we close the PR here? Cheers. P.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants