Set MQTT username and password

This commit is contained in:
2025-12-09 10:02:47 +01:00
parent 9bad1790a7
commit c53783072e
2 changed files with 7 additions and 0 deletions
+2
View File
@@ -66,6 +66,8 @@ static void mqtt_init(void) {
mqtt_cfg.broker.address.uri = MQTT_ADDR;
mqtt_cfg.broker.address.port = MQTT_PORT;
mqtt_cfg.credentials.username = MQTT_USER;
mqtt_cfg.credentials.authentication.password = MQTT_PASS;
mqtt_client = esp_mqtt_client_init(&mqtt_cfg);