11#ifndef MQTTNetworking_h
12#define MQTTNetworking_h
14#include "../../Defines.h"
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
44#define MQTT_MAX_CALLBACKS 7
88void publishBinaryFile(
char *topic, uint8_t * buf,
size_t len, String fileExtension);
146#ifdef USE_SPIFF_MODULE
void publishBinaryFile(char *topic, uint8_t *buf, size_t len, String fileExtension)
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
String get_WIFIInfoString()
retrieve the WIFIInfoString
void publishMQTTMessage(char *topic, char *message)
Wrapper of the mqttclient publish.
void sendMessageNoChangeMQTT_Topic(char *message, char *topic)
just send a message but without any extras, using a topic specified
void publishSPIFFFile_MQTT(char *topic, char *path, int len)
void sendMessageMQTT(char *message)
void checkDelaySinceWIFICheck_MQTTNetworking()
checks delay for the WIFI connectivity
String getJSONConfigString()
retrieve the Configuration JSON string in JSON format..
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 cleanMQTTpasswordsUpdateInEPROM()
9.18.23 LA (after Eagle Rock bike ride, Van Morrison tomorrow)
boolean processJSONMessageMQTT(char *ascii, char *topic)
process the JSON message (looking for FEED, etc). Note: topic can be nil, or if not,...
String get_WIFI_SSID()
3.22.24 get the WIFI SSID for the status
void sendMessageMQTT_Topic(char *message, char *topic)
for now only send if it start message starts with "#"
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
String MQTT_urlDecode(String input)
Decode the URL (exposed 12.17.23 for the scanner.
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
void publishSMRunMessage(char *smrunMessage)