Merge pull request #377 from iranl/add-option-to-remove-non-json

Add option to remove some non-JSON MQTT topics
This commit is contained in:
Jan-Ole Schümann
2024-05-30 17:32:32 +07:00
committed by GitHub
11 changed files with 392 additions and 172 deletions

View File

@@ -421,6 +421,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"));
@@ -1339,6 +1344,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>");