add back esp32-s3 SSL for mqtt

This commit is contained in:
MichaelDvP
2023-10-18 10:34:21 +02:00
parent 97de23f521
commit de2792ffdd
2 changed files with 3 additions and 4 deletions

View File

@@ -10,7 +10,6 @@ the LICENSE file.
#if defined(ARDUINO_ARCH_ESP8266) || defined(ARDUINO_ARCH_ESP32) #if defined(ARDUINO_ARCH_ESP8266) || defined(ARDUINO_ARCH_ESP32)
#include "../Config.h"
#include <WiFiClientSecure.h> // includes IPAddress #include <WiFiClientSecure.h> // includes IPAddress
#include "Transport.h" #include "Transport.h"

View File

@@ -83,7 +83,7 @@ void MqttSettingsService::loop() {
_disconnectedAt = configureMqtt() ? 0 : uuid::get_uptime(); _disconnectedAt = configureMqtt() ? 0 : uuid::get_uptime();
_reconfigureMqtt = false; _reconfigureMqtt = false;
} }
_mqttClient->loop(); // done by mqtt task _mqttClient->loop();
} }
bool MqttSettingsService::isEnabled() { bool MqttSettingsService::isEnabled() {
@@ -217,7 +217,7 @@ bool MqttSettingsService::configureMqtt() {
void MqttSettings::read(MqttSettings & settings, JsonObject & root) { void MqttSettings::read(MqttSettings & settings, JsonObject & root) {
#if CONFIG_IDF_TARGET_ESP32S3 #if CONFIG_IDF_TARGET_ESP32S3
// root["rootCA"] = settings.rootCA; root["rootCA"] = settings.rootCA;
#endif #endif
root["enabled"] = settings.enabled; root["enabled"] = settings.enabled;
root["host"] = settings.host; root["host"] = settings.host;
@@ -253,7 +253,7 @@ StateUpdateResult MqttSettings::update(JsonObject & root, MqttSettings & setting
bool changed = false; bool changed = false;
#if CONFIG_IDF_TARGET_ESP32S3 #if CONFIG_IDF_TARGET_ESP32S3
// newSettings.rootCA = root["rootCA"] | ""; newSettings.rootCA = root["rootCA"] | "";
#endif #endif
newSettings.enabled = root["enabled"] | FACTORY_MQTT_ENABLED; newSettings.enabled = root["enabled"] | FACTORY_MQTT_ENABLED;
newSettings.host = root["host"] | FACTORY_MQTT_HOST; newSettings.host = root["host"] | FACTORY_MQTT_HOST;