Commit 8dd70ec1 authored by Eric Duminil's avatar Eric Duminil
Browse files

MQTT Fingerprints change every 3 months. :-/

parent 7b50295d
...@@ -109,7 +109,6 @@ ...@@ -109,7 +109,6 @@
# define MQTT_PORT 8883 # define MQTT_PORT 8883
# define MQTT_USER "" # define MQTT_USER ""
# define MQTT_PASSWORD "" # define MQTT_PASSWORD ""
# define MQTT_SERVER_FINGERPRINT "EE BC 4B F8 57 E3 D3 E4 07 54 23 1E F0 C8 A1 56 E0 D3 1A 1C" // SHA1 for test.mosquitto.org
/** /**
* LoRaWAN * LoRaWAN
......
...@@ -9,7 +9,6 @@ namespace config { ...@@ -9,7 +9,6 @@ namespace config {
const uint16_t mqtt_port = MQTT_PORT; const uint16_t mqtt_port = MQTT_PORT;
const char *mqtt_user = MQTT_USER; const char *mqtt_user = MQTT_USER;
const char *mqtt_password = MQTT_PASSWORD; const char *mqtt_password = MQTT_PASSWORD;
const char *fingerprint PROGMEM = MQTT_SERVER_FINGERPRINT;
const bool allow_mqtt_commands = ALLOW_MQTT_COMMANDS; const bool allow_mqtt_commands = ALLOW_MQTT_COMMANDS;
const unsigned long wait_after_fail = 900; // [s] Wait 15 minutes after an MQTT connection fail, before trying again. const unsigned long wait_after_fail = 900; // [s] Wait 15 minutes after an MQTT connection fail, before trying again.
} }
...@@ -32,7 +31,7 @@ namespace mqtt { ...@@ -32,7 +31,7 @@ namespace mqtt {
json_sensor_format = PSTR("{\"time\":\"%s\", \"co2\":%d, \"temp\":%.1f, \"rh\":%.1f}"); json_sensor_format = PSTR("{\"time\":\"%s\", \"co2\":%d, \"temp\":%.1f, \"rh\":%.1f}");
publish_topic = topic; publish_topic = topic;
#if defined(ESP8266) #if defined(ESP8266)
espClient.setFingerprint(config::fingerprint); // not supported by ESP32 espClient.setInsecure(); // Sorry, we don't want to flash the sensors every 3 months.
#endif #endif
// mqttClient.setSocketTimeout(config::mqtt_timeout); //NOTE: somehow doesn't seem to have any effect on connect() // mqttClient.setSocketTimeout(config::mqtt_timeout); //NOTE: somehow doesn't seem to have any effect on connect()
mqttClient.setServer(config::mqtt_server, config::mqtt_port); mqttClient.setServer(config::mqtt_server, config::mqtt_port);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment