-
-
Notifications
You must be signed in to change notification settings - Fork 4.1k
Closed
Labels
Description
I'm logging all my devices LWT topics (/status /presence /availability etc.) and a change in those topics usually indicates trouble (wifi lost, reboot).
It is surprising that WLED is repeatedly setting the /status LWT topic in normal operation.
The publishMqtt() function sets the LWT topic /status to "online". It is called from updateInterfaces() thus the LWT topic will be set with each change of parameters.
Was that a conscious design decision? Is there a technical or API reason?
Would you be open to a PR which moves
Lines 177 to 179 in 25223c4
| strlcpy(subuf, mqttDeviceTopic, MQTT_MAX_TOPIC_LEN + 1); | |
| strcat_P(subuf, PSTR("/status")); | |
| mqtt->publish(subuf, 0, true, "online"); // retain message for a LWT |
up a few lines into
onMqttConnect() -- it's where other projects usually set the LWT.Reactions are currently unavailable