add lock control via GPIO

This commit is contained in:
technyon
2022-07-01 19:23:52 +02:00
parent 571e4ddca2
commit 4f780eb164
10 changed files with 105 additions and 4 deletions

View File

@@ -274,6 +274,11 @@ bool WebCfgServer::processArgs(String& message)
_preferences->putBool(preference_publish_authdata, (value == "1"));
configChanged = true;
}
else if(key == "GPLCK")
{
_preferences->putBool(preference_gpio_locking_enabled, (value == "1"));
configChanged = true;
}
else if(key == "LOCKENA")
{
_preferences->putBool(preference_lock_enabled, (value == "1"));
@@ -544,6 +549,7 @@ void WebCfgServer::buildNukiConfigHtml(String &response)
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);
printCheckBox(response, "PUBAUTH", "Publish auth data (May reduce battery life)", _preferences->getBool(preference_publish_authdata));
printCheckBox(response, "GPLCK", "Enable control via GPIO", _preferences->getBool(preference_gpio_locking_enabled));
printInputField(response, "PRDTMO", "Presence detection timeout (seconds; -1 to disable)", _preferences->getInt(preference_presence_detection_timeout), 10);
response.concat("</table>");
response.concat("<br><INPUT TYPE=SUBMIT NAME=\"submit\" VALUE=\"Save\">");