ESP8266 WiFi Client
Loading...
Searching...
No Matches
MqttClient Class Reference

A very basic MQTT client. More...

#include <mqtt-client.hpp>

Inheritance diagram for MqttClient:
WifiDependent

Public Member Functions

void init ()
 
void onWifiConnectionEstablished () override
 
void onWifiConnectionLost () override
 
- Public Member Functions inherited from WifiDependent

Detailed Description

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.

Member Function Documentation

◆ init()

void MqttClient::init ( )

Initializes the async-mqtt-client.

◆ onWifiConnectionEstablished()

void MqttClient::onWifiConnectionEstablished ( )
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.

◆ onWifiConnectionLost()

void MqttClient::onWifiConnectionLost ( )
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.


The documentation for this class was generated from the following files: