Add option to remove some non-JSON MQTT topics

This commit is contained in:
iranl
2024-05-28 22:54:51 +02:00
parent fbb2068439
commit 4d025729b0
10 changed files with 292 additions and 143 deletions

View File

@@ -413,6 +413,11 @@ bool WebCfgServer::processArgs(String& message)
_preferences->putBool(preference_check_updates, (value == "1"));
configChanged = true;
}
else if(key == "DISNONJSON")
{
_preferences->putBool(preference_disable_non_json, (value == "1"));
configChanged = true;
}
else if(key == "DHCPENA")
{
_preferences->putBool(preference_ip_dhcp_enabled, (value == "1"));
@@ -1319,6 +1324,7 @@ void WebCfgServer::buildMqttConfigHtml(String &response)
printCheckBox(response, "RSTDISC", "Restart on disconnect", _preferences->getBool(preference_restart_on_disconnect), "");
printCheckBox(response, "MQTTLOG", "Enable MQTT logging", _preferences->getBool(preference_mqtt_log_enabled), "");
printCheckBox(response, "CHECKUPDATE", "Check for Firmware Updates every 24h", _preferences->getBool(preference_check_updates), "");
printCheckBox(response, "DISNONJSON", "Disable some extraneous non-JSON topics", _preferences->getBool(preference_disable_non_json), "");
response.concat("</table>");
response.concat("* If no encryption is configured for the MQTT broker, leave empty. Only supported for Wi-Fi connections.<br><br>");