add lwt topic

This commit is contained in:
technyon
2023-03-27 18:46:07 +02:00
parent 44ad2dd320
commit ddf70f5d8a
10 changed files with 51 additions and 5 deletions

View File

@@ -273,6 +273,18 @@ bool WifiDevice::mqttDisonnect(bool force)
}
}
void WifiDevice::setWill(const char *topic, uint8_t qos, bool retain, const char *payload)
{
if(_useEncryption)
{
_mqttClientSecure->setWill(topic, qos, retain, payload);
}
else
{
_mqttClient->setWill(topic, qos, retain, payload);
}
}
void WifiDevice::mqttSetCredentials(const char *username, const char *password)
{
if(_useEncryption)