and MQTT Library


Hello everyone,

I am trying to combine and a mqtt-library arduino-mqtt for my new project.
I already used thinger with some neopixel and a custom android-app.

My problem: I need to initialize the mqtt client with the following command:
void begin(const char hostname[], int port, Client &client);
In my code I start the Wifi with thing.add_wifi(SSID, SSID_PASSWORD); and I don’t know how to access the Client from ThingerESP8266 so that mqtt can use the wifi connection.

The MQTT-Example uses WiFi101.h with
#include <WiFi101.h>
#include <MQTT.h>

const char ssid[] = "ssid";
const char pass[] = "pass";

WiFiClient net;
MQTTClient client;

void connect() {
// client.unsubscribe("/hello");
void setup() {
 WiFi.begin(ssid, pass);

// You need to set the IP address directly.
client.begin("", net);


void loop() {

if (!client.connected()) {
connect() }

Thanks for helping!
Kind regards