11#ifndef MQTTNetworking_h
12#define MQTTNetworking_h
14#include "../../Defines.h"
15#ifdef USE_MQTT_NETWORKING
31#define MQTT_CALLBACK_FEED 0
32#define MQTT_CALLBACK_BLINK 1
33#define MQTT_CALLBACK_TEMP 2
35#define MQTT_CALLBACK_SOLID_LIGHT 3
36#define MQTT_CLEAN_SSID_EPROM 4
38#define MQTT_CALLBACK_TILT_MOTION_DETECTED 5
39#define MQTT_CALLBACK_PIR_DETECTED 6
42#define MQTT_MAX_CALLBACKS 7
void publishMQTTMessageDefaultTopic(char *message)
Wrapper of the mqttclient publish.
void checkAndReconnectWIFI_MQTTNetworking()
checks if the WIFI is off (or not reachable) and tries consecting again (the 'W' command)
void cleanEPROM_MQTTNetworking()
cleans the eprom info
void publishMQTTMessage(char *topic, char *message)
Wrapper of the mqttclient publish.
void sendMessageMQTT(char *message)
void checkDelaySinceWIFICheck_MQTTNetworking()
checks delay for the WIFI connectivity
void setup_MQTTNetworking()
setup the MQTT part of networking
void sendStatusMessageMQTT(const char *semanticMarker)
sends the semantic marker as a doc follow message #remoteMe (vs STATUS, as that triggers a status rep...
void getChipInfo()
get the chip info
void loop_MQTTNetworking()
called for the loop() of this plugin
char * getLastDocFollowSemanticMarker_MQTTNetworking()
void publishBinaryFile(char *topic, uint8_t *buf, size_t len)
publish a binary file..
boolean processJSONMessageMQTT(char *ascii, char *topic)
process the JSON message (looking for FEED, etc). Note: topic can be nil, or if not,...
void sendDocFollowMessageMQTT(const char *semanticMarker)
sends the semantic marker as a doc follow message DOCFOLLOW
void restartDelayCheckWIFI_MQTTNetworking()
starts the delay for WIFI checking, called at startup, and each time the timer finished....
void setLastDocFollowSemanticMarker_MQTTNetworking(char *semanticMarker)
sets the last DocFollow SemanticMarker
void sendMessageNoChangeMQTT(char *message)
just send a message but without any extras
boolean isConnectedMQTT_MQTTState()
value of MQTT connected
char * getDeviceNameMQTT()
NOTE: The following are only called from MainModule or ESP_IOT.ino (basically main)
boolean isConnectedWIFI_MQTTState()
value of WIFI connected
void restartWIFI_MQTTState()
restart the WIFI and then MQTT connection