2019-06-06 04:43:50 +00:00
|
|
|
#pragma once
|
|
|
|
#include "config.h"
|
|
|
|
|
|
|
|
#ifdef MQTT_ENABLE
|
2019-05-29 22:49:54 +00:00
|
|
|
|
|
|
|
#include <PubSubClient.h>
|
2019-05-31 21:57:46 +00:00
|
|
|
#include <Arduino.h>
|
2019-05-29 22:49:54 +00:00
|
|
|
|
|
|
|
void mqtt_callback(char* complete_topic, byte* pl, unsigned int length);
|
|
|
|
|
|
|
|
boolean mqtt_connect();
|
|
|
|
|
2019-06-07 04:08:21 +00:00
|
|
|
extern uint8_t weather_icon_ids[6];
|
|
|
|
extern int8_t weather_temperatures[6];
|
|
|
|
|
2019-05-29 22:49:54 +00:00
|
|
|
void mqtt_setup();
|
|
|
|
|
|
|
|
void mqtt_loop();
|
|
|
|
|
2019-05-30 11:09:38 +00:00
|
|
|
void mqtt_publish(const char* topic, int number);
|
|
|
|
|
2019-05-31 21:57:46 +00:00
|
|
|
void mqtt_log(const char* message);
|
|
|
|
void mqtt_log(int number);
|
|
|
|
void mqtt_log(long unsigned int number);
|
|
|
|
|
|
|
|
void mqtt_log_ln(const char* message);
|
|
|
|
void mqtt_log_ln(int number);
|
|
|
|
void mqtt_log_ln(long unsigned int number);
|
|
|
|
|
|
|
|
|
|
|
|
void mqtt_log_send(const char* message);
|
|
|
|
|
|
|
|
extern String mqtt_log_str;
|
|
|
|
|
2019-06-06 04:43:50 +00:00
|
|
|
#endif // MQTT_ENABLE
|