-
Notifications
You must be signed in to change notification settings - Fork 42
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Properly Setting up Last Will Message #15
Comments
Hi, I am setting up method with keepalive and cleansession. When I turn off my device I still don't get any msg from lwt. |
I strongly recommend checking out PubSubClient |
I changed PubSubClient lib with this one, because it support all qos levels and wifisecure. I am still searching for the perfect one. |
In example:
https://github.com/tuanpmt/ESP8266MQTTClient/blob/master/examples/MQTTClient/MQTTClient.ino#L32
The last will message is set up without referring to the keepalive argument as specified in:
https://github.com/tuanpmt/ESP8266MQTTClient/blob/master/src/ESP8266MQTTClient.cpp#L72
The example should probably be changed to include the keepalive (& cleansession), so predictable behaviour can be expected with the last will messages. Otherwise, the last will msg seems to be sent and printed in the topic before any other messages, whenever the connection is created.
The text was updated successfully, but these errors were encountered: