software/ampel-firmware/mqtt.h
2021-05-09 20:45:59 +02:00

23 lines
589 B
C++

#ifndef MQTT_H_INCLUDED
#define MQTT_H_INCLUDED
#include <Arduino.h>
#include "config.h"
#include "led_effects.h"
#ifdef AMPEL_CSV
# include "csv_writer.h"
#endif
#include "co2_sensor.h"
#include "src/lib/PubSubClient/src/PubSubClient.h"
#include "wifi_util.h"
namespace config {
extern uint16_t sending_interval; // [s]
}
namespace mqtt {
extern String last_successful_publish;
extern bool connected;
void initialize(String &topic);
void keepConnection();
void publishIfTimeHasCome(const String &timeStamp, const int16_t &co2, const float &temp, const float &hum);
}
#endif