From d6e1ccb22b9f1d680b049fbeb91679d8905b391a Mon Sep 17 00:00:00 2001 From: Yurii Date: Mon, 23 Nov 2026 07:36:06 +0300 Subject: [PATCH] fix: use unique device defaults and MQTT client identifiers Allow empty hostname and MQTT prefix defaults to use chip-derived names. Use the configured MQTT prefix as the broker client identifier. --- secrets.default.ini | 4 ++-- src/mqtt.cpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/secrets.default.ini b/secrets.default.ini index b53086b..0d333a5 100644 --- a/secrets.default.ini +++ b/secrets.default.ini @@ -5,7 +5,7 @@ serial_enabled = true serial_baud = 115200 webserial_enabled = true log_level = ESP_LOG_INFO -hostname = opentherm +hostname = ap_ssid = OpenTherm Gateway ap_password = otgateway123456 @@ -21,4 +21,4 @@ mqtt_server = mqtt_port = 1883 mqtt_user = mqtt_password = -mqtt_prefix = opentherm \ No newline at end of file +mqtt_prefix = diff --git a/src/mqtt.cpp b/src/mqtt.cpp index 0a14547..be5735e 100644 --- a/src/mqtt.cpp +++ b/src/mqtt.cpp @@ -715,7 +715,7 @@ static void connect() { .keepAlive = static_cast(settings.mqtt.interval * 10u), .username = settings.mqtt.user, .password = settings.mqtt.password, - .clientId = networkSettings.hostname, + .clientId = settings.mqtt.prefix, .willTopic = mqttTopic("status"), }); }