Fix ESP32-P4 unique MQTT Client based on hosted MCU MAC address
This commit is contained in:
parent
c35e374739
commit
a922d6609f
@ -15,6 +15,7 @@ All notable changes to this project will be documented in this file.
|
||||
- DALI watchdog exception
|
||||
- TuyaMCU v1 exception 28 regression from v15.1.0.1 reverted PR24063 (#24220)
|
||||
- ESP8266 TasmotaSerial flush receive buffer on executing `TasmotaSerial.flush();`
|
||||
- ESP32-P4 unique MQTT Client based on hosted MCU MAC address
|
||||
|
||||
### Removed
|
||||
|
||||
|
||||
@ -120,5 +120,6 @@ The latter links can be used for OTA upgrades too like ``OtaUrl https://ota.tasm
|
||||
|
||||
### Fixed
|
||||
- ESP8266 TasmotaSerial flush receive buffer on executing `TasmotaSerial.flush();`
|
||||
- ESP32-P4 unique MQTT Client based on hosted MCU MAC address
|
||||
- DALI watchdog exception
|
||||
- TuyaMCU v1 exception 28 regression from v15.1.0.1 reverted PR24063 [#24220](https://github.com/arendst/Tasmota/issues/24220)
|
||||
|
||||
@ -671,7 +671,6 @@ void setup(void) {
|
||||
// Github inserts "release" or "commit number" before compiling using sed -i -e 's/TASMOTA_SHA_SHORT/TASMOTA_SHA_SHORT 85cff52-/g' tasmota_version.h
|
||||
snprintf_P(TasmotaGlobal.image_name, sizeof(TasmotaGlobal.image_name), PSTR("(" STR(TASMOTA_SHA_SHORT) "%s)"), PSTR(CODE_IMAGE_STR)); // Results in (85cff52-tasmota) or (release-tasmota)
|
||||
|
||||
Format(TasmotaGlobal.mqtt_client, SettingsText(SET_MQTT_CLIENT), sizeof(TasmotaGlobal.mqtt_client));
|
||||
Format(TasmotaGlobal.mqtt_topic, SettingsText(SET_MQTT_TOPIC), sizeof(TasmotaGlobal.mqtt_topic));
|
||||
if (strchr(SettingsText(SET_HOSTNAME), '%') != nullptr) {
|
||||
SettingsUpdateText(SET_HOSTNAME, WIFI_HOSTNAME);
|
||||
|
||||
@ -1112,6 +1112,9 @@ void MqttConnected(void) {
|
||||
}
|
||||
|
||||
void MqttReconnect(void) {
|
||||
if (!strlen(TasmotaGlobal.mqtt_client)) { // Do it here as it needs the MAC address from a possible hosted MCU available after WiFi connection
|
||||
Format(TasmotaGlobal.mqtt_client, SettingsText(SET_MQTT_CLIENT), sizeof(TasmotaGlobal.mqtt_client));
|
||||
}
|
||||
Mqtt.allowed = Settings->flag.mqtt_enabled && (TasmotaGlobal.restart_flag == 0); // SetOption3 - Enable MQTT, and don't connect if restart in process
|
||||
if (Mqtt.allowed) {
|
||||
#if defined(USE_MQTT_AZURE_DPS_SCOPEID) && defined(USE_MQTT_AZURE_DPS_PRESHAREDKEY)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user