Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
co2ampel
ampel-firmware
Commits
cb136628
Commit
cb136628
authored
Jun 05, 2021
by
Eric Duminil
Browse files
Board firmware update broke ESP32 MQTT
parent
db95fef4
Pipeline
#4024
passed with stage
in 1 minute and 49 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
ampel-firmware/mqtt.cpp
View file @
cb136628
...
...
@@ -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)"
));
...
...
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