diff --git a/.github/workflows/beta.yml b/.github/workflows/beta.yml
index db11241..edda08a 100644
--- a/.github/workflows/beta.yml
+++ b/.github/workflows/beta.yml
@@ -12,8 +12,7 @@ jobs:
strategy:
fail-fast: false
matrix:
- #board: [esp32, esp32-s3, esp32-s3-oct, esp32-c3, esp32-c6, esp32-h2, esp32-solo1, esp32-gl-s10, esp32-p4]
- board: [esp32, esp32-s3, esp32-s3-oct, esp32-c3, esp32-c6, esp32-h2, esp32-solo1, esp32-gl-s10]
+ board: [esp32, esp32-s3, esp32-s3-oct, esp32-c3, esp32-c6, esp32-h2, esp32-solo1, esp32-gl-s10, esp32-p4]
build: [release]
env:
BOARD: ${{ matrix.board }}
@@ -37,7 +36,7 @@ jobs:
key: ${{ runner.os }}-pio-${{ matrix.board }}
- uses: actions/setup-python@v5
with:
- python-version: '3.9'
+ python-version: '3.10'
- name: Install dependencies
run: make deps
- name: Add version info
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index 5728308..98196f1 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -18,8 +18,7 @@ jobs:
strategy:
fail-fast: false
matrix:
- #board: [esp32, esp32-s3, esp32-s3-oct, esp32-c3, esp32-c6, esp32-h2, esp32-solo1, esp32-gl-s10, esp32-p4]
- board: [esp32, esp32-s3, esp32-s3-oct, esp32-c3, esp32-c6, esp32-h2, esp32-solo1, esp32-gl-s10]
+ board: [esp32, esp32-s3, esp32-s3-oct, esp32-c3, esp32-c6, esp32-h2, esp32-solo1, esp32-gl-s10, esp32-p4]
build: [release]
env:
BOARD: ${{ matrix.board }}
@@ -43,7 +42,7 @@ jobs:
key: ${{ runner.os }}-pio-${{ matrix.board }}
- uses: actions/setup-python@v5
with:
- python-version: '3.9'
+ python-version: '3.10'
- name: Install dependencies
run: make deps
- name: Add version info
diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml
index f493baf..a53d0f6 100644
--- a/.github/workflows/nightly.yml
+++ b/.github/workflows/nightly.yml
@@ -34,8 +34,7 @@ jobs:
strategy:
fail-fast: false
matrix:
- #board: [esp32, esp32-s3, esp32-s3-oct, esp32-c3, esp32-c6, esp32-h2, esp32-solo1, esp32-gl-s10, esp32-p4]
- board: [esp32, esp32-s3, esp32-s3-oct, esp32-c3, esp32-c6, esp32-h2, esp32-solo1, esp32-gl-s10]
+ board: [esp32, esp32-s3, esp32-s3-oct, esp32-c3, esp32-c6, esp32-h2, esp32-solo1, esp32-gl-s10, esp32-p4]
build: [release]
env:
BOARD: ${{ matrix.board }}
@@ -59,7 +58,7 @@ jobs:
key: ${{ runner.os }}-pio-${{ matrix.board }}
- uses: actions/setup-python@v5
with:
- python-version: '3.9'
+ python-version: '3.10'
- name: Install dependencies
run: make deps
- name: Add version info
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index 953a8a2..3f4bafc 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -12,8 +12,7 @@ jobs:
strategy:
fail-fast: false
matrix:
- #board: [esp32, esp32-s3, esp32-s3-oct, esp32-c3, esp32-c6, esp32-h2, esp32-solo1, esp32-gl-s10, esp32-p4]
- board: [esp32, esp32-s3, esp32-s3-oct, esp32-c3, esp32-c6, esp32-h2, esp32-solo1, esp32-gl-s10]
+ board: [esp32, esp32-s3, esp32-s3-oct, esp32-c3, esp32-c6, esp32-h2, esp32-solo1, esp32-gl-s10, esp32-p4]
build: [release]
env:
BOARD: ${{ matrix.board }}
@@ -37,7 +36,7 @@ jobs:
key: ${{ runner.os }}-pio-${{ matrix.board }}
- uses: actions/setup-python@v5
with:
- python-version: '3.9'
+ python-version: '3.10'
- name: Install dependencies
run: make deps
- name: Add version info
diff --git a/HYBRID.md b/HYBRID.md
index f79b99b..4906a47 100644
--- a/HYBRID.md
+++ b/HYBRID.md
@@ -22,13 +22,13 @@ In hybrid mode Nuki Hub will automatically choose the best way to communicate wi
When compared to regular/bridge mode this leads to speed increases in getting state changes and pushing state changes (because we can send and receive usefull information directly over MQTT without having to connect over BLE)
When compared to the official MQTT implementation this adds many many features that are not available in the official MQTT implementation and would normally require you to use the app or Web API (which has its own issues, downtime and cloud requirement).
-**As the Nuki Smartlock Ultra has no support for the Nuki Bridge it is mandatory to setup Hybrid mode to receive prompt state changes from the lock in Nuki Hub.**
+**As the Nuki Smartlock Ultra/5th gen Pro has no support for the Nuki Bridge it is mandatory to setup Hybrid mode to receive prompt state changes from the lock in Nuki Hub.**
### Requirements ###
- ESP32 running Nuki Hub 9.08 or higher
-- For WiFi: Nuki lock 3.0 Pro, Nuki Lock 4.0 Pro or Nuki Lock Ultra
-- For Thread: Nuki Lock 4.0, Nuki Lock 4.0 Pro or Nuki Lock Ultra. Note that you do ***NOT*** need to buy the remote access addon for the Nuki Lock 4.0
+- For WiFi: Nuki lock 3.0 Pro, Nuki Lock 4.0 Pro, Nuki Lock 5.0 Pro, Nuki Lock Go or Nuki Lock Ultra
+- For Thread: Nuki Lock 4.0, Nuki Lock 4.0 Pro, Nuki Lock 5.0 Pro, Nuki Lock Go or Nuki Lock Ultra. Note that you do ***NOT*** need to buy the remote access addon for the Nuki Lock 4.0 or Nuki Lock Go
- For Thread: The Nuki Lock needs to have network access to the same MQTT server as the one that Nuki Hub is conected to. Depending if the MQTT server is reachable over IPv6 you might need an OpenThread Border router that supports NAT64 and has this enabled. Currently this means an Apple Device or Home Assistant with the Matter server and OpenThread Border Router
- The Nuki Opener does not have WiFI or Thread and thus doesn't benefit from the hybrid solutions added speed. You can however use and connect a Nuki Opener as usual which will function over regular BLE and can still connect Nuki Hub as a bridge to an Opener.
diff --git a/README.md b/README.md
index 9504260..50dd063 100644
--- a/README.md
+++ b/README.md
@@ -29,6 +29,8 @@ Feel free to join us on Discord: https://discord.gg/9nPq85bP4p
- Nuki Smart Lock 3.0 Pro
- Nuki Smart Lock 4.0
- Nuki Smart Lock 4.0 Pro
+- Nuki Smart Lock Go
+- Nuki Smart Lock 5.0 Pro
- Nuki Smart Lock Ultra
- Nuki Opener
- Nuki Keypad 1.0
@@ -161,30 +163,35 @@ MQTT nodes like lock state and battery level should now reflect the reported val
This is not recommended (unless when using [hybrid mode](/HYBRID.md)) and will lead to excessive battery drain and can lead to either device missing updates.
Enable "Register as app" before pairing to allow this. Otherwise the Bridge will be unregistered when pairing the Nuki Hub.
-## Pairing with a Nuki Lock Ultra
+## Pairing with a Nuki Lock Ultra / Nuki Lock Go / Nuki Lock 5th gen Pro
Make sure "Bluetooth pairing" is enabled for the Nuki device by enabling this setting in the official Nuki App in "Settings" > "Features & Configuration" > "Button and LED".
-Before enabling pairing mode using the button on the Lock Ultra first setup Nuki Hub as follows:
-- Enable both "Nuki Smartlock enabled" and "Nuki Smartlock Ultra enabled" settings on the "Basic Nuki Configuration" page and Save. Setting the "Nuki Smartlock Ultra enabled" will change multiple other NukiHub settings.
-- Input your 6-digit Nuki Lock Ultra PIN on the "Credentials" page and Save
+Before enabling pairing mode using the button on the Nuki Lock Ultra / Nuki Lock Go / Nuki Lock 5th gen Pro first setup Nuki Hub as follows:
+- Enable both "Nuki Smartlock enabled" and "Nuki Smartlock Ultra/Go/5th gen enabled" settings on the "Basic Nuki Configuration" page and Save. Setting the "Nuki Smartlock Ultra/Go/5th gen enabled" will change multiple other NukiHub settings.
+- Input your 6-digit Nuki Lock Ultra/Go/5th gen PIN on the "Credentials" page and Save
- Press the button on the Nuki device for a few seconds until the LED ring lights up and remains lit.
-- It is **strongly** recommended(/mandatory) to setup and enable Hybrid mode over Thread/WiFi + official MQTT as Nuki Hub works best in Hybrid or Bridge mode and the Ultra does not support Bridge mode
+- It is **strongly** recommended(/mandatory) to setup and enable Hybrid mode over Thread/WiFi + official MQTT as Nuki Hub works best in Hybrid or Bridge mode and the Ultra/Go/5th gen Pro does not support Bridge mode
When pairing is successful, the web interface should show "Paired: Yes".
## Hybrid mode
-Hybrid mode allows you to use the official Nuki MQTT implemenation on a Nuki Lock 3.0 Pro, Nuki Lock 4.0, Nuki Lock 4.0 Pro or Nuki Lock Ultra in conjunction with Nuki Hub.
+Hybrid mode allows you to use the official Nuki MQTT implemenation on a Nuki Lock 3.0 Pro, Nuki Lock 4.0, Nuki Lock 4.0 Pro, Nuki Lock 5.0 Pro, Nuki Lock Go or Nuki Lock Ultra in conjunction with Nuki Hub.
See [hybrid mode](/HYBRID.md) for more information.
## Memory constraints
ESP32 devices have a limited amount of free RAM available.
-On version >=9.00 of Nuki Hub with only a Nuki Lock connected the expected free amount of RAM/Heap available is around:
-- ESP32: 60 kilobytes / 60.000 bytes
-- Other variants (C3/S3/C6/H2): 90-120 kilobytes / 90.000-120.000 bytes
+On version >=9.10 of Nuki Hub with only a Nuki Lock connected the expected free amount of RAM/Heap available is around:
+
+- ESP32: 40.000 bytes
+- ESP32 with PSRAM: 90.000 bytes + PSRAM
+- ESP32-C3: 45.000 bytes
+- ESP32-C6: 170.000 bytes
+- ESP32-S3 90.000 bytes
+- ESP32-S3 with PSRAM: 130.000 bytes + PSRAM
This free amount of RAM can be reduced (temporarily) by certain actions (such as changing Nuki device config) or continuously when enabling the following:
- Connecting both a Nuki opener and a Nuki lock to Nuki Hub
@@ -208,7 +215,7 @@ Webflash will automatically flash the no/Quad SPI PSRAM build when an ESP32-S3 i
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.
-Note that there are also is a separate build of Nuki Hub available for the GL-S10 ESP32 which is needed to enable PSRAM on this device (BETA).
+Note that there are also is a separate build of Nuki Hub available for the GL-S10 ESP32 which is needed to enable PSRAM on this device.
## Configuration
@@ -218,7 +225,7 @@ In a browser navigate to the IP address assigned to the ESP32.
#### Network Configuration
-- Host name: Set the hostname for the Nuki Hub ESP
+- 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.
- 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.
@@ -270,7 +277,7 @@ In a browser navigate to the IP address assigned to the ESP32.
#### Basic Nuki Configuration
- Nuki Smartlock enabled: Enable if you want Nuki Hub to connect to a Nuki Lock (1.0-4.0 and Ultra)
-- Nuki Smartlock Ultra enabled: Enable if you want Nuki Hub to connect to a Nuki Lock Ultra
+- Nuki Smartlock Ultra/Go/5th gen enabled: Enable if you want Nuki Hub to connect to a Nuki Lock Ultra/Go/5th gen Pro
- Nuki Opener enabled: Enable if you want Nuki Hub to connect to a Nuki Opener
- New Nuki Bluetooth connection mode (disable if there are connection issues): Enable to use the latest Nuki BLE connection mode (recommended). Disable if you have issues communicating with the lock/opener
@@ -345,7 +352,7 @@ Note: All of the following requires the Nuki security code / PIN to be set, see
#### Nuki Lock PIN / Nuki Opener PIN
- PIN Code: Fill with the Nuki Security Code of the Nuki Lock and/or Nuki Opener. Required for functions that require the security code to be sent to the lock/opener such as setting lock permissions/adding keypad codes, viewing the activity log or changing the Nuki device configuration. Set to "#" to remove the security code from the Nuki Hub configuration.
-- PIN Code Ultra: Fill with the 6-digit Nuki Security Code of the Nuki Lock Ultra. Required for pairing (and many other functions)
+- PIN Code Ultra/5th gen: Fill with the 6-digit Nuki Security Code of the Nuki Lock Ultra/Go/5th gen Pro. Required for pairing (and many other functions)
#### Unpair Nuki Lock / Unpair Nuki Opener
@@ -615,8 +622,8 @@ Changing settings has to enabled first in the configuration portal. Check the se
| autoLockEnabled | Whether auto lock is enabled. | 1 = enabled, 0 = disabled |`{ "autoLockEnabled": "1" }` |
| immediateAutoLockEnabled | Whether auto lock should be performed immediately after the door has been closed. | 1 = enabled, 0 = disabled |`{ "immediateAutoLockEnabled": "1" }`|
| autoUpdateEnabled | Whether automatic firmware updates should be enabled. | 1 = enabled, 0 = disabled |`{ "autoUpdateEnabled": "1" }` |
-| motorSpeed | The desired motor speed (Ultra only) | "Standard", "Insane", "Gentle" |`{ "motorSpeed": "Standard" }` |
-| enableSlowSpeedDuringNightMode | Whether the slow speed should be applied during Night Mode (Ultra only) | 1 = enabled, 0 = disabled |`{ "enableSlowSpeedDuringNightMode": "1" }` |
+| motorSpeed | The desired motor speed (Ultra/5th gen Pro only) | "Standard", "Insane", "Gentle" |`{ "motorSpeed": "Standard" }` |
+| enableSlowSpeedDuringNightMode | Whether the slow speed should be applied during Night Mode (Ultra/5th gen Pro only) | 1 = enabled, 0 = disabled |`{ "enableSlowSpeedDuringNightMode": "1" }` |
| rebootNuki | Reboot the Nuki device immediately | 1 = reboot nuki |`{ "rebootNuki": "1" }` |
### Nuki Opener Configuration
@@ -695,13 +702,15 @@ When you are on the right application you can upload the new binary by clicking
After about a minute the new firmware should be installed afterwhich the ESP will reboot automatically to the updated binary.
Selecting the wrong binary will lead to an unsuccessfull update
- Note for users upgrading from Nuki Hub 8.35 or lower:
-Updating to version 9.00 requires a change to the partition table of the ESP32.
-Please follow the instructions for the [First time installation](#first-time-installation) one time when updating to Nuki Hub 9.00 from an earlier version.
+ Note for users upgrading from Nuki Hub 9.09 or lower:
+Updating to version 9.10 requires a change to the partition table of the ESP32.
+Please follow the instructions for the [First time installation](#first-time-installation) one time when updating to Nuki Hub 9.10 from an earlier version.
## MQTT Encryption (optional)
The communication via MQTT can be SSL encrypted.
+Note: MQTT SSL requires a significant amount of RAM and will not work in most cases on low RAM devices (ESP32 without PSRAM or ESP32-C3)
+
To enable SSL encryption, supply the necessary information in the MQTT Configuration page.
The following configurations are supported:
diff --git a/partitions.csv b/partitions.csv
index 1b64460..2e3123f 100644
--- a/partitions.csv
+++ b/partitions.csv
@@ -1 +1 @@
-# Espressif ESP32 Partition Table
# Name, Type, SubType, Offset, Size, Flags
nvs, data, nvs, 0x9000, 0x5000,
otadata, data, ota, 0xe000, 0x2000,
app0, app, ota_0, 0x10000, 0x270000,
app1, app, ota_1, 0x280000, 0x130000,
spiffs, data, spiffs, 0x3B0000, 0x40000,
coredump, data, coredump,0x3F0000, 0x10000,
\ No newline at end of file
+# Espressif ESP32 Partition Table
# Name, Type, SubType, Offset, Size, Flags
nvs, data, nvs, 0x9000, 0x5000,
otadata, data, ota, 0xe000, 0x2000,
app0, app, ota_0, 0x10000, 0x260000,
app1, app, ota_1, 0x270000, 0x140000,
spiffs, data, spiffs, 0x3B0000, 0x40000,
coredump, data, coredump,0x3F0000, 0x10000,
\ No newline at end of file
diff --git a/pio_package_post.py b/pio_package_post.py
index 60fc392..a4e333a 100644
--- a/pio_package_post.py
+++ b/pio_package_post.py
@@ -58,7 +58,7 @@ def merge_bin(source, target, env):
flash_args.append(position)
flash_args.append(bin_file)
- flash_args.append("0x2B0000")
+ flash_args.append("0x270000")
flash_args.append(f"{target_dir}/nuki_hub_updater_{board}.bin")
cmd = f"esptool.py --chip {chip} merge_bin -o {target_file} --flash_mode dio --flash_freq keep --flash_size keep " + " ".join(flash_args)
diff --git a/platformio.ini b/platformio.ini
index 0b7fa51..6ea5182 100644
--- a/platformio.ini
+++ b/platformio.ini
@@ -13,7 +13,7 @@ default_envs = esp32
boards_dir = boards
[env]
-platform = https://github.com/pioarduino/platform-espressif32/releases/download/53.03.13/platform-espressif32.zip
+platform = https://github.com/pioarduino/platform-espressif32/releases/download/54.03.20/platform-espressif32.zip
platform_packages =
framework = arduino, espidf
board_build.embed_txtfiles =
@@ -44,6 +44,13 @@ build_flags =
-DNUKI_MUTEX_RECURSIVE
-DNUKI_64BIT_TIME
-DETH_SPI_SUPPORTS_NO_IRQ
+ -DEMC_RX_BUFFER_SIZE=1440
+ -DEMC_TX_BUFFER_SIZE=1440
+ -DEMC_MIN_FREE_MEMORY=8192
+ -DEMC_TASK_STACK_SIZE=10240
+ -DEMC_USE_MEMPOOL=1
+ -DEMC_NUM_POOL_ELEMENTS=64
+ -DEMC_SIZE_POOL_ELEMENTS=256
-Wno-ignored-qualifiers
-Wno-missing-field-initializers
-Wno-type-limits
diff --git a/resources/how-to-flash.txt b/resources/how-to-flash.txt
index 4e9fe8d..1775b88 100644
--- a/resources/how-to-flash.txt
+++ b/resources/how-to-flash.txt
@@ -99,34 +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 0x280000 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 bootloader.bin 0x10000 nuki_hub_esp32.bin 0x270000 nuki_hub_updater_esp32.bin 0x8000 nuki_hub.partitions.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 0x280000 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 bootloader.bin 0x10000 nuki_hub_esp32.bin 0x270000 nuki_hub_updater_esp32.bin 0x8000 nuki_hub.partitions.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 0x280000 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 bootloader.bin 0x10000 nuki_hub_esp32s3.bin 0x270000 nuki_hub_updater_esp32s3.bin 0x8000 nuki_hub.partitions.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 0x280000 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 bootloader.bin 0x10000 nuki_hub_esp32s3oct.bin 0x270000 nuki_hub_updater_esp32s3oct.bin 0x8000 nuki_hub.partitions.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 0x280000 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 bootloader.bin 0x10000 nuki_hub_esp32c3.bin 0x270000 nuki_hub_updater_esp32c3.bin 0x8000 nuki_hub.partitions.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 0x280000 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 bootloader.bin 0x10000 nuki_hub_esp32c6.bin 0x270000 nuki_hub_updater_esp32c6.bin 0x8000 nuki_hub.partitions.bin
## ESP32-H2
-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_esp32h2.bin 0x280000 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 bootloader.bin 0x10000 nuki_hub_esp32h2.bin 0x270000 nuki_hub_updater_esp32h2.bin 0x8000 nuki_hub.partitions.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
## 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 0x280000 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 bootloader.bin 0x10000 nuki_hub_esp32-solo1.bin 0x270000 nuki_hub_updater_esp32-solo1.bin 0x8000 nuki_hub.partitions.bin
Adjust the serial device and path to the binaries if necessary.
\ No newline at end of file
diff --git a/resources/root_ca.pem b/resources/root_ca.pem
index 95629e4..52b3cd7 100644
--- a/resources/root_ca.pem
+++ b/resources/root_ca.pem
@@ -40,6 +40,38 @@ pLiaWN0bfVKfjllDiIGknibVb63dDcY3fe0Dkhvld1927jyNxF1WW6LZZm6zNTfl
MrY=
-----END CERTIFICATE-----
+USERTrust RSA Certification Authority
+=====================================
+-----BEGIN CERTIFICATE-----
+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
+Q+6IHdfGjjxDah2nGN59PRbxYvnKkKj9
+-----END CERTIFICATE-----
+
DigiCert High Assurance EV Root CA
==================================
-----BEGIN CERTIFICATE-----
diff --git a/sdkconfig.defaults b/sdkconfig.defaults
index 752e1e1..2cb66bd 100644
--- a/sdkconfig.defaults
+++ b/sdkconfig.defaults
@@ -40,10 +40,14 @@ CONFIG_FREERTOS_WATCHPOINT_END_OF_STACK=y
CONFIG_MBEDTLS_PSK_MODES=y
CONFIG_MBEDTLS_KEY_EXCHANGE_PSK=y
CONFIG_MBEDTLS_CERTIFICATE_BUNDLE=y
-CONFIG_MBEDTLS_CERTIFICATE_BUNDLE_DEFAULT_NONE=y
-CONFIG_MBEDTLS_CUSTOM_CERTIFICATE_BUNDLE=y
-CONFIG_MBEDTLS_CUSTOM_CERTIFICATE_BUNDLE_PATH="resources/root_ca.pem"
+CONFIG_MBEDTLS_CERTIFICATE_BUNDLE_DEFAULT_FULL=y
+#CONFIG_MBEDTLS_CERTIFICATE_BUNDLE_DEFAULT_CMN=y
+#CONFIG_MBEDTLS_CERTIFICATE_BUNDLE_DEFAULT_NONE=y
+#CONFIG_MBEDTLS_CUSTOM_CERTIFICATE_BUNDLE=y
+#CONFIG_MBEDTLS_CUSTOM_CERTIFICATE_BUNDLE_PATH="resources/root_ca.pem"
CONFIG_MBEDTLS_DYNAMIC_BUFFER=y
+CONFIG_MBEDTLS_DYNAMIC_FREE_PEER_CERT=y
+CONFIG_MBEDTLS_DYNAMIC_FREE_CONFIG_DATA=y
# RTC WDT
CONFIG_BOOTLOADER_WDT_DISABLE_IN_USER_CODE=y
diff --git a/src/Config.h b/src/Config.h
index bdc85df..e8c976a 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-03-03"
+#define NUKI_HUB_DATE "2025-04-01"
#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"
diff --git a/src/NukiNetwork.cpp b/src/NukiNetwork.cpp
index 8684d4a..acb5aa4 100644
--- a/src/NukiNetwork.cpp
+++ b/src/NukiNetwork.cpp
@@ -11,6 +11,7 @@
#endif
#include "networkDevices/EthernetDevice.h"
#include "hal/wdt_hal.h"
+#include "esp_mac.h"
NukiNetwork* NukiNetwork::_inst = nullptr;
@@ -216,9 +217,15 @@ void NukiNetwork::initialize()
{
_hostname = _preferences->getString(preference_hostname, "");
- if(_hostname == "")
+ if(_hostname == "" || _hostname == "nukihub")
{
- _hostname = "nukihub";
+ char _nukiHubUidString[20];
+ uint8_t mac[8];
+ esp_efuse_mac_get_default(mac);
+ uint64_t curDevId;
+ memcpy(&curDevId, &mac, 8);
+ sprintf(_nukiHubUidString, "%" PRIu64, curDevId);
+ _hostname = (String)"NH" + _nukiHubUidString;
_preferences->putString(preference_hostname, _hostname);
}
@@ -258,9 +265,15 @@ void NukiNetwork::initialize()
_hostname = _preferences->getString(preference_hostname, "");
- if(_hostname == "")
+ if(_hostname == "" || _hostname == "nukihub")
{
- _hostname = "nukihub";
+ char _nukiHubUidString[20];
+ uint8_t mac[8];
+ esp_efuse_mac_get_default(mac);
+ uint64_t curDevId;
+ memcpy(&curDevId, &mac, 8);
+ sprintf(_nukiHubUidString, "%" PRIu64, curDevId);
+ _hostname = (String)"NH" + _nukiHubUidString;
_preferences->putString(preference_hostname, _hostname);
}
@@ -429,7 +442,7 @@ bool NukiNetwork::update()
_firstDisconnected = true;
}
- if(!_device->mqttConnected() && _device->isConnected())
+ if(!_logIp && _device->isConnected() && !_device->mqttConnected() )
{
bool success = reconnect();
if(!success)
@@ -453,7 +466,7 @@ bool NukiNetwork::update()
delay(2000);
}
- if(!_device->mqttConnected() || !_device->isConnected())
+ if(!_device->isConnected() || !_device->mqttConnected() )
{
if(_networkTimeout > 0 && (ts - _lastConnectedTs > _networkTimeout * 1000) && ts > 60000)
{
diff --git a/src/WebCfgServer.cpp b/src/WebCfgServer.cpp
index 5d3d0bb..576f032 100644
--- a/src/WebCfgServer.cpp
+++ b/src/WebCfgServer.cpp
@@ -1601,18 +1601,18 @@ esp_err_t WebCfgServer::buildOtaHtml(PsychicRequest *request, PsychicResponse* r
#else
String build_type = "debug";
#endif
- response.print("