This commit is contained in:
iranl
2024-12-19 22:34:56 +01:00
parent 6b13c9b947
commit a7bb2282f7
9 changed files with 27 additions and 10 deletions

View File

@@ -107,3 +107,4 @@ CONFIG_HTTPD_WS_SUPPORT=y
CONFIG_ESP_HTTPS_SERVER_ENABLE=n
CONFIG_BOOTLOADER_WDT_DISABLE_IN_USER_CODE=y
CONFIG_BOOTLOADER_WDT_TIME_MS=90000
CONFIG_LOG_MASTER_LEVEL=y

View File

@@ -5,7 +5,7 @@
#define NUKI_HUB_VERSION "9.05"
#define NUKI_HUB_VERSION_INT (uint32_t)905
#define NUKI_HUB_BUILD "unknownbuildnr"
#define NUKI_HUB_DATE "2024-12-18"
#define NUKI_HUB_DATE "2024-12-19"
#define GITHUB_LATEST_RELEASE_URL (char*)"https://github.com/technyon/nuki_hub/releases/latest"
#define GITHUB_OTA_MANIFEST_URL (char*)"https://raw.githubusercontent.com/technyon/nuki_hub/binary/ota/manifest.json"

View File

@@ -55,7 +55,13 @@ void NukiOpenerWrapper::initialize()
_nukiOpener.setDebugHexData(_preferences->getBool(preference_debug_hex_data, false));
_nukiOpener.setDebugCommand(_preferences->getBool(preference_debug_command, false));
_nukiOpener.initialize(_preferences->getBool(preference_connect_mode, false));
if (_preferences->getBool(preference_debug_connect, false) || _preferences->getBool(preference_debug_communication, false) || _preferences->getBool(preference_debug_readable_data, false) ||
_preferences->getBool(preference_debug_hex_data, false) || _preferences->getBool(preference_debug_command, false))
{
esp_log_set_level_master(ESP_LOG_DEBUG);
}
_nukiOpener.initialize(_preferences->getBool(preference_connect_mode, true));
_nukiOpener.registerBleScanner(_bleScanner);
_nukiOpener.setEventHandler(this);
_nukiOpener.setConnectTimeout(3);

View File

@@ -56,7 +56,13 @@ void NukiWrapper::initialize()
_nukiLock.setDebugHexData(_preferences->getBool(preference_debug_hex_data, false));
_nukiLock.setDebugCommand(_preferences->getBool(preference_debug_command, false));
_nukiLock.initialize(_preferences->getBool(preference_connect_mode, false));
if (_preferences->getBool(preference_debug_connect, false) || _preferences->getBool(preference_debug_communication, false) || _preferences->getBool(preference_debug_readable_data, false) ||
_preferences->getBool(preference_debug_hex_data, false) || _preferences->getBool(preference_debug_command, false))
{
esp_log_set_level_master(ESP_LOG_DEBUG);
}
_nukiLock.initialize(_preferences->getBool(preference_connect_mode, true));
_nukiLock.registerBleScanner(_bleScanner);
_nukiLock.setEventHandler(this);
_nukiLock.setConnectTimeout(3);

View File

@@ -215,7 +215,7 @@ inline void initPreferences(Preferences* preferences)
preferences->putBool(preference_debug_readable_data, false);
preferences->putBool(preference_debug_hex_data, false);
preferences->putBool(preference_debug_command, false);
preferences->putBool(preference_connect_mode, false);
preferences->putBool(preference_connect_mode, true);
#ifndef CONFIG_IDF_TARGET_ESP32H2
WiFi.begin();

View File

@@ -2780,7 +2780,7 @@ bool WebCfgServer::processArgs(PsychicRequest *request, String& message)
}
else if(key == "CONNMODE")
{
if(_preferences->getBool(preference_connect_mode, false) != (value == "1"))
if(_preferences->getBool(preference_connect_mode, true) != (value == "1"))
{
_preferences->putBool(preference_connect_mode, (value == "1"));
Log->print(F("Setting changed: "));
@@ -3997,7 +3997,7 @@ esp_err_t WebCfgServer::buildNukiConfigHtml(PsychicRequest *request)
response.print("<table>");
printCheckBox(&response, "LOCKENA", "Nuki Lock enabled", _preferences->getBool(preference_lock_enabled), "");
printCheckBox(&response, "OPENA", "Nuki Opener enabled", _preferences->getBool(preference_opener_enabled), "");
printCheckBox(&response, "CONNMODE", "New Nuki Bluetooth connection mode (disable if there are connection issues)", _preferences->getBool(preference_connect_mode, false), "");
printCheckBox(&response, "CONNMODE", "New Nuki Bluetooth connection mode (disable if there are connection issues)", _preferences->getBool(preference_connect_mode, true), "");
response.print("</table><br>");
response.print("<h3>Advanced Nuki Configuration</h3>");
response.print("<table>");

View File

@@ -461,6 +461,9 @@ void setupTasks(bool ota)
void setup()
{
//Set Log level to error for all TAGS
#ifndef DEBUG_NUKIHUB
esp_log_set_level_master(ESP_LOG_ERROR);
#endif
esp_log_level_set("*", ESP_LOG_ERROR);
//Set Log level to none for mqtt TAG
esp_log_level_set("mqtt", ESP_LOG_NONE);

View File

@@ -49,3 +49,4 @@ CONFIG_HTTPD_ERR_RESP_NO_DELAY=y
CONFIG_HTTPD_PURGE_BUF_LEN=32
CONFIG_HTTPD_WS_SUPPORT=y
CONFIG_ESP_HTTPS_SERVER_ENABLE=n
CONFIG_LOG_MASTER_LEVEL=y