diff --git a/ampel-firmware/mqtt.cpp b/ampel-firmware/mqtt.cpp index cb0c5019c00d14094d6389684bb120eb061197f6..8c61696569dbf14dbf520ff4dacd0f462ec86b03 100644 --- a/ampel-firmware/mqtt.cpp +++ b/ampel-firmware/mqtt.cpp @@ -30,10 +30,9 @@ namespace mqtt { void initialize(const char *sensorId) { json_sensor_format = PSTR("{\"time\":\"%s\", \"co2\":%d, \"temp\":%.1f, \"rh\":%.1f}"); snprintf(publish_topic, sizeof(publish_topic), "CO2sensors/%s", sensorId); -#if defined(ESP8266) - espClient.setInsecure(); // Sorry, we don't want to flash the sensors every 3 months. -#endif - // mqttClient.setSocketTimeout(config::mqtt_timeout); //NOTE: somehow doesn't seem to have any effect on connect() + // The sensor doesn't check the fingerprint of the MQTT broker, because otherwise this fingerprint should be updated + // on the sensor every 3 months. The connection can still be encrypted, though: + espClient.setInsecure(); // If not available for ESP32, please update Arduino IDE / PlatformIO mqttClient.setServer(config::mqtt_server, config::mqtt_port); sensor_console::defineIntCommand("mqtt", setMQTTinterval, F("60 (Sets MQTT sending interval, in s)"));