marvinroger / async-mqtt-client

📶 An Arduino for ESP8266 asynchronous MQTT client implementation
MIT License
835 stars 266 forks source link

setWill does not post "online" message to LWT topic on startup #278

Closed vks007 closed 2 years ago

vks007 commented 2 years ago

Hi, I am using this library and I am not able to get the online message on the LWT topic once the node connects to MQTT broker. My set up uses ESP8266. The rest of the functionality is all working fine. The broker also posts an "offline" message once my client disconnects. As a workaround I am manually posting the "online" message in the onMqttConnect() function. Please look at my code and let me know in case I am missing something here. sorry I guess because of some character in my code or something it is not getting formatted as code when I paste here so using pastebin. Pl see the code here

vks007 commented 2 years ago

sorry just realized that I have to post the online message myself and it doesnt happen automatically. so its intended behavior. closing the issue.