mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-06 15:59:52 +03:00
add back esp32-s3 SSL for mqtt
This commit is contained in:
@@ -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"
|
||||||
|
|||||||
@@ -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;
|
||||||
|
|||||||
Reference in New Issue
Block a user