Ability to change MQTT timeout and keepalive

This commit is contained in:
Gunnar Skjold
2024-11-09 15:12:54 +01:00
parent e022f630b2
commit 05ce4c5c1a
7 changed files with 45 additions and 18 deletions

View File

@@ -972,7 +972,9 @@ void AmsWebServer::configurationJson() {
qsr ? "true" : "false",
qsk ? "true" : "false",
mqttConfig.stateUpdate,
mqttConfig.stateUpdateInterval
mqttConfig.stateUpdateInterval,
mqttConfig.timeout,
mqttConfig.keepalive
);
server.sendContent(buf);
@@ -1389,6 +1391,8 @@ void AmsWebServer::handleSave() {
mqtt.stateUpdate = server.arg(F("qt")).toInt() == 1;
mqtt.stateUpdateInterval = server.arg(F("qd")).toInt();
mqtt.timeout = server.arg(F("qi")).toInt();
mqtt.keepalive = server.arg(F("qk")).toInt();
} else {
config->clearMqtt(mqtt);
}