-Implement BLE retry after failed hybrid lockaction

This commit is contained in:
iranl
2025-01-04 21:24:12 +01:00
parent e1ca074b37
commit 9d7cd00d2d
2 changed files with 6 additions and 3 deletions

View File

@@ -1091,8 +1091,11 @@ LockActionResult NukiWrapper::onLockActionReceived(const char *value)
{
if(_preferences->getBool(preference_official_hybrid_actions, false))
{
_nukiOfficial->setOffCommandExecutedTs(espMillis() + 2000);
_offCommand = action;
if(_preferences->getBool(preference_official_hybrid_retry, false))
{
_nukiOfficial->setOffCommandExecutedTs(espMillis() + 2000);
_offCommand = action;
}
_network->publishOffAction((int)action);
}
else

View File

@@ -4042,7 +4042,7 @@ esp_err_t WebCfgServer::buildMqttConfigHtml(PsychicRequest *request, PsychicResp
printCheckBox(&response, "OFFHYBRID", "Enable hybrid official MQTT and Nuki Hub setup", _preferences->getBool(preference_official_hybrid_enabled), "");
printCheckBox(&response, "HYBRIDACT", "Enable sending actions through official MQTT", _preferences->getBool(preference_official_hybrid_actions), "");
printInputField(&response, "HYBRIDTIMER", "Time between status updates when official MQTT is offline (seconds)", _preferences->getInt(preference_query_interval_hybrid_lockstate), 5, "");
// printCheckBox(&response, "HYBRIDRETRY", "Retry command sent using official MQTT over BLE if failed", _preferences->getBool(preference_official_hybrid_retry), ""); // NOT IMPLEMENTED (YET?)
printCheckBox(&response, "HYBRIDRETRY", "Retry command sent using official MQTT over BLE if failed", _preferences->getBool(preference_official_hybrid_retry), "");
response.print("</table>");
response.print("* If no encryption is configured for the MQTT broker, leave empty.<br><br>");
response.print("<br><input type=\"submit\" name=\"submit\" value=\"Save\">");