Added automatic MQTT setup when firmware has login info inside local .env file

This commit is contained in:
EivindH06
2025-10-03 16:00:39 +02:00
parent 21789cda68
commit 61a0a1055d
10 changed files with 256 additions and 99 deletions

16
.env.example Normal file
View File

@@ -0,0 +1,16 @@
# Copy this file to `.env` and adjust the values before building.
# The build system will inject these into the firmware without committing secrets.
MQTT_DEFAULT_HOST=mqtt.example.com
MQTT_DEFAULT_PORT=1883
MQTT_DEFAULT_USERNAME=example-user
MQTT_DEFAULT_PASSWORD=example-pass
MQTT_DEFAULT_CLIENT_ID=example-client
MQTT_DEFAULT_PUBLISH_TOPIC=amsreader/telemetry
MQTT_DEFAULT_SUBSCRIBE_TOPIC=amsreader/command
#MQTT_DEFAULT_SSL=true
#MQTT_DEFAULT_PAYLOAD_FORMAT=0
#MQTT_DEFAULT_STATE_UPDATE=false
#MQTT_DEFAULT_STATE_UPDATE_INTERVAL=60
#MQTT_DEFAULT_TIMEOUT=1000
#MQTT_DEFAULT_KEEPALIVE=60