Merge remote-tracking branch 'upstream/master' into new-commands

This commit is contained in:
iranl
2025-04-14 19:59:29 +02:00
16 changed files with 192 additions and 130 deletions

View File

@@ -2,10 +2,10 @@
#include "sdkconfig.h"
#define NUKI_HUB_VERSION "9.10"
#define NUKI_HUB_VERSION_INT (uint32_t)910
#define NUKI_HUB_VERSION "9.11"
#define NUKI_HUB_VERSION_INT (uint32_t)911
#define NUKI_HUB_BUILD "unknownbuildnr"
#define NUKI_HUB_DATE "2025-04-04"
#define NUKI_HUB_DATE "2025-04-06"
#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"
@@ -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"

View File

@@ -89,7 +89,7 @@ private:
const std::vector<uint8_t> _availablePins = { 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 18, 19, 20, 21 };
#elif defined(CONFIG_IDF_TARGET_ESP32S3)
//Based on https://github.com/atomic14/esp32-s3-pinouts?tab=readme-ov-file and https://docs.espressif.com/projects/esp-idf/en/v5.3/esp32s3/api-reference/peripherals/gpio.html and https://www.espressif.com/sites/default/files/documentation/esp32-s3_datasheet_en.pdf
const std::vector<uint8_t> _availablePins = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48 };
const std::vector<uint8_t> _availablePins = { 1, 2, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 21, 38, 39, 40, 41, 42 };
#elif defined(CONFIG_IDF_TARGET_ESP32C6)
//Based on https://docs.espressif.com/projects/esp-idf/en/v5.3/esp32c6/api-reference/peripherals/gpio.html and https://www.espressif.com/sites/default/files/documentation/esp32-c6_datasheet_en.pdf
const std::vector<uint8_t> _availablePins = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 12, 13, 15, 16, 17, 18, 19, 20, 21, 22, 23 };

View File

@@ -284,7 +284,7 @@ void HomeAssistantDiscovery::publishHASSNukiHubConfig()
"nuki_hub_version",
_nukiHubUidString,
"_nuki_hub_version",
"Nuki Hub version",
"Version",
_hostname.c_str(),
_baseTopic.c_str(),
String("~") + mqtt_topic_info_nuki_hub_version,
@@ -303,7 +303,7 @@ void HomeAssistantDiscovery::publishHASSNukiHubConfig()
"nuki_hub_build",
_nukiHubUidString,
"_nuki_hub_build",
"Nuki Hub build",
"Build",
_hostname.c_str(),
_baseTopic.c_str(),
String("~") + mqtt_topic_info_nuki_hub_build,
@@ -356,7 +356,7 @@ void HomeAssistantDiscovery::publishHASSNukiHubConfig()
"nuki_hub_latest",
_nukiHubUidString,
"_nuki_hub_latest",
"Nuki Hub latest",
"Latest Version",
_hostname.c_str(),
_baseTopic.c_str(),
String("~") + mqtt_topic_info_nuki_hub_latest,
@@ -381,7 +381,7 @@ void HomeAssistantDiscovery::publishHASSNukiHubConfig()
"nuki_hub_update",
_nukiHubUidString,
"_nuki_hub_update",
"Nuki Hub firmware update",
"Firmware update",
_hostname.c_str(),
_baseTopic.c_str(),
String("~") + mqtt_topic_info_nuki_hub_version,
@@ -403,7 +403,7 @@ void HomeAssistantDiscovery::publishHASSNukiHubConfig()
"nuki_hub_update",
_nukiHubUidString,
"_nuki_hub_update",
"Nuki Hub firmware update",
"Firmware update",
_hostname.c_str(),
_baseTopic.c_str(),
String("~") + mqtt_topic_info_nuki_hub_version,

View File

@@ -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];

View File

@@ -563,7 +563,7 @@ private:
};
std::vector<char*> _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<char*> _intPrefs =

View File

@@ -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("<input type=\"hidden\" name=\"page\" value=\"savecfg\">");
response.print("<h3>Network Configuration</h3>");
response.print("<table>");
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