From 9d0f13833dbe855e0e08ca4b0f6022ab3cce59dd Mon Sep 17 00:00:00 2001 From: iranl Date: Sun, 6 Apr 2025 09:45:21 +0200 Subject: [PATCH 01/14] Webflash --- .github/workflows/release.yml | 3 +- README.md | 13 +++++---- index.html | 2 +- pio_package_post.py | 10 ++++--- resources/how-to-flash.txt | 54 +++++++++++++++++------------------ src/Config.h | 2 +- 6 files changed, 43 insertions(+), 41 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 3f4bafc..cb08f74 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -157,8 +157,7 @@ jobs: mkdir -p webflash/ mkdir -p resources/ mkdir -p src/ - cp -vf release/*/nuki_hub_*.bin ota/ - cp -vf release/*/webflash_nuki_hub_*.bin webflash/ + cp -vf release/*/nuki_hub_*.bin ota/ cp -vf master/resources/ota_manifest.py resources/ota_manifest.py cp -vf master/src/Config.h src/Config.h python3 resources/ota_manifest.py release $Version diff --git a/README.md b/README.md index 01ba2b9..10de3e7 100644 --- a/README.md +++ b/README.md @@ -58,6 +58,9 @@ See the "[Connecting via Ethernet](#connecting-via-ethernet-optional)" section f We don't recommend using single-core ESP32 devices (ESP32-C3, ESP32-C6, ESP32-H2, ESP32-Solo1).
Although Nuki Hub supports single-core devices, Nuki Hub uses both CPU cores (if available) to process tasks (e.g. HTTP server/MQTT client/BLE scanner/BLE client) and thus runs much better on dual-core devices.
+We also don't recommend using the original ESP32 or ESP32-Solo1 devices because these devices experience unexpected crashes related to the (closed-source) BLE controller.
+In all newer models (e.g. ESP32-S3, ESP32-P4, ESP32-C3, ESP32-C6, ESP32-H2) these unexpected crashed haven't been seen. + When buying a new device in 2025 we can only recommend the ESP32-S3 with PSRAM (look for an ESP32-S3 with the designation N>=4 and R>=2 such as an ESP32-S3 N16R8).
The ESP32-S3 is a dual-core CPU with many GPIO's, ability to enlarge RAM using PSRAM, ability to connect Ethernet modules over SPI and optionally power the device with a PoE splitter.
The only functions missing from the ESP32-S3 as compared to other ESP devices is the ability to use some Ethernet modules only supported by the original ESP32 (and ESP32-P4) and the ability to connect over WIFI6 (C6 or ESP32-P4 with C6 module) @@ -71,17 +74,15 @@ Other considerations: Devices ranked best-to-worst: - ESP32-P4 with ESP32-C6-MINI-1 module (UNTESTED) - ESP32-S3 with PSRAM -- ...... +- ......
+(Devices below will not support some Nuki Hub functions, be slower and/or are more likely to experience unexpected crashed) +- ESP32-S3 without PSRAM - ...... - ESP32 with PSRAM -- ......
-(Devices below will not support some Nuki Hub functions) - ...... -- ESP32-S3 without PSRAM - ESP32 without PSRAM - ......
-(Devices below will not support more Nuki Hub functions) -- ...... +(Devices below will not support more Nuki Hub functions, be slower and/or are more likely to experience unexpected crashed) - ESP32-C6 - ESP32-solo1 - ESP32-C3 diff --git a/index.html b/index.html index 5062380..d74abd8 100644 --- a/index.html +++ b/index.html @@ -13,7 +13,7 @@ type="module" src="https://unpkg.com/esp-web-tools/dist/web/install-button.js?module"> - +



Note: If flashing doesn't work, press and hold the "BOOT" switch, then click "Install". diff --git a/pio_package_post.py b/pio_package_post.py index a4e333a..456b351 100644 --- a/pio_package_post.py +++ b/pio_package_post.py @@ -28,11 +28,13 @@ def copy_files(source, target, env): project_dir = env.get('PROJECT_DIR') board = get_board_name(env) - if "partitions.bin" in file.name: - shutil.copy(file, f"{target_dir}/nuki_hub.{file.name}") - elif "firmware" in file.stem: + if "firmware" in file.stem: shutil.copy(file, f"{target_dir}/nuki_hub_{board}{file.suffix}") shutil.copy(f"{project_dir}/updater/release/{board}/updater.bin", f"{target_dir}/nuki_hub_updater_{board}{file.suffix}") + elif "bootloader" in file.stem: + shutil.copy(file, f"{target_dir}/nuki_hub_bootloader_{board}{file.suffix}") + elif "partitions" in file.stem: + shutil.copy(file, f"{target_dir}/nuki_hub_partitions_{board}{file.suffix}") else: shutil.copy(file, f"{target_dir}/{file.name}") @@ -79,4 +81,4 @@ env.AddPostAction("$BUILD_DIR/partitions.bin", copy_files) env.AddPostAction("$BUILD_DIR/bootloader.bin", copy_files) env.AddPostAction("$BUILD_DIR/firmware.elf", copy_files) -env.AddPostAction("$BUILD_DIR/${PROGNAME}.bin", merge_bin) \ No newline at end of file +#env.AddPostAction("$BUILD_DIR/${PROGNAME}.bin", merge_bin) \ No newline at end of file diff --git a/resources/how-to-flash.txt b/resources/how-to-flash.txt index 1775b88..1e2bd2c 100644 --- a/resources/how-to-flash.txt +++ b/resources/how-to-flash.txt @@ -24,64 +24,64 @@ Howto flash (Espressif Flash Download Tools) ESP32 e000 boot_app0.bin -1000 bootloader.bin -8000 nuki_hub.partitions.bin +1000 nuki_hub_bootloader_esp32.bin +8000 nuki_hub_partitions_esp32.bin 10000 nuki_hub_esp32.bin 280000 nuki_hub_updater_esp32.bin ESP32-GL-S10 e000 boot_app0.bin -1000 bootloader.bin -8000 nuki_hub.partitions.bin +1000 nuki_hub_bootloader_esp32.bin +8000 nuki_hub_partitions_esp32.bin 10000 nuki_hub_esp32.bin 280000 nuki_hub_updater_esp32.bin ESP32-S3 e000 boot_app0.bin -0 bootloader.bin -8000 nuki_hub.partitions.bin +0 nuki_hub_bootloader_esp32s3.bin +8000 nuki_hub_partitions_esp32s3.bin 10000 nuki_hub_esp32s3.bin 280000 nuki_hub_updater_esp32s3.bin ESP32-S3-OCT e000 boot_app0.bin -0 bootloader.bin -8000 nuki_hub.partitions.bin +0 nuki_hub_bootloader_esp32s3oct.bin +8000 nuki_hub_partitions_esp32s3oct.bin 10000 nuki_hub_esp32s3oct.bin 280000 nuki_hub_updater_esp32s3oct.bin ESP32-C3 e000 boot_app0.bin -0 bootloader.bin -8000 nuki_hub.partitions.bin +0 nuki_hub_bootloader_esp32c3.bin +8000 nuki_hub_partitions_esp32c3.bin 10000 nuki_hub_esp32c3.bin 280000 nuki_hub_updater_esp32c3.bin ESP32-C6 e000 boot_app0.bin -0 bootloader.bin -8000 nuki_hub.partitions.bin +0 nuki_hub_bootloader_esp32c6.bin +8000 nuki_hub_partitions_esp32c6.bin 10000 nuki_hub_esp32c6.bin 280000 nuki_hub_updater_esp32c6.bin ESP32-H2 e000 boot_app0.bin -0 bootloader.bin -8000 nuki_hub.partitions.bin +0 nuki_hub_bootloader_esp32h2.bin +8000 nuki_hub_partitions_esp32h2.bin 10000 nuki_hub_esp32h2.bin 280000 nuki_hub_updater_esp32h2.bin ESP32-P4 e000 boot_app0.bin -0 bootloader.bin -8000 nuki_hub.partitions.bin +0 nuki_hub_bootloader_esp32p4.bin +8000 nuki_hub_partitions_esp32p4.bin 10000 nuki_hub_esp32p4.bin 280000 nuki_hub_updater_esp32p4.bin ESP32-SOLO1 e000 boot_app0.bin -1000 bootloader.bin -8000 nuki_hub.partitions.bin +1000 nuki_hub_bootloader_esp32-solo1.bin +8000 nuki_hub_partitions_esp32-solo1.bin 10000 nuki_hub_esp32-solo1.bin 280000 nuki_hub_updater_esp32-solo1.bin @@ -99,38 +99,38 @@ As an alternative to the Download Tools, you can also use the esptool from the E ## ESP32 -esptool.py --chip esp32 --port /dev/ttyUSB0 --baud 921600 --before default_reset --after hard_reset write_flash -z --flash_mode dio --flash_freq keep --flash_size detect 0xe000 boot_app0.bin 0x1000 bootloader.bin 0x10000 nuki_hub_esp32.bin 0x270000 nuki_hub_updater_esp32.bin 0x8000 nuki_hub.partitions.bin +esptool.py --chip esp32 --port /dev/ttyUSB0 --baud 921600 --before default_reset --after hard_reset write_flash -z --flash_mode dio --flash_freq keep --flash_size detect 0xe000 boot_app0.bin 0x1000 nuki_hub_bootloader_esp32.bin 0x10000 nuki_hub_esp32.bin 0x270000 nuki_hub_updater_esp32.bin 0x8000 nuki_hub_partitions_esp32.bin ## ESP32-GL-S10 -esptool.py --chip esp32 --port /dev/ttyUSB0 --baud 921600 --before default_reset --after hard_reset write_flash -z --flash_mode dio --flash_freq keep --flash_size detect 0xe000 boot_app0.bin 0x1000 bootloader.bin 0x10000 nuki_hub_esp32.bin 0x270000 nuki_hub_updater_esp32.bin 0x8000 nuki_hub.partitions.bin +esptool.py --chip esp32 --port /dev/ttyUSB0 --baud 921600 --before default_reset --after hard_reset write_flash -z --flash_mode dio --flash_freq keep --flash_size detect 0xe000 boot_app0.bin 0x1000 nuki_hub_bootloader_esp32.bin 0x10000 nuki_hub_esp32.bin 0x270000 nuki_hub_updater_esp32.bin 0x8000 nuki_hub_partitions_esp32.bin ## ESP32-S3 -esptool.py --chip esp32s3 --port /dev/ttyUSB0 --baud 921600 --before default_reset --after hard_reset write_flash -z --flash_mode dio --flash_freq keep --flash_size detect 0xe000 boot_app0.bin 0x0 bootloader.bin 0x10000 nuki_hub_esp32s3.bin 0x270000 nuki_hub_updater_esp32s3.bin 0x8000 nuki_hub.partitions.bin +esptool.py --chip esp32s3 --port /dev/ttyUSB0 --baud 921600 --before default_reset --after hard_reset write_flash -z --flash_mode dio --flash_freq keep --flash_size detect 0xe000 boot_app0.bin 0x0 nuki_hub_bootloader_esp32s3.bin 0x10000 nuki_hub_esp32s3.bin 0x270000 nuki_hub_updater_esp32s3.bin 0x8000 nuki_hub_partitions_esp32s3.bin ## ESP32-S3-OCT -esptool.py --chip esp32s3 --port /dev/ttyUSB0 --baud 921600 --before default_reset --after hard_reset write_flash -z --flash_mode dio --flash_freq keep --flash_size detect 0xe000 boot_app0.bin 0x0 bootloader.bin 0x10000 nuki_hub_esp32s3oct.bin 0x270000 nuki_hub_updater_esp32s3oct.bin 0x8000 nuki_hub.partitions.bin +esptool.py --chip esp32s3 --port /dev/ttyUSB0 --baud 921600 --before default_reset --after hard_reset write_flash -z --flash_mode dio --flash_freq keep --flash_size detect 0xe000 boot_app0.bin 0x0 nuki_hub_bootloader_esp32s3oct.bin 0x10000 nuki_hub_esp32s3oct.bin 0x270000 nuki_hub_updater_esp32s3oct.bin 0x8000 nuki_hub_partitions_esp32s3oct.bin ## ESP32-C3 -esptool.py --chip esp32c3 --port /dev/ttyUSB0 --baud 921600 --before default_reset --after hard_reset write_flash -z --flash_mode dio --flash_freq keep --flash_size detect 0xe000 boot_app0.bin 0x0 bootloader.bin 0x10000 nuki_hub_esp32c3.bin 0x270000 nuki_hub_updater_esp32c3.bin 0x8000 nuki_hub.partitions.bin +esptool.py --chip esp32c3 --port /dev/ttyUSB0 --baud 921600 --before default_reset --after hard_reset write_flash -z --flash_mode dio --flash_freq keep --flash_size detect 0xe000 boot_app0.bin 0x0 nuki_hub_bootloader_esp32c3.bin 0x10000 nuki_hub_esp32c3.bin 0x270000 nuki_hub_updater_esp32c3.bin 0x8000 nuki_hub_partitions_esp32c3.bin ## ESP32-C6 -esptool.py --chip esp32c6 --port /dev/ttyUSB0 --baud 921600 --before default_reset --after hard_reset write_flash -z --flash_mode dio --flash_freq keep --flash_size detect 0xe000 boot_app0.bin 0x0 bootloader.bin 0x10000 nuki_hub_esp32c6.bin 0x270000 nuki_hub_updater_esp32c6.bin 0x8000 nuki_hub.partitions.bin +esptool.py --chip esp32c6 --port /dev/ttyUSB0 --baud 921600 --before default_reset --after hard_reset write_flash -z --flash_mode dio --flash_freq keep --flash_size detect 0xe000 boot_app0.bin 0x0 nuki_hub_bootloader_esp32c6.bin 0x10000 nuki_hub_esp32c6.bin 0x270000 nuki_hub_updater_esp32c6.bin 0x8000 nuki_hub_partitions_esp32c6.bin ## ESP32-H2 -esptool.py --chip esp32h2 --port /dev/ttyUSB0 --baud 921600 --before default_reset --after hard_reset write_flash -z --flash_mode dio --flash_freq keep --flash_size detect 0xe000 boot_app0.bin 0x0 bootloader.bin 0x10000 nuki_hub_esp32h2.bin 0x270000 nuki_hub_updater_esp32h2.bin 0x8000 nuki_hub.partitions.bin +esptool.py --chip esp32h2 --port /dev/ttyUSB0 --baud 921600 --before default_reset --after hard_reset write_flash -z --flash_mode dio --flash_freq keep --flash_size detect 0xe000 boot_app0.bin 0x0 nuki_hub_bootloader_esp32h2.bin 0x10000 nuki_hub_esp32h2.bin 0x270000 nuki_hub_updater_esp32h2.bin 0x8000 nuki_hub_partitions_esp32h2.bin ## ESP32-P4 -esptool.py --chip esp32p4 --port /dev/ttyUSB0 --baud 921600 --before default_reset --after hard_reset write_flash -z --flash_mode dio --flash_freq keep --flash_size detect 0xe000 boot_app0.bin 0x0 bootloader.bin 0x10000 nuki_hub_esp32p4.bin 0x270000 nuki_hub_updater_esp32p4.bin 0x8000 nuki_hub.partitions.bin +esptool.py --chip esp32p4 --port /dev/ttyUSB0 --baud 921600 --before default_reset --after hard_reset write_flash -z --flash_mode dio --flash_freq keep --flash_size detect 0xe000 boot_app0.bin 0x0 nuki_hub_bootloader_esp32p4.bin 0x10000 nuki_hub_esp32p4.bin 0x270000 nuki_hub_updater_esp32p4.bin 0x8000 nuki_hub_partitions_esp32p4.bin ## ESP32-SOLO1 -esptool.py --chip esp32 --port /dev/ttyUSB0 --baud 921600 --before default_reset --after hard_reset write_flash -z --flash_mode dio --flash_freq keep --flash_size detect 0xe000 boot_app0.bin 0x1000 bootloader.bin 0x10000 nuki_hub_esp32-solo1.bin 0x270000 nuki_hub_updater_esp32-solo1.bin 0x8000 nuki_hub.partitions.bin +esptool.py --chip esp32 --port /dev/ttyUSB0 --baud 921600 --before default_reset --after hard_reset write_flash -z --flash_mode dio --flash_freq keep --flash_size detect 0xe000 boot_app0.bin 0x1000 nuki_hub_bootloader_esp32-solo1.bin 0x10000 nuki_hub_esp32-solo1.bin 0x270000 nuki_hub_updater_esp32-solo1.bin 0x8000 nuki_hub_partitions_esp32-solo1.bin Adjust the serial device and path to the binaries if necessary. \ No newline at end of file diff --git a/src/Config.h b/src/Config.h index 5649086..ecb64dc 100644 --- a/src/Config.h +++ b/src/Config.h @@ -5,7 +5,7 @@ #define NUKI_HUB_VERSION "9.10" #define NUKI_HUB_VERSION_INT (uint32_t)910 #define NUKI_HUB_BUILD "unknownbuildnr" -#define NUKI_HUB_DATE "2025-04-02" +#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" From e1ea884672f479a1f1a45977d158020dbf595584 Mon Sep 17 00:00:00 2001 From: iranl Date: Sun, 6 Apr 2025 09:55:06 +0200 Subject: [PATCH 02/14] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 10de3e7..a86455e 100644 --- a/README.md +++ b/README.md @@ -15,7 +15,7 @@ Feel free to join us on Discord: https://discord.gg/9nPq85bP4p ## Supported devices Supported ESP32 devices: -- Nuki Hub is compiled against all ESP32 models with Wi-Fi and Bluetooh Low Energy (BLE) which are supported by ESP-IDF 5.3.2 and Arduino Core 3.1.3. +- Nuki Hub is compiled against all ESP32 models with Wi-Fi and Bluetooh Low Energy (BLE) which are supported by ESP-IDF 5.4.1 and Arduino Core 3.2.0. - Tested stable builds are provided for the ESP32, ESP32-S3, ESP32-C3, ESP32-C6 and ESP32-H2. - Untested builds are provided for the ESP32-P4 (with the ESP32-C6-MINI-1 module for BLE and WiFi) and ESP32-Solo1 (as the developers don't own one). From 72d8d51744c55e868c34b9e1ef3a0dae48fbd1a2 Mon Sep 17 00:00:00 2001 From: iranl Date: Sun, 6 Apr 2025 10:00:19 +0200 Subject: [PATCH 03/14] Update how-to-flash.txt --- resources/how-to-flash.txt | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/resources/how-to-flash.txt b/resources/how-to-flash.txt index 1e2bd2c..d39ab21 100644 --- a/resources/how-to-flash.txt +++ b/resources/how-to-flash.txt @@ -27,63 +27,63 @@ e000 boot_app0.bin 1000 nuki_hub_bootloader_esp32.bin 8000 nuki_hub_partitions_esp32.bin 10000 nuki_hub_esp32.bin -280000 nuki_hub_updater_esp32.bin +270000 nuki_hub_updater_esp32.bin ESP32-GL-S10 e000 boot_app0.bin 1000 nuki_hub_bootloader_esp32.bin 8000 nuki_hub_partitions_esp32.bin 10000 nuki_hub_esp32.bin -280000 nuki_hub_updater_esp32.bin +270000 nuki_hub_updater_esp32.bin ESP32-S3 e000 boot_app0.bin 0 nuki_hub_bootloader_esp32s3.bin 8000 nuki_hub_partitions_esp32s3.bin 10000 nuki_hub_esp32s3.bin -280000 nuki_hub_updater_esp32s3.bin +270000 nuki_hub_updater_esp32s3.bin ESP32-S3-OCT e000 boot_app0.bin 0 nuki_hub_bootloader_esp32s3oct.bin 8000 nuki_hub_partitions_esp32s3oct.bin 10000 nuki_hub_esp32s3oct.bin -280000 nuki_hub_updater_esp32s3oct.bin +270000 nuki_hub_updater_esp32s3oct.bin ESP32-C3 e000 boot_app0.bin 0 nuki_hub_bootloader_esp32c3.bin 8000 nuki_hub_partitions_esp32c3.bin 10000 nuki_hub_esp32c3.bin -280000 nuki_hub_updater_esp32c3.bin +270000 nuki_hub_updater_esp32c3.bin ESP32-C6 e000 boot_app0.bin 0 nuki_hub_bootloader_esp32c6.bin 8000 nuki_hub_partitions_esp32c6.bin 10000 nuki_hub_esp32c6.bin -280000 nuki_hub_updater_esp32c6.bin +270000 nuki_hub_updater_esp32c6.bin ESP32-H2 e000 boot_app0.bin 0 nuki_hub_bootloader_esp32h2.bin 8000 nuki_hub_partitions_esp32h2.bin 10000 nuki_hub_esp32h2.bin -280000 nuki_hub_updater_esp32h2.bin +270000 nuki_hub_updater_esp32h2.bin ESP32-P4 e000 boot_app0.bin 0 nuki_hub_bootloader_esp32p4.bin 8000 nuki_hub_partitions_esp32p4.bin 10000 nuki_hub_esp32p4.bin -280000 nuki_hub_updater_esp32p4.bin +270000 nuki_hub_updater_esp32p4.bin ESP32-SOLO1 e000 boot_app0.bin 1000 nuki_hub_bootloader_esp32-solo1.bin 8000 nuki_hub_partitions_esp32-solo1.bin 10000 nuki_hub_esp32-solo1.bin -280000 nuki_hub_updater_esp32-solo1.bin +270000 nuki_hub_updater_esp32-solo1.bin Make sure the checkmarks for all files are enabled. From 5176cdb0b7ad283d453ca823372387f2ecc657a5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan-Ole=20Sch=C3=BCmann?= Date: Mon, 7 Apr 2025 20:51:29 +0700 Subject: [PATCH 04/14] Update home assistant auto discovery names (#654) --- src/HomeAssistantDiscovery.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/HomeAssistantDiscovery.cpp b/src/HomeAssistantDiscovery.cpp index 9cd6812..972cdf3 100644 --- a/src/HomeAssistantDiscovery.cpp +++ b/src/HomeAssistantDiscovery.cpp @@ -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, From 3a6d3ecd2ffd5315e1b8445cf04f92618cd64d86 Mon Sep 17 00:00:00 2001 From: iranl Date: Mon, 7 Apr 2025 20:36:21 +0200 Subject: [PATCH 05/14] Allow nukihub as hostname --- README.md | 2 +- src/NukiNetwork.cpp | 4 ++-- src/WebCfgServer.cpp | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) 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/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/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 From cd87d46cd6c97685254560b8d00d9287f9145427 Mon Sep 17 00:00:00 2001 From: iranl Date: Mon, 7 Apr 2025 20:57:09 +0200 Subject: [PATCH 06/14] Fix import/export --- src/PreferencesKeys.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 = From 6452caa6c915f6e49d910361133d4b14ab232f64 Mon Sep 17 00:00:00 2001 From: iranl Date: Mon, 7 Apr 2025 20:51:36 +0200 Subject: [PATCH 07/14] Fix GL-S10 build --- platformio.ini | 11 +++++------ src/Config.h | 12 ++++++------ updater/platformio.ini | 2 ++ 3 files changed, 13 insertions(+), 12 deletions(-) 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/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] From d595bc29c11d7394cccab55f3f9871bcda78ee4d Mon Sep 17 00:00:00 2001 From: iranl Date: Mon, 7 Apr 2025 22:01:32 +0200 Subject: [PATCH 08/14] Update release.yml --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index cb08f74..ea1c91b 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -140,7 +140,7 @@ jobs: prerelease: false allowUpdates: true updateOnlyUnreleased: false - draft: false + draft: true generateReleaseNotes: true makeLatest: true name: "Nuki Hub ${{ steps.get_version.outputs.VERSION }}" From f7354170dbdb74d6fb54b902630be33927763d81 Mon Sep 17 00:00:00 2001 From: iranl Date: Mon, 7 Apr 2025 22:29:54 +0200 Subject: [PATCH 09/14] Set next release to 9.11 --- src/Config.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Config.h b/src/Config.h index ee590f9..95d5acd 100644 --- a/src/Config.h +++ b/src/Config.h @@ -2,8 +2,8 @@ #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-06" From 2640c870551093447223c089c1d8b9e56c7458c2 Mon Sep 17 00:00:00 2001 From: iranl Date: Tue, 8 Apr 2025 08:12:04 +0200 Subject: [PATCH 10/14] Update README.md --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index dbf8ca0..b52cc8e 100644 --- a/README.md +++ b/README.md @@ -75,14 +75,14 @@ Devices ranked best-to-worst: - ESP32-P4 with ESP32-C6-MINI-1 module (UNTESTED) - ESP32-S3 with PSRAM - ......
-(Devices below will not support some Nuki Hub functions, be slower and/or are more likely to experience unexpected crashed) +(Devices below will not support some Nuki Hub functions, be slower and/or are more likely to experience unexpected crashes) - ESP32-S3 without PSRAM - ...... - ESP32 with PSRAM - ...... - ESP32 without PSRAM - ......
-(Devices below will not support more Nuki Hub functions, be slower and/or are more likely to experience unexpected crashed) +(Devices below will not support more Nuki Hub functions, be slower and/or are more likely to experience unexpected crashes) - ESP32-C6 - ESP32-solo1 - ESP32-C3 From 8503161a65df647378b68095cab7826a1862f7c0 Mon Sep 17 00:00:00 2001 From: iranl Date: Tue, 8 Apr 2025 22:00:09 +0200 Subject: [PATCH 11/14] Update sdkconfig.defaults --- sdkconfig.defaults | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/sdkconfig.defaults b/sdkconfig.defaults index b7bf4b8..0d140b4 100644 --- a/sdkconfig.defaults +++ b/sdkconfig.defaults @@ -9,7 +9,6 @@ CONFIG_FREERTOS_IDLE_TASK_STACKSIZE=3072 # REDUCE RAM USAGE CONFIG_FREERTOS_PLACE_FUNCTIONS_INTO_FLASH=y CONFIG_RINGBUF_PLACE_FUNCTIONS_INTO_FLASH=y -CONFIG_SPI_FLASH_ROM_DRIVER_PATCH=n CONFIG_ESP32_REV_MIN=3 CONFIG_ESP_EVENT_POST_FROM_IRAM_ISR=n CONFIG_SPI_MASTER_ISR_IN_IRAM=n @@ -165,4 +164,4 @@ CONFIG_HTTPD_MAX_REQ_HDR_LEN=2048 CONFIG_HTTPD_MAX_URI_LEN=512 CONFIG_HTTPD_ERR_RESP_NO_DELAY=y CONFIG_HTTPD_PURGE_BUF_LEN=32 -CONFIG_HTTPD_WS_SUPPORT=y \ No newline at end of file +CONFIG_HTTPD_WS_SUPPORT=y From 0634f3af96900785f93c8f6010a786aaeac9b957 Mon Sep 17 00:00:00 2001 From: technyon Date: Sun, 13 Apr 2025 07:19:02 +0200 Subject: [PATCH 12/14] Remove not recommended GPIO pins for S3 --- src/Gpio.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/Gpio.h b/src/Gpio.h index b5cdf38..ba3424a 100644 --- a/src/Gpio.h +++ b/src/Gpio.h @@ -89,8 +89,7 @@ private: const std::vector _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 _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 }; - #elif defined(CONFIG_IDF_TARGET_ESP32C6) + const std::vector _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 _availablePins = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 12, 13, 15, 16, 17, 18, 19, 20, 21, 22, 23 }; #elif defined(CONFIG_IDF_TARGET_ESP32H2) From cc118edbfb2aa5e559cbc6ec65d9e056abfeafc1 Mon Sep 17 00:00:00 2001 From: technyon Date: Sun, 13 Apr 2025 07:52:52 +0200 Subject: [PATCH 13/14] fix syntax --- src/Gpio.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Gpio.h b/src/Gpio.h index ba3424a..9d48dc7 100644 --- a/src/Gpio.h +++ b/src/Gpio.h @@ -89,7 +89,8 @@ private: const std::vector _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 _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) + const std::vector _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 _availablePins = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 12, 13, 15, 16, 17, 18, 19, 20, 21, 22, 23 }; #elif defined(CONFIG_IDF_TARGET_ESP32H2) From ea192d3c0d1201eb5a14bffa2c427a857cfddbb7 Mon Sep 17 00:00:00 2001 From: iranl Date: Sun, 13 Apr 2025 21:46:26 +0200 Subject: [PATCH 14/14] Improve Webflash --- .github/workflows/beta.yml | 7 +- .github/workflows/nightly.yml | 6 +- .github/workflows/release.yml | 10 +-- README.md | 2 - index.html | 137 +++++++++++++++++++++++++--------- 5 files changed, 111 insertions(+), 51 deletions(-) diff --git a/.github/workflows/beta.yml b/.github/workflows/beta.yml index edda08a..0994bf5 100644 --- a/.github/workflows/beta.yml +++ b/.github/workflows/beta.yml @@ -113,23 +113,22 @@ jobs: run: | mkdir -p ota/beta/ mkdir -p ota/master/ - mkdir -p webflash/ mkdir -p resources/ mkdir -p src/ cp -vf release/*/nuki_hub_*.bin ota/beta/ cp -vf master/resources/ota_manifest.py resources/ota_manifest.py cp -vf master/src/Config.h src/Config.h python3 resources/ota_manifest.py beta $Version - find * -not -path "ota*" -not -path "webflash*" -delete + find * -not -path "ota*" -delete rm -rf .github .gitignore .gitmodules touch ota/beta/empty + touch ota/beta/dummy.bin touch ota/master/empty - touch webflash/empty - name: Commit binaries to binary uses: stefanzweifel/git-auto-commit-action@v5 with: commit_message: "Update binaries" - file_pattern: 'ota/* ota/master/* ota/beta/* webflash/*' + file_pattern: 'ota/* ota/master/* ota/beta/*' branch: binary skip_dirty_check: true skip_fetch: true diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index a53d0f6..7559b85 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -136,23 +136,21 @@ jobs: run: | mkdir -p ota/beta/ mkdir -p ota/master/ - mkdir -p webflash/ mkdir -p resources/ mkdir -p src/ cp -vf release/*/nuki_hub_*.bin ota/master/ cp -vf master/resources/ota_manifest.py resources/ota_manifest.py cp -vf master/src/Config.h src/Config.h python3 resources/ota_manifest.py master $Version - find * -not -path "ota*" -not -path "webflash*" -delete + find * -not -path "ota*" -delete rm -rf .github .gitignore .gitmodules touch ota/beta/empty touch ota/master/empty - touch webflash/empty - name: Commit binaries to binary uses: stefanzweifel/git-auto-commit-action@v5 with: commit_message: "Update binaries" - file_pattern: 'ota/* ota/master/* ota/beta/* webflash/*' + file_pattern: 'ota/* ota/master/* ota/beta/*' branch: binary skip_dirty_check: true skip_fetch: true diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index ea1c91b..f8546b6 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -124,7 +124,7 @@ jobs: echo "${FOLDER} -- ${ZIPFILE}" cd $FOLDER - zip -9r ../../${ZIPFILE} * -x "webflash_nuki_hub_*.bin" + zip -9r ../../${ZIPFILE} * ARTIFACTS="${ARTIFACTS}${ZIPFILE}," cd ../.. @@ -148,13 +148,12 @@ jobs: artifacts: ${{ steps.zip.outputs.artifacts }} artifactContentType: application/zip tag: ${{ steps.get_version.outputs.VERSION }} - - name: Copy binaries to ota and webflash and remove beta + - name: Copy binaries to ota and remove beta env: Version: ${{ github.run_id }}.${{ github.run_number }}.${{ github.run_attempt }} run: | mkdir -p ota/beta/ mkdir -p ota/master/ - mkdir -p webflash/ mkdir -p resources/ mkdir -p src/ cp -vf release/*/nuki_hub_*.bin ota/ @@ -162,17 +161,16 @@ jobs: cp -vf master/src/Config.h src/Config.h python3 resources/ota_manifest.py release $Version python3 resources/ota_manifest.py beta none - find * -not -path "ota*" -not -path "webflash*" -delete + find * -not -path "ota*" -delete rm -rf ota/beta/*.bin rm -rf .github .gitignore .gitmodules touch ota/beta/empty touch ota/master/empty - touch webflash/empty - name: Commit binaries to binary uses: stefanzweifel/git-auto-commit-action@v5 with: commit_message: "Update binaries" - file_pattern: 'ota/* ota/master/* ota/beta/* webflash/*' + file_pattern: 'ota/* ota/master/* ota/beta/*' branch: binary skip_dirty_check: true skip_fetch: true diff --git a/README.md b/README.md index b52cc8e..94aa692 100644 --- a/README.md +++ b/README.md @@ -129,7 +129,6 @@ This project is free to use for everyone. However if you feel like donating, you Flash the firmware to an ESP32. The easiest way to install is to use the web installer using a compatible browser like Chrome/Opera/Edge:
https://technyon.github.io/nuki_hub/
-NOTE: Webflash is not available for the ESP32-Solo1

Alternatively download the latest release for your ESP32 model from https://github.com/technyon/nuki_hub/releases
Unpack the zip archive and read the included how-to-flash.txt for installation instructions for either "Espressif Flash Download Tools" or "esptool".
@@ -212,7 +211,6 @@ You can check on the info page of the Web configurator if PSRAM is available. Note that there are two builds of Nuki Hub for the ESP32-S3 available.
One for devices with no or Quad SPI PSRAM and one for devices with Octal SPI PSRAM.
-Webflash will automatically flash the no/Quad SPI PSRAM build when an ESP32-S3 is connected.
If your ESP32-S3 device has PSRAM but it is not detected please switch to the other S3 binary.
You can do this by flashing the correct binaries manually or by selecting the option to switch S3 binary build from the Firmware Update page of the Web Configurator. diff --git a/index.html b/index.html index d74abd8..3c6fa7a 100644 --- a/index.html +++ b/index.html @@ -1,37 +1,104 @@ -Nuki Hub web installer - + + + + + Install NukiHub + + + - -



- Note: If flashing doesn't work, press and hold the "BOOT" switch, then click "Install". - - - - - - - - - + fetch("https://raw.githubusercontent.com/technyon/nuki_hub/binary/ota/beta/dummy.bin").then(function(response) { + if (!response.ok) { + throw new Error("Not 2xx response", {cause: response}); + } + else { + for (let i = 0; i < selectEl.options.length; i++) { + const text = selectEl.options[i].value; + if (text == '') { + selectEl.remove(i); + i--; + } + } + } + }).catch(function(err) { + for (let i = 0; i < selectEl.options.length; i++) { + const text = selectEl.options[i].value; + if (text.includes('/beta/')) { + selectEl.remove(i); + i--; + } + } + }); + try{ + button.manifest = "https://raw.githubusercontent.com/technyon/nuki_hub/binary/ota/webflash_manifest.json"; + selectEl.addEventListener("change", () => { + button.manifest = selectEl.value; + }); + } + catch(e){ + console.log(e); + } + },{ once: true }); + + + +
+

Install NukiHub

+
+
    +
  1. Connect the ESP device to your computer
    using USB or serial-to-USB adapter

  2. +
  3. Select the firmware variant suitable for
    your device

  4. +
  5. Click "Connect" and select the correct port
    or find help if no device found
  6. +
+
+
+
+ +
+
+ + Your browser does not support Web Serial.
Open this page in Google Chrome or
Microsoft Edge instead.
+
+
+ +
+ + \ No newline at end of file