mariolukas / Watterott-CO2-Ampel-Plus-Firmware

Firmware for Watterott CO2 Ampel (Plus Version)
GNU General Public License v3.0
15 stars 13 forks source link

MQTT Reconnect #13

Closed reibuehl closed 3 years ago

reibuehl commented 3 years ago

If the connection to the MQTT broker drops, e.g. because the broker is offline for a while, the firmware did never try to reconnect. This PR implements a reconnect functionality. If the function mqtt_send_value() detects no connection, mqtt_connect() will be called and the next mqtt_send_value() will be able to post successfully again.