diff --git a/WifiControlSensor/MQTT.ino b/WifiControlSensor/MQTT.ino index c3737e8..b0d591e 100644 --- a/WifiControlSensor/MQTT.ino +++ b/WifiControlSensor/MQTT.ino @@ -45,9 +45,11 @@ int MqttSetup(char *server, char *user, char *passwd, int port, char *hostname) if(!isMqttConfigured) return 0; +#ifndef CONFIG_DISABLE_SSL if(useMqtts) mqtt = new Adafruit_MQTT_Client(new WiFiClientSecure(), server, port, user, passwd); else +#endif mqtt = new Adafruit_MQTT_Client(new WiFiClient(), server, port, user, passwd); mqtt_dht_temp = MqttCreatePublisher(TEMPERATURE_DHT_FEED_FORMAT, user, mqttId); diff --git a/WifiControlSensor/config_device.h b/WifiControlSensor/config_device.h index 90a1162..8cf46d0 100644 --- a/WifiControlSensor/config_device.h +++ b/WifiControlSensor/config_device.h @@ -6,6 +6,9 @@ // Switch Serial console on gpio 13 and 15 (So you can use GPIO 1 and 3 for other things) //#define CONFIG_ENABLE_EXTRA_GPIO +// Disable SSL (so mqtts) to save some place (~52ko) +//#define CONFIG_DISABLE_SSL + // Enable the temperatue and pressure Sensor BMP180 // (CONFIG_BMP180_SDA and CONFIG_BMP180_SDA should be defined as well) #define CONFIG_ENABLE_BMP180