diff --git a/README.md b/README.md index a86455e..dbf8ca0 100644 --- a/README.md +++ b/README.md @@ -226,7 +226,7 @@ In a browser navigate to the IP address assigned to the ESP32. #### Network Configuration -- Hostname (needs to be unique, "nukihub" is not allowed): Set the hostname for the Nuki Hub ESP, will also be used as the MQTT client ID. Needs to be unique. +- Hostname (needs to be unique): Set the hostname for the Nuki Hub ESP, will also be used as the MQTT client ID. Needs to be unique. - Network hardware: "Wi-Fi only" by default, set to one of the specified ethernet modules if available, see the "Supported Ethernet devices" and "[Connecting via Ethernet](#connecting-via-ethernet-optional)" section of this README. - Home Assistant device configuration URL: When using Home Assistant discovery the link to the Nuki Hub Web Configuration will be published to Home Assistant. By default when this setting is left empty this will link to the current IP of the Nuki Hub. When using a reverse proxy to access the Web Configuration you can set a custom URL here. - RSSI Publish interval: Set to a positive integer to set the amount of seconds between updates to the maintenance/wifiRssi MQTT topic with the current Wi-Fi RSSI, set to -1 to disable, default 60. diff --git a/platformio.ini b/platformio.ini index 0ba52dd..bb62438 100644 --- a/platformio.ini +++ b/platformio.ini @@ -83,6 +83,8 @@ extends = env:esp32 board = nuki-esp32gls10 board_build.cmake_extra_args = -DSDKCONFIG_DEFAULTS="sdkconfig.defaults;sdkconfig.release.defaults;sdkconfig.defaults.esp32;sdkconfig.gls10.defaults" +build_flags = + ${env:esp32.build_flags} -DNUKI_TARGET_GL_S10=y [env:esp32-c3] @@ -164,13 +166,10 @@ build_flags = extends = env:esp32-gl-s10 custom_build = debug board_build.cmake_extra_args = - -DSDKCONFIG_DEFAULTS="sdkconfig.defaults;sdkconfig.debug.defaults;sdkconfig.defaults.esp32;sdkconfig.gls10.defaults" + -DSDKCONFIG_DEFAULTS="sdkconfig.defaults;sdkconfig.debug.defaults;sdkconfig.defaults.esp32;sdkconfig.gls10.defaults" build_flags = - ${env.build_flags} - -DCORE_DEBUG_LEVEL=ARDUHAL_LOG_LEVEL_DEBUG - -DCONFIG_NIMBLE_CPP_LOG_LEVEL=0 - -DCONFIG_BT_NIMBLE_LOG_LEVEL=0 - -DDEBUG_NUKIHUB + ${env:esp32_dbg.build_flags} + -DNUKI_TARGET_GL_S10=y [env:esp32-c3_dbg] extends = env:esp32-c3 diff --git a/src/Config.h b/src/Config.h index ecb64dc..ee590f9 100644 --- a/src/Config.h +++ b/src/Config.h @@ -109,17 +109,17 @@ #define BOOT_BUTTON_GPIO (gpio_num_t)0 #elif defined(NUKI_TARGET_GL_S10) #define GITHUB_LATEST_RELEASE_BINARY_URL "https://raw.githubusercontent.com/technyon/nuki_hub/binary/ota/nuki_hub_esp32-gl-s10.bin" -#define GITHUB_LATEST_UPDATER_BINARY_URL (char*)"https://raw.githubusercontent.com/technyon/nuki_hub/binary/ota/nuki_hub_updater_esp32.bin" +#define GITHUB_LATEST_UPDATER_BINARY_URL (char*)"https://raw.githubusercontent.com/technyon/nuki_hub/binary/ota/nuki_hub_updater_esp32gls10.bin" #define GITHUB_BETA_RELEASE_BINARY_URL (char*)"https://raw.githubusercontent.com/technyon/nuki_hub/binary/ota/beta/nuki_hub_esp32-gl-s10.bin" -#define GITHUB_BETA_UPDATER_BINARY_URL (char*)"https://raw.githubusercontent.com/technyon/nuki_hub/binary/ota/beta/nuki_hub_updater_esp32.bin" +#define GITHUB_BETA_UPDATER_BINARY_URL (char*)"https://raw.githubusercontent.com/technyon/nuki_hub/binary/ota/beta/nuki_hub_updater_esp32gls10.bin" #define GITHUB_MASTER_RELEASE_BINARY_URL (char*)"https://raw.githubusercontent.com/technyon/nuki_hub/binary/ota/master/nuki_hub_esp32-gl-s10.bin" -#define GITHUB_MASTER_UPDATER_BINARY_URL (char*)"https://raw.githubusercontent.com/technyon/nuki_hub/binary/ota/master/nuki_hub_updater_esp32.bin" +#define GITHUB_MASTER_UPDATER_BINARY_URL (char*)"https://raw.githubusercontent.com/technyon/nuki_hub/binary/ota/master/nuki_hub_updater_esp32gls10.bin" #define GITHUB_LATEST_RELEASE_BINARY_URL_DBG (char*)"https://raw.githubusercontent.com/technyon/nuki_hub/binary/ota/debug/nuki_hub_esp32-gl-s10.bin" -#define GITHUB_LATEST_UPDATER_BINARY_URL_DBG (char*)"https://raw.githubusercontent.com/technyon/nuki_hub/binary/ota/debug/nuki_hub_updater_esp32.bin" +#define GITHUB_LATEST_UPDATER_BINARY_URL_DBG (char*)"https://raw.githubusercontent.com/technyon/nuki_hub/binary/ota/debug/nuki_hub_updater_esp32gls10.bin" #define GITHUB_BETA_RELEASE_BINARY_URL_DBG (char*)"https://raw.githubusercontent.com/technyon/nuki_hub/binary/ota/debug/beta/nuki_hub_esp32-gl-s10.bin" -#define GITHUB_BETA_UPDATER_BINARY_URL_DBG (char*)"https://raw.githubusercontent.com/technyon/nuki_hub/binary/ota/debug/beta/nuki_hub_updater_esp32.bin" +#define GITHUB_BETA_UPDATER_BINARY_URL_DBG (char*)"https://raw.githubusercontent.com/technyon/nuki_hub/binary/ota/debug/beta/nuki_hub_updater_esp32gls10.bin" #define GITHUB_MASTER_RELEASE_BINARY_URL_DBG (char*)"https://raw.githubusercontent.com/technyon/nuki_hub/binary/ota/debug/master/nuki_hub_esp32-gl-s10.bin" -#define GITHUB_MASTER_UPDATER_BINARY_URL_DBG (char*)"https://raw.githubusercontent.com/technyon/nuki_hub/binary/ota/debug/master/nuki_hub_updater_esp32.bin" +#define GITHUB_MASTER_UPDATER_BINARY_URL_DBG (char*)"https://raw.githubusercontent.com/technyon/nuki_hub/binary/ota/debug/master/nuki_hub_updater_esp32gls10.bin" #define GITHUB_LATEST_RELEASE_BINARY_URL_OTHER (char*)"https://raw.githubusercontent.com/technyon/nuki_hub/binary/ota/nuki_hub_esp32.bin" #define GITHUB_LATEST_UPDATER_BINARY_URL_OTHER (char*)"https://raw.githubusercontent.com/technyon/nuki_hub/binary/ota/nuki_hub_updater_esp32.bin" #define NUKI_HUB_HW (char*)"ESP32-GL-S10" diff --git a/src/NukiNetwork.cpp b/src/NukiNetwork.cpp index acb5aa4..480b150 100644 --- a/src/NukiNetwork.cpp +++ b/src/NukiNetwork.cpp @@ -217,7 +217,7 @@ void NukiNetwork::initialize() { _hostname = _preferences->getString(preference_hostname, ""); - if(_hostname == "" || _hostname == "nukihub") + if(_hostname == "") { char _nukiHubUidString[20]; uint8_t mac[8]; @@ -265,7 +265,7 @@ void NukiNetwork::initialize() _hostname = _preferences->getString(preference_hostname, ""); - if(_hostname == "" || _hostname == "nukihub") + if(_hostname == "") { char _nukiHubUidString[20]; uint8_t mac[8]; diff --git a/src/PreferencesKeys.h b/src/PreferencesKeys.h index 9cfcdef..5762e56 100644 --- a/src/PreferencesKeys.h +++ b/src/PreferencesKeys.h @@ -563,7 +563,7 @@ private: }; std::vector _bytePrefs = { - preference_acl, preference_conf_info_enabled, preference_conf_lock_basic_acl, preference_conf_lock_advanced_acl, preference_conf_opener_basic_acl, + preference_acl, preference_conf_lock_basic_acl, preference_conf_lock_advanced_acl, preference_conf_opener_basic_acl, preference_conf_opener_advanced_acl, preference_gpio_configuration }; std::vector _intPrefs = diff --git a/src/WebCfgServer.cpp b/src/WebCfgServer.cpp index 576f032..e08b052 100644 --- a/src/WebCfgServer.cpp +++ b/src/WebCfgServer.cpp @@ -3174,7 +3174,7 @@ bool WebCfgServer::processArgs(PsychicRequest *request, PsychicResponse* resp, S } else if(key == "HOSTNAME") { - if(_preferences->getString(preference_hostname, "") != value && value != "nukihub") + if(_preferences->getString(preference_hostname, "") != value) { _preferences->putString(preference_hostname, value); Log->print("Setting changed: "); @@ -5104,7 +5104,7 @@ esp_err_t WebCfgServer::buildNetworkConfigHtml(PsychicRequest *request, PsychicR response.print(""); response.print("

Network Configuration

"); response.print(""); - printInputField(&response, "HOSTNAME", "Hostname (needs to be unique, \"nukihub\" is not allowed)", _preferences->getString(preference_hostname).c_str(), 100, ""); + printInputField(&response, "HOSTNAME", "Hostname (needs to be unique)", _preferences->getString(preference_hostname).c_str(), 100, ""); printDropDown(&response, "NWHW", "Network hardware", String(_preferences->getInt(preference_network_hardware)), getNetworkDetectionOptions(), ""); printInputField(&response, "HASSCUURL", "Home Assistant device configuration URL (empty to use http://LOCALIP; fill when using a reverse proxy for example)", _preferences->getString(preference_mqtt_hass_cu_url).c_str(), 261, ""); #ifndef CONFIG_IDF_TARGET_ESP32H2 diff --git a/updater/platformio.ini b/updater/platformio.ini index 38ff5a5..477b11a 100644 --- a/updater/platformio.ini +++ b/updater/platformio.ini @@ -72,6 +72,8 @@ extends = env:updater_esp32 board = nuki-esp32gls10 board_build.cmake_extra_args = -DSDKCONFIG_DEFAULTS="sdkconfig.defaults;sdkconfig.defaults.esp32;sdkconfig.gls10.defaults" +build_flags = + ${env.build_flags} -DNUKI_TARGET_GL_S10=y [env:updater_esp32-c3]