ItKindaWorks / ESPHelper

A library to make using WiFi & MQTT on the ESP8266 easy.
GNU General Public License v3.0
327 stars 67 forks source link

MQTT Last Will and Testament #12

Closed jaromanda closed 6 years ago

jaromanda commented 6 years ago

Do you have any plans to implement MQTT Last Will and Testament functionality?

ItKindaWorks commented 6 years ago

Unless the PubSubClient library implements it (which I don't believe it has https://github.com/knolleary/pubsubclient) I don't have any plans to implement that part of the library, sorry.

jaromanda commented 6 years ago

It does, because I've used it, but I like the ease of using ESPHelper too

Look at lines 127 and 128 in PubSubClient.h - they include const char* willTopic, uint8_t willQos, boolean willRetain, const char* willMessage - they are Last Will and Testament parameters

I've tried my hand at adding the functionality in ESPHelper myself, but my C++ is rusty, haven't used it in a few years - will keep trying, though I think you know your code far better, so it could be a fairly simple (optional, behind an define?) addition