I try to create a last will with the Arduino MQTT Library (ArduinoMqttClient).
This is the code where i define the last will. It works. But only for one Topic. Does anyone know how to create a last will for more then one Topic?
String willPayload = "err"; bool willRetain = true; int willQos = 1;
mqttClient.beginWill("OG/Küche/Temperatur", willPayload.length(), willRetain, willQos); mqttClient.print(willPayload); mqttClient.endWill();
Thanks for your Help