allow to configure hostname

This commit is contained in:
technyon
2022-04-10 21:26:01 +02:00
parent 6d5121d125
commit 22f9c5643d
3 changed files with 21 additions and 2 deletions

View File

@@ -135,6 +135,11 @@ bool WebCfgServer::processArgs(String& message)
_preferences->putString(preference_mqtt_path, value);
configChanged = true;
}
else if(key == "HOSTNAME")
{
_preferences->putString(preference_hostname, value);
configChanged = true;
}
else if(key == "LSTINT")
{
_preferences->putInt(preference_query_interval_lockstate, value.toInt());
@@ -243,6 +248,7 @@ void WebCfgServer::buildHtml(String& response)
printInputField(response, "MQTTUSER", "MQTT User (# to clear)", _preferences->getString(preference_mqtt_user).c_str(), 30);
printInputField(response, "MQTTPASS", "MQTT Password", "*", 30, true);
printInputField(response, "MQTTPATH", "MQTT Path", _preferences->getString(preference_mqtt_path).c_str(), 180);
printInputField(response, "HOSTNAME", "Host name", _preferences->getString(preference_hostname).c_str(), 100);
printInputField(response, "LSTINT", "Query interval lock state (seconds)", _preferences->getInt(preference_query_interval_lockstate), 10);
printInputField(response, "BATINT", "Query interval battery (seconds)", _preferences->getInt(preference_query_interval_battery), 10);
printInputField(response, "PRDTMO", "Presence detection timeout (seconds, -1 to disable)", _preferences->getInt(preference_presence_detection_timeout), 10);