MQTT Client

Communication

MQTT Client lets you connect to a MQTT broker and publish strings to a topic.
First create a MQTTClient. You have to pass a task list from Cooperative Multitasking, a client (e.g. WiFiClient from WiFi101), host, port and credentials of the MQTT broker. Then create a MQTTTopic. Use the MQTTClient and the topic name as arguments when doing that. To connect to the broker call MQTTClient::connect(). After that you can call MQTTTopic:publish("...") to publish a string. Requires Cooperative Multitasking for processing the acknowledgement packets of the broker. So you have call CooperativeMultitasking::run() in your loop() function. See the examples for details.

Author: Andreas Motzek

Maintainer: Andreas Motzek

Read the documentation

Go to repository

Compatibility

This library is compatible with the samd architecture so you should be able to use it on the following Arduino boards:

Releases

To use this library, open the Library Manager in the Arduino IDE and install it from there.