Leakage sensor
|
A very basic MQTT client. More...
#include <mqtt-client.hpp>
Public Member Functions | |
void | init () |
void | onWifiConnectionEstablished () override |
void | onWifiConnectionLost () override |
auto | publish (char *channel, char *payload) -> void |
![]() |
A very basic MQTT client.
This fella just showcases the use of marvinroger's Async MQTT client for ESP8266 and ESP32. Extend it to build more sophistcated stuff.
void MqttClient::init | ( | ) |
Initializes the async-mqtt-client.
|
overridevirtual |
This method will be called by WiFiConnection
once a network connection has been established. It will then try to connect to the configured MQTT broker using marvinroger's Async MQTT client for ESP8266 and ESP32.
Implements WifiDependent.
|
overridevirtual |
This method will just log that it has been disconnected. ESP8266WiFi in WiFiConnection
will try to reconnect itself, so no need to handle this within this controller.
Reimplemented from WifiDependent.