Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Käppler
ampel-firmware
Commits
8dd70ec1
Commit
8dd70ec1
authored
Feb 19, 2021
by
Eric Duminil
Browse files
MQTT Fingerprints change every 3 months. :-/
parent
7b50295d
Changes
2
Hide whitespace changes
Inline
Side-by-side
ampel-firmware/config.public.h
View file @
8dd70ec1
...
...
@@ -109,7 +109,6 @@
# define MQTT_PORT 8883
# define MQTT_USER ""
# 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
...
...
ampel-firmware/mqtt.cpp
View file @
8dd70ec1
...
...
@@ -9,7 +9,6 @@ namespace config {
const
uint16_t
mqtt_port
=
MQTT_PORT
;
const
char
*
mqtt_user
=
MQTT_USER
;
const
char
*
mqtt_password
=
MQTT_PASSWORD
;
const
char
*
fingerprint
PROGMEM
=
MQTT_SERVER_FINGERPRINT
;
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.
}
...
...
@@ -32,7 +31,7 @@ namespace mqtt {
json_sensor_format
=
PSTR
(
"{
\"
time
\"
:
\"
%s
\"
,
\"
co2
\"
:%d,
\"
temp
\"
:%.1f,
\"
rh
\"
:%.1f}"
);
publish_topic
=
topic
;
#if defined(ESP8266)
espClient
.
set
Fingerprint
(
config
::
fingerprint
);
// not supported by ESP32
espClient
.
set
Insecure
();
// 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()
mqttClient
.
setServer
(
config
::
mqtt_server
,
config
::
mqtt_port
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment