Browse Source

Support for SSL in AsyncMQTTClient. Not functional yet

fastled
Xose Pérez 7 years ago
parent
commit
041fc9adc5
2 changed files with 6 additions and 1 deletions
  1. +1
    -0
      code/espurna/config/general.h
  2. +5
    -1
      code/espurna/mqtt.ino

+ 1
- 0
code/espurna/config/general.h View File

@ -136,6 +136,7 @@
#define MQTT_SERVER ""
#define MQTT_PORT 1883
#define MQTT_SSL 0
#define MQTT_TOPIC "/test/switch/{identifier}"
#define MQTT_RETAIN true
#define MQTT_QOS 0


+ 5
- 1
code/espurna/mqtt.ino View File

@ -221,7 +221,11 @@ void mqttConnect() {
mqtt.setCredentials(_mqttUser, _mqttPass);
}
DEBUG_MSG_P(PSTR("\n"));
mqtt.connect();
#if ASYNC_TCP_SSL_ENABLED
mqtt.connect(getSetting("mqttSSL", MQTT_SSL).toInt() == 1);
#else
mqtt.connect();
#endif
#else


Loading…
Cancel
Save