7
.github/workflows/beta.yml
vendored
7
.github/workflows/beta.yml
vendored
@@ -12,7 +12,7 @@ jobs:
|
|||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
board: [esp32, esp32-s3, esp32-c3, esp32-c6, esp32-h2, esp32-solo1]
|
board: [esp32, esp32-s3, esp32-s3-oct, esp32-c3, esp32-c6, esp32-h2, esp32-solo1]
|
||||||
build: [release, debug]
|
build: [release, debug]
|
||||||
env:
|
env:
|
||||||
BOARD: ${{ matrix.board }}
|
BOARD: ${{ matrix.board }}
|
||||||
@@ -62,11 +62,6 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
BOARD=`echo $BOARD | tr '[:lower:]' '[:upper:]'`
|
BOARD=`echo $BOARD | tr '[:lower:]' '[:upper:]'`
|
||||||
|
|
||||||
# fix for docs
|
|
||||||
if [ "$BOARD" = "ESP32DEV" ]; then
|
|
||||||
BOARD="ESP32"
|
|
||||||
fi
|
|
||||||
|
|
||||||
# look for documentation on flash and copy the command
|
# look for documentation on flash and copy the command
|
||||||
command=`sed -n '/^Howto flash (esptool)$/,$p' ${DOC} | sed -n '/^## '"${BOARD}"'$/,\${ n; n; p; }' | head -n1`
|
command=`sed -n '/^Howto flash (esptool)$/,$p' ${DOC} | sed -n '/^## '"${BOARD}"'$/,\${ n; n; p; }' | head -n1`
|
||||||
|
|
||||||
|
|||||||
7
.github/workflows/build.yml
vendored
7
.github/workflows/build.yml
vendored
@@ -18,7 +18,7 @@ jobs:
|
|||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
board: [esp32, esp32-s3, esp32-c3, esp32-c6, esp32-h2, esp32-solo1]
|
board: [esp32, esp32-s3, esp32-s3-oct, esp32-c3, esp32-c6, esp32-h2, esp32-solo1]
|
||||||
build: [release, debug]
|
build: [release, debug]
|
||||||
env:
|
env:
|
||||||
BOARD: ${{ matrix.board }}
|
BOARD: ${{ matrix.board }}
|
||||||
@@ -67,11 +67,6 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
BOARD=`echo $BOARD | tr '[:lower:]' '[:upper:]'`
|
BOARD=`echo $BOARD | tr '[:lower:]' '[:upper:]'`
|
||||||
|
|
||||||
# fix for docs
|
|
||||||
if [ "$BOARD" = "ESP32DEV" ]; then
|
|
||||||
BOARD="ESP32"
|
|
||||||
fi
|
|
||||||
|
|
||||||
# look for documentation on flash and copy the command
|
# look for documentation on flash and copy the command
|
||||||
command=`sed -n '/^Howto flash (esptool)$/,$p' ${DOC} | sed -n '/^## '"${BOARD}"'$/,\${ n; n; p; }' | head -n1`
|
command=`sed -n '/^Howto flash (esptool)$/,$p' ${DOC} | sed -n '/^## '"${BOARD}"'$/,\${ n; n; p; }' | head -n1`
|
||||||
|
|
||||||
|
|||||||
7
.github/workflows/nightly.yml
vendored
7
.github/workflows/nightly.yml
vendored
@@ -34,7 +34,7 @@ jobs:
|
|||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
board: [esp32, esp32-s3, esp32-c3, esp32-c6, esp32-h2, esp32-solo1]
|
board: [esp32, esp32-s3, esp32-s3-oct, esp32-c3, esp32-c6, esp32-h2, esp32-solo1]
|
||||||
build: [release, debug]
|
build: [release, debug]
|
||||||
env:
|
env:
|
||||||
BOARD: ${{ matrix.board }}
|
BOARD: ${{ matrix.board }}
|
||||||
@@ -84,11 +84,6 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
BOARD=`echo $BOARD | tr '[:lower:]' '[:upper:]'`
|
BOARD=`echo $BOARD | tr '[:lower:]' '[:upper:]'`
|
||||||
|
|
||||||
# fix for docs
|
|
||||||
if [ "$BOARD" = "ESP32DEV" ]; then
|
|
||||||
BOARD="ESP32"
|
|
||||||
fi
|
|
||||||
|
|
||||||
# look for documentation on flash and copy the command
|
# look for documentation on flash and copy the command
|
||||||
command=`sed -n '/^Howto flash (esptool)$/,$p' ${DOC} | sed -n '/^## '"${BOARD}"'$/,\${ n; n; p; }' | head -n1`
|
command=`sed -n '/^Howto flash (esptool)$/,$p' ${DOC} | sed -n '/^## '"${BOARD}"'$/,\${ n; n; p; }' | head -n1`
|
||||||
|
|
||||||
|
|||||||
7
.github/workflows/release.yml
vendored
7
.github/workflows/release.yml
vendored
@@ -12,7 +12,7 @@ jobs:
|
|||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
board: [esp32, esp32-s3, esp32-c3, esp32-c6, esp32-h2, esp32-solo1]
|
board: [esp32, esp32-s3, esp32-s3-oct, esp32-c3, esp32-c6, esp32-h2, esp32-solo1]
|
||||||
build: [release, debug]
|
build: [release, debug]
|
||||||
env:
|
env:
|
||||||
BOARD: ${{ matrix.board }}
|
BOARD: ${{ matrix.board }}
|
||||||
@@ -61,11 +61,6 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
BOARD=`echo $BOARD | tr '[:lower:]' '[:upper:]'`
|
BOARD=`echo $BOARD | tr '[:lower:]' '[:upper:]'`
|
||||||
|
|
||||||
# fix for docs
|
|
||||||
if [ "$BOARD" = "ESP32DEV" ]; then
|
|
||||||
BOARD="ESP32"
|
|
||||||
fi
|
|
||||||
|
|
||||||
# look for documentation on flash and copy the command
|
# look for documentation on flash and copy the command
|
||||||
command=`sed -n '/^Howto flash (esptool)$/,$p' ${DOC} | sed -n '/^## '"${BOARD}"'$/,\${ n; n; p; }' | head -n1`
|
command=`sed -n '/^Howto flash (esptool)$/,$p' ${DOC} | sed -n '/^## '"${BOARD}"'$/,\${ n; n; p; }' | head -n1`
|
||||||
|
|
||||||
|
|||||||
45
README.md
45
README.md
@@ -47,6 +47,23 @@ As an alternative to Wi-Fi (which is available on any supported ESP32), the foll
|
|||||||
In principle all ESP32 (and variants) devices with built-in ethernet port are supported, but might require additional setup using the "Custom LAN setup" option.
|
In principle all ESP32 (and variants) devices with built-in ethernet port are supported, but might require additional setup using the "Custom LAN setup" option.
|
||||||
See the "[Connecting via Ethernet](#connecting-via-ethernet-optional)" section for more information.
|
See the "[Connecting via Ethernet](#connecting-via-ethernet-optional)" section for more information.
|
||||||
|
|
||||||
|
## Recommended ESP32 devices
|
||||||
|
|
||||||
|
- If WIFI6 is required: ESP32-C6
|
||||||
|
- If PoE is required: Any of the above mentioned devices with PoE or any other ESP device in combination with a SPI Ethernet module ([W5500](https://www.aliexpress.com/w/wholesale-w5500.html)) and [PoE to Ethernet and USB type B/C splitter](https://aliexpress.com/w/wholesale-poe-splitter-usb-c.html)
|
||||||
|
- If you want maximum performance and intend to run any or multiple of the following:
|
||||||
|
- a Nuki Lock and Nuki Opener and/or
|
||||||
|
- MQTT SSL and/or
|
||||||
|
- HTTP SSL and/or
|
||||||
|
- large amounts of keypad codes, timecontrol or authorization entries
|
||||||
|
- Developing/debugging Nuki devices and/or Nuki Hub
|
||||||
|
|
||||||
|
An ESP32-S3 with 2MB of PSRAM or more (look for an ESP32-S3 with the designation N>=4 and R>=2 such as an ESP32-S3 N16R8)
|
||||||
|
|
||||||
|
- In general when buying a new device when size and a couple of dollars more or less are not an issue: An ESP32-S3 with 2MB of PSRAM or more.<br>
|
||||||
|
|
||||||
|
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 the ability to connect over WIFI6 (C6)
|
||||||
|
|
||||||
## Support Nuki Hub development
|
## Support Nuki Hub development
|
||||||
|
|
||||||
If you haven't ordered your Nuki product yet, you can support me by using my referrer code when placing your order:<br>
|
If you haven't ordered your Nuki product yet, you can support me by using my referrer code when placing your order:<br>
|
||||||
@@ -97,6 +114,34 @@ Enable "Register as app" before pairing to allow this. Otherwise the Bridge will
|
|||||||
Hybrid mode allows you to use the official Nuki MQTT implemenation on a Nuki Lock 3.0 Pro, Nuki Lock 4.0 or Nuki Lock 4.0 Pro in conjunction with Nuki Hub.<br>
|
Hybrid mode allows you to use the official Nuki MQTT implemenation on a Nuki Lock 3.0 Pro, Nuki Lock 4.0 or Nuki Lock 4.0 Pro in conjunction with Nuki Hub.<br>
|
||||||
See [hybrid mode](/HYBRID.md) for more information.
|
See [hybrid mode](/HYBRID.md) for more information.
|
||||||
|
|
||||||
|
## Memory constraints
|
||||||
|
|
||||||
|
ESP32 devices have a limited amount of free RAM available.<br>
|
||||||
|
<br>
|
||||||
|
On version 9.01 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
|
||||||
|
|
||||||
|
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
|
||||||
|
- Enlarging stack sizes of the Nuki and Network task to accommodate large amounts of keypad codes, authorization entries or timecontrol entries
|
||||||
|
- MQTT SSL (Costs about 30k RAM)
|
||||||
|
- HTTP SSL (Costs about 30k RAM)
|
||||||
|
- Developing/debugging Nuki devices and/or Nuki Hub, using WebSerial (Costs about 30k RAM)
|
||||||
|
|
||||||
|
The currently available RAM/Heap can be found on the info page of the Web configurator of Nuki Hub.<br>
|
||||||
|
<br>
|
||||||
|
When the ESP32 runs out of available RAM this device can crash or otherwise unexpected behaviour can occur.<br>
|
||||||
|
<br>
|
||||||
|
Nuki Hub does allow for the use of embedded PSRAM on the regular binaries whenever it is available.<br>
|
||||||
|
PSRAM is usually 2, 4 or 8MB in size and thus greatly enlarges the 320kb of internal RAM that is available.<br>
|
||||||
|
It is basically impossible to run out of RAM when PSRAM is available.
|
||||||
|
You can check on the info page of the Web configurator if PSRAM is available.
|
||||||
|
|
||||||
|
Note that there are two build of Nuki Hub for the ESP32-S3 available.<br>
|
||||||
|
One for devices with no or Quad SPI PSRAM and one for devices with Octal SPI PSRAM.<br>
|
||||||
|
If your ESP32-S3 device has PSRAM but it is not detected please flash the other S3 binary.
|
||||||
|
|
||||||
## Configuration
|
## Configuration
|
||||||
|
|
||||||
In a browser navigate to the IP address assigned to the ESP32.
|
In a browser navigate to the IP address assigned to the ESP32.
|
||||||
|
|||||||
50
boards/nuki-esp32-s3-oct.json
Normal file
50
boards/nuki-esp32-s3-oct.json
Normal file
@@ -0,0 +1,50 @@
|
|||||||
|
{
|
||||||
|
"build": {
|
||||||
|
"arduino":{
|
||||||
|
"ldscript": "esp32s3_out.ld"
|
||||||
|
},
|
||||||
|
"core": "esp32",
|
||||||
|
"extra_flags": [
|
||||||
|
"-DARDUINO_ESP32S3_DEV",
|
||||||
|
"-DARDUINO_USB_MODE=1",
|
||||||
|
"-DARDUINO_RUNNING_CORE=1",
|
||||||
|
"-DARDUINO_EVENT_RUNNING_CORE=1"
|
||||||
|
],
|
||||||
|
"f_cpu": "240000000L",
|
||||||
|
"f_flash": "80000000L",
|
||||||
|
"flash_mode": "qio",
|
||||||
|
"hwids": [
|
||||||
|
[
|
||||||
|
"0x303A",
|
||||||
|
"0x1001"
|
||||||
|
]
|
||||||
|
],
|
||||||
|
"mcu": "esp32s3",
|
||||||
|
"variant": "esp32s3"
|
||||||
|
},
|
||||||
|
"connectivity": [
|
||||||
|
"bluetooth",
|
||||||
|
"wifi"
|
||||||
|
],
|
||||||
|
"debug": {
|
||||||
|
"default_tool": "esp-builtin",
|
||||||
|
"onboard_tools": [
|
||||||
|
"esp-builtin"
|
||||||
|
],
|
||||||
|
"openocd_target": "esp32s3.cfg"
|
||||||
|
},
|
||||||
|
"frameworks": [
|
||||||
|
"arduino",
|
||||||
|
"espidf"
|
||||||
|
],
|
||||||
|
"name": "ESP32-S3 (>=4 MB QD, OCTAL PSRAM)",
|
||||||
|
"upload": {
|
||||||
|
"flash_size": "4MB",
|
||||||
|
"maximum_ram_size": 327680,
|
||||||
|
"maximum_size": 4194304,
|
||||||
|
"require_upload_port": true,
|
||||||
|
"speed": 460800
|
||||||
|
},
|
||||||
|
"url": "https://docs.espressif.com/projects/esp-idf/en/latest/esp32s3/hw-reference/esp32s3/user-guide-devkitc-1.html",
|
||||||
|
"vendor": "Espressif"
|
||||||
|
}
|
||||||
@@ -37,7 +37,7 @@
|
|||||||
"arduino",
|
"arduino",
|
||||||
"espidf"
|
"espidf"
|
||||||
],
|
],
|
||||||
"name": "ESP32-S3 (4 MB QD, No PSRAM)",
|
"name": "ESP32-S3 (>=4 MB QD, QUAD OR NO PSRAM)",
|
||||||
"upload": {
|
"upload": {
|
||||||
"flash_size": "4MB",
|
"flash_size": "4MB",
|
||||||
"maximum_ram_size": 327680,
|
"maximum_ram_size": 327680,
|
||||||
|
|||||||
@@ -9,6 +9,8 @@ def get_board_name(env):
|
|||||||
|
|
||||||
if env.get('BOARD') == 'esp32-solo1':
|
if env.get('BOARD') == 'esp32-solo1':
|
||||||
board = env.get('BOARD').replace('-', '')
|
board = env.get('BOARD').replace('-', '')
|
||||||
|
elif env.get('BOARD') == 'nuki-esp32-s3-oct':
|
||||||
|
board = 'esp32s3oct'
|
||||||
return board
|
return board
|
||||||
|
|
||||||
def create_target_dir(env):
|
def create_target_dir(env):
|
||||||
|
|||||||
@@ -73,7 +73,7 @@ monitor_filters =
|
|||||||
[env:esp32]
|
[env:esp32]
|
||||||
board = esp32dev
|
board = esp32dev
|
||||||
board_build.cmake_extra_args =
|
board_build.cmake_extra_args =
|
||||||
-DSDKCONFIG_DEFAULTS="sdkconfig.defaults;sdkconfig.release.defaults"
|
-DSDKCONFIG_DEFAULTS="sdkconfig.defaults;sdkconfig.release.defaults;sdkconfig.defaults.esp32"
|
||||||
extra_scripts =
|
extra_scripts =
|
||||||
pre:pio_package_pre.py
|
pre:pio_package_pre.py
|
||||||
post:pio_package_post.py
|
post:pio_package_post.py
|
||||||
@@ -89,21 +89,33 @@ build_flags =
|
|||||||
[env:esp32-c3]
|
[env:esp32-c3]
|
||||||
extends = env:esp32
|
extends = env:esp32
|
||||||
board = esp32-c3-devkitc-02
|
board = esp32-c3-devkitc-02
|
||||||
|
board_build.cmake_extra_args =
|
||||||
|
-DSDKCONFIG_DEFAULTS="sdkconfig.defaults;sdkconfig.release.defaults"
|
||||||
|
|
||||||
[env:esp32-s3]
|
[env:esp32-s3]
|
||||||
extends = env:esp32
|
extends = env:esp32
|
||||||
board = nuki-esp32-s3
|
board = nuki-esp32-s3
|
||||||
|
board_build.cmake_extra_args =
|
||||||
|
-DSDKCONFIG_DEFAULTS="sdkconfig.defaults;sdkconfig.release.defaults;sdkconfig.defaults.esp32-s3"
|
||||||
|
|
||||||
|
[env:esp32-s3-oct]
|
||||||
|
extends = env:esp32
|
||||||
|
board = nuki-esp32-s3-oct
|
||||||
|
board_build.cmake_extra_args =
|
||||||
|
-DSDKCONFIG_DEFAULTS="sdkconfig.defaults;sdkconfig.release.defaults;sdkconfig.defaults.esp32-s3-oct"
|
||||||
|
|
||||||
[env:esp32-c6]
|
[env:esp32-c6]
|
||||||
extends = env:esp32
|
extends = env:esp32
|
||||||
board = esp32-c6-devkitm-1
|
board = esp32-c6-devkitm-1
|
||||||
|
board_build.cmake_extra_args =
|
||||||
|
-DSDKCONFIG_DEFAULTS="sdkconfig.defaults;sdkconfig.release.defaults"
|
||||||
|
|
||||||
[env:esp32-h2]
|
[env:esp32-h2]
|
||||||
extends = env:esp32
|
extends = env:esp32
|
||||||
board = esp32-h2-devkitm-1
|
board = esp32-h2-devkitm-1
|
||||||
board_build.cmake_extra_args =
|
board_build.cmake_extra_args =
|
||||||
-DNUKI_TARGET_H2=y
|
-DNUKI_TARGET_H2=y
|
||||||
-DSDKCONFIG_DEFAULTS="sdkconfig.defaults;sdkconfig.debug.defaults"
|
-DSDKCONFIG_DEFAULTS="sdkconfig.defaults;sdkconfig.release.defaults"
|
||||||
lib_ignore =
|
lib_ignore =
|
||||||
BLE
|
BLE
|
||||||
BluetoothSerial
|
BluetoothSerial
|
||||||
@@ -124,7 +136,7 @@ board_build.cmake_extra_args =
|
|||||||
extends = env:esp32
|
extends = env:esp32
|
||||||
custom_build = debug
|
custom_build = debug
|
||||||
board_build.cmake_extra_args =
|
board_build.cmake_extra_args =
|
||||||
-DSDKCONFIG_DEFAULTS="sdkconfig.defaults;sdkconfig.debug.defaults"
|
-DSDKCONFIG_DEFAULTS="sdkconfig.defaults;sdkconfig.debug.defaults;sdkconfig.defaults.esp32"
|
||||||
build_flags =
|
build_flags =
|
||||||
${env.build_flags}
|
${env.build_flags}
|
||||||
-DCORE_DEBUG_LEVEL=ARDUHAL_LOG_LEVEL_DEBUG
|
-DCORE_DEBUG_LEVEL=ARDUHAL_LOG_LEVEL_DEBUG
|
||||||
@@ -209,7 +221,28 @@ build_flags =
|
|||||||
extends = env:esp32-s3
|
extends = env:esp32-s3
|
||||||
custom_build = debug
|
custom_build = debug
|
||||||
board_build.cmake_extra_args =
|
board_build.cmake_extra_args =
|
||||||
-DSDKCONFIG_DEFAULTS="sdkconfig.defaults;sdkconfig.debug.defaults"
|
-DSDKCONFIG_DEFAULTS="sdkconfig.defaults;sdkconfig.debug.defaults;sdkconfig.defaults.esp32-s3"
|
||||||
|
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
|
||||||
|
-DDEBUG_SENSE_NUKI
|
||||||
|
-DDEBUG_NUKI_COMMAND
|
||||||
|
-DDEBUG_NUKI_CONNECT
|
||||||
|
-DDEBUG_NUKI_COMMUNICATION
|
||||||
|
;-DDEBUG_NUKI_HEX_DATA
|
||||||
|
-DDEBUG_NUKI_READABLE_DATA
|
||||||
|
-DCONFIG_ASYNC_TCP_QUEUE_SIZE=128
|
||||||
|
-DCONFIG_ASYNC_TCP_STACK_SIZE=8192
|
||||||
|
-DWS_MAX_QUEUED_MESSAGES=512
|
||||||
|
|
||||||
|
[env:esp32-s3-oct_dbg]
|
||||||
|
extends = env:esp32-s3-oct
|
||||||
|
custom_build = debug
|
||||||
|
board_build.cmake_extra_args =
|
||||||
|
-DSDKCONFIG_DEFAULTS="sdkconfig.defaults;sdkconfig.debug.defaults;sdkconfig.defaults.esp32-s3-oct"
|
||||||
build_flags =
|
build_flags =
|
||||||
${env.build_flags}
|
${env.build_flags}
|
||||||
-DCORE_DEBUG_LEVEL=ARDUHAL_LOG_LEVEL_DEBUG
|
-DCORE_DEBUG_LEVEL=ARDUHAL_LOG_LEVEL_DEBUG
|
||||||
|
|||||||
@@ -36,6 +36,13 @@ e000 boot_app0.bin
|
|||||||
10000 nuki_hub_esp32s3.bin
|
10000 nuki_hub_esp32s3.bin
|
||||||
280000 nuki_hub_updater_esp32s3.bin
|
280000 nuki_hub_updater_esp32s3.bin
|
||||||
|
|
||||||
|
ESP32-S3-OCT
|
||||||
|
e000 boot_app0.bin
|
||||||
|
0 bootloader.bin
|
||||||
|
8000 nuki_hub.partitions.bin
|
||||||
|
10000 nuki_hub_esp32s3oct.bin
|
||||||
|
280000 nuki_hub_updater_esp32s3oct.bin
|
||||||
|
|
||||||
ESP32-C3
|
ESP32-C3
|
||||||
e000 boot_app0.bin
|
e000 boot_app0.bin
|
||||||
0 bootloader.bin
|
0 bootloader.bin
|
||||||
@@ -84,6 +91,10 @@ esptool.py --chip esp32 --port /dev/ttyUSB0 --baud 921600 --before default_reset
|
|||||||
|
|
||||||
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 0x280000 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
|
||||||
|
|
||||||
## ESP32-C3
|
## 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 0x280000 nuki_hub_updater_esp32c3.bin 0x8000 nuki_hub.partitions.bin
|
||||||
|
|||||||
@@ -2,4 +2,6 @@ CONFIG_LOG_DEFAULT_LEVEL_DEBUG=y
|
|||||||
CONFIG_LOG_DEFAULT_LEVEL=4
|
CONFIG_LOG_DEFAULT_LEVEL=4
|
||||||
CONFIG_ESP_IPC_TASK_STACK_SIZE=8192
|
CONFIG_ESP_IPC_TASK_STACK_SIZE=8192
|
||||||
CONFIG_BOOTLOADER_LOG_LEVEL_ERROR=y
|
CONFIG_BOOTLOADER_LOG_LEVEL_ERROR=y
|
||||||
CONFIG_BOOTLOADER_LOG_LEVEL=1
|
CONFIG_BOOTLOADER_LOG_LEVEL=1
|
||||||
|
CONFIG_FREERTOS_USE_TRACE_FACILITY=y
|
||||||
|
CONFIG_FREERTOS_USE_STATS_FORMATTING_FUNCTIONS=y
|
||||||
6
sdkconfig.defaults.esp32
Normal file
6
sdkconfig.defaults.esp32
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
CONFIG_SPIRAM=y
|
||||||
|
CONFIG_SPIRAM_IGNORE_NOTFOUND=y
|
||||||
|
CONFIG_MBEDTLS_DEFAULT_MEM_ALLOC=y
|
||||||
|
CONFIG_BT_NIMBLE_MEM_ALLOC_MODE_DEFAULT=y
|
||||||
|
CONFIG_SPIRAM_MALLOC_ALWAYSINTERNAL=4096
|
||||||
|
CONFIG_SPIRAM_MALLOC_RESERVE_INTERNAL=50768
|
||||||
6
sdkconfig.defaults.esp32-s3
Normal file
6
sdkconfig.defaults.esp32-s3
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
CONFIG_SPIRAM=y
|
||||||
|
CONFIG_SPIRAM_IGNORE_NOTFOUND=y
|
||||||
|
CONFIG_MBEDTLS_DEFAULT_MEM_ALLOC=y
|
||||||
|
CONFIG_BT_NIMBLE_MEM_ALLOC_MODE_DEFAULT=y
|
||||||
|
CONFIG_SPIRAM_MALLOC_ALWAYSINTERNAL=4096
|
||||||
|
CONFIG_SPIRAM_MALLOC_RESERVE_INTERNAL=50768
|
||||||
7
sdkconfig.defaults.esp32-s3-oct
Normal file
7
sdkconfig.defaults.esp32-s3-oct
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
CONFIG_SPIRAM=y
|
||||||
|
CONFIG_SPIRAM_IGNORE_NOTFOUND=y
|
||||||
|
CONFIG_MBEDTLS_DEFAULT_MEM_ALLOC=y
|
||||||
|
CONFIG_BT_NIMBLE_MEM_ALLOC_MODE_DEFAULT=y
|
||||||
|
CONFIG_SPIRAM_MALLOC_ALWAYSINTERNAL=4096
|
||||||
|
CONFIG_SPIRAM_MALLOC_RESERVE_INTERNAL=50768
|
||||||
|
CONFIG_SPIRAM_MODE_OCT=y
|
||||||
@@ -1 +1,7 @@
|
|||||||
CONFIG_FREERTOS_UNICORE=y
|
CONFIG_FREERTOS_UNICORE=y
|
||||||
|
CONFIG_SPIRAM=y
|
||||||
|
CONFIG_SPIRAM_IGNORE_NOTFOUND=y
|
||||||
|
CONFIG_MBEDTLS_DEFAULT_MEM_ALLOC=y
|
||||||
|
CONFIG_BT_NIMBLE_MEM_ALLOC_MODE_DEFAULT=y
|
||||||
|
CONFIG_SPIRAM_MALLOC_ALWAYSINTERNAL=4096
|
||||||
|
CONFIG_SPIRAM_MALLOC_RESERVE_INTERNAL=50768
|
||||||
17
src/Config.h
17
src/Config.h
@@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
#define NUKI_HUB_VERSION "9.01"
|
#define NUKI_HUB_VERSION "9.01"
|
||||||
#define NUKI_HUB_BUILD "unknownbuildnr"
|
#define NUKI_HUB_BUILD "unknownbuildnr"
|
||||||
#define NUKI_HUB_DATE "2024-08-18"
|
#define NUKI_HUB_DATE "unknownbuilddate"
|
||||||
|
|
||||||
#define GITHUB_LATEST_RELEASE_URL (char*)"https://github.com/technyon/nuki_hub/releases/latest"
|
#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"
|
#define GITHUB_OTA_MANIFEST_URL (char*)"https://raw.githubusercontent.com/technyon/nuki_hub/binary/ota/manifest.json"
|
||||||
@@ -23,6 +23,20 @@
|
|||||||
#define GITHUB_MASTER_RELEASE_BINARY_URL_DBG (char*)"https://raw.githubusercontent.com/technyon/nuki_hub/binary/ota/debug/master/nuki_hub_esp32c3.bin"
|
#define GITHUB_MASTER_RELEASE_BINARY_URL_DBG (char*)"https://raw.githubusercontent.com/technyon/nuki_hub/binary/ota/debug/master/nuki_hub_esp32c3.bin"
|
||||||
#define GITHUB_MASTER_UPDATER_BINARY_URL_DBG (char*)"https://raw.githubusercontent.com/technyon/nuki_hub/binary/ota/debug/master/nuki_hub_updater_esp32c3.bin"
|
#define GITHUB_MASTER_UPDATER_BINARY_URL_DBG (char*)"https://raw.githubusercontent.com/technyon/nuki_hub/binary/ota/debug/master/nuki_hub_updater_esp32c3.bin"
|
||||||
#elif defined(CONFIG_IDF_TARGET_ESP32S3)
|
#elif defined(CONFIG_IDF_TARGET_ESP32S3)
|
||||||
|
#if defined(CONFIG_SPIRAM_MODE_OCT)
|
||||||
|
#define GITHUB_LATEST_RELEASE_BINARY_URL (char*)"https://raw.githubusercontent.com/technyon/nuki_hub/binary/ota/nuki_hub_esp32s3oct.bin"
|
||||||
|
#define GITHUB_LATEST_UPDATER_BINARY_URL (char*)"https://raw.githubusercontent.com/technyon/nuki_hub/binary/ota/nuki_hub_updater_esp32s3oct.bin"
|
||||||
|
#define GITHUB_BETA_RELEASE_BINARY_URL (char*)"https://raw.githubusercontent.com/technyon/nuki_hub/binary/ota/beta/nuki_hub_esp32s3oct.bin"
|
||||||
|
#define GITHUB_BETA_UPDATER_BINARY_URL (char*)"https://raw.githubusercontent.com/technyon/nuki_hub/binary/ota/beta/nuki_hub_updater_esp32s3oct.bin"
|
||||||
|
#define GITHUB_MASTER_RELEASE_BINARY_URL (char*)"https://raw.githubusercontent.com/technyon/nuki_hub/binary/ota/master/nuki_hub_esp32s3oct.bin"
|
||||||
|
#define GITHUB_MASTER_UPDATER_BINARY_URL (char*)"https://raw.githubusercontent.com/technyon/nuki_hub/binary/ota/master/nuki_hub_updater_esp32s3oct.bin"
|
||||||
|
#define GITHUB_LATEST_RELEASE_BINARY_URL_DBG (char*)"https://raw.githubusercontent.com/technyon/nuki_hub/binary/ota/debug/nuki_hub_esp32s3oct.bin"
|
||||||
|
#define GITHUB_LATEST_UPDATER_BINARY_URL_DBG (char*)"https://raw.githubusercontent.com/technyon/nuki_hub/binary/ota/debug/nuki_hub_updater_esp32s3oct.bin"
|
||||||
|
#define GITHUB_BETA_RELEASE_BINARY_URL_DBG (char*)"https://raw.githubusercontent.com/technyon/nuki_hub/binary/ota/debug/beta/nuki_hub_esp32s3oct.bin"
|
||||||
|
#define GITHUB_BETA_UPDATER_BINARY_URL_DBG (char*)"https://raw.githubusercontent.com/technyon/nuki_hub/binary/ota/debug/beta/nuki_hub_updater_esp32s3oct.bin"
|
||||||
|
#define GITHUB_MASTER_RELEASE_BINARY_URL_DBG (char*)"https://raw.githubusercontent.com/technyon/nuki_hub/binary/ota/debug/master/nuki_hub_esp32s3oct.bin"
|
||||||
|
#define GITHUB_MASTER_UPDATER_BINARY_URL_DBG (char*)"https://raw.githubusercontent.com/technyon/nuki_hub/binary/ota/debug/master/nuki_hub_updater_esp32s3oct.bin"
|
||||||
|
#else
|
||||||
#define GITHUB_LATEST_RELEASE_BINARY_URL (char*)"https://raw.githubusercontent.com/technyon/nuki_hub/binary/ota/nuki_hub_esp32s3.bin"
|
#define GITHUB_LATEST_RELEASE_BINARY_URL (char*)"https://raw.githubusercontent.com/technyon/nuki_hub/binary/ota/nuki_hub_esp32s3.bin"
|
||||||
#define GITHUB_LATEST_UPDATER_BINARY_URL (char*)"https://raw.githubusercontent.com/technyon/nuki_hub/binary/ota/nuki_hub_updater_esp32s3.bin"
|
#define GITHUB_LATEST_UPDATER_BINARY_URL (char*)"https://raw.githubusercontent.com/technyon/nuki_hub/binary/ota/nuki_hub_updater_esp32s3.bin"
|
||||||
#define GITHUB_BETA_RELEASE_BINARY_URL (char*)"https://raw.githubusercontent.com/technyon/nuki_hub/binary/ota/beta/nuki_hub_esp32s3.bin"
|
#define GITHUB_BETA_RELEASE_BINARY_URL (char*)"https://raw.githubusercontent.com/technyon/nuki_hub/binary/ota/beta/nuki_hub_esp32s3.bin"
|
||||||
@@ -35,6 +49,7 @@
|
|||||||
#define GITHUB_BETA_UPDATER_BINARY_URL_DBG (char*)"https://raw.githubusercontent.com/technyon/nuki_hub/binary/ota/debug/beta/nuki_hub_updater_esp32s3.bin"
|
#define GITHUB_BETA_UPDATER_BINARY_URL_DBG (char*)"https://raw.githubusercontent.com/technyon/nuki_hub/binary/ota/debug/beta/nuki_hub_updater_esp32s3.bin"
|
||||||
#define GITHUB_MASTER_RELEASE_BINARY_URL_DBG (char*)"https://raw.githubusercontent.com/technyon/nuki_hub/binary/ota/debug/master/nuki_hub_esp32s3.bin"
|
#define GITHUB_MASTER_RELEASE_BINARY_URL_DBG (char*)"https://raw.githubusercontent.com/technyon/nuki_hub/binary/ota/debug/master/nuki_hub_esp32s3.bin"
|
||||||
#define GITHUB_MASTER_UPDATER_BINARY_URL_DBG (char*)"https://raw.githubusercontent.com/technyon/nuki_hub/binary/ota/debug/master/nuki_hub_updater_esp32s3.bin"
|
#define GITHUB_MASTER_UPDATER_BINARY_URL_DBG (char*)"https://raw.githubusercontent.com/technyon/nuki_hub/binary/ota/debug/master/nuki_hub_updater_esp32s3.bin"
|
||||||
|
#endif
|
||||||
#elif defined(CONFIG_IDF_TARGET_ESP32C6)
|
#elif defined(CONFIG_IDF_TARGET_ESP32C6)
|
||||||
#define GITHUB_LATEST_RELEASE_BINARY_URL (char*)"https://raw.githubusercontent.com/technyon/nuki_hub/binary/ota/nuki_hub_esp32c6.bin"
|
#define GITHUB_LATEST_RELEASE_BINARY_URL (char*)"https://raw.githubusercontent.com/technyon/nuki_hub/binary/ota/nuki_hub_esp32c6.bin"
|
||||||
#define GITHUB_LATEST_UPDATER_BINARY_URL (char*)"https://raw.githubusercontent.com/technyon/nuki_hub/binary/ota/nuki_hub_updater_esp32c6.bin"
|
#define GITHUB_LATEST_UPDATER_BINARY_URL (char*)"https://raw.githubusercontent.com/technyon/nuki_hub/binary/ota/nuki_hub_updater_esp32c6.bin"
|
||||||
|
|||||||
@@ -4,6 +4,9 @@
|
|||||||
#include "Logger.h"
|
#include "Logger.h"
|
||||||
#include "RestartReason.h"
|
#include "RestartReason.h"
|
||||||
#include <esp_task_wdt.h>
|
#include <esp_task_wdt.h>
|
||||||
|
#ifdef CONFIG_SOC_SPIRAM_SUPPORTED
|
||||||
|
#include <esp_psram.h>
|
||||||
|
#endif
|
||||||
#ifndef CONFIG_IDF_TARGET_ESP32H2
|
#ifndef CONFIG_IDF_TARGET_ESP32H2
|
||||||
#include <esp_wifi.h>
|
#include <esp_wifi.h>
|
||||||
#endif
|
#endif
|
||||||
@@ -3071,7 +3074,6 @@ void WebCfgServer::buildAccLvlHtml(AsyncWebServerRequest *request)
|
|||||||
_response.concat("</table><br>");
|
_response.concat("</table><br>");
|
||||||
_response.concat("<br><input type=\"submit\" name=\"submit\" value=\"Save\">");
|
_response.concat("<br><input type=\"submit\" name=\"submit\" value=\"Save\">");
|
||||||
}
|
}
|
||||||
|
|
||||||
_response.concat("</form>");
|
_response.concat("</form>");
|
||||||
_response.concat("</body></html>");
|
_response.concat("</body></html>");
|
||||||
sendResponse(request);
|
sendResponse(request);
|
||||||
@@ -3203,8 +3205,28 @@ void WebCfgServer::buildInfoHtml(AsyncWebServerRequest *request)
|
|||||||
_response.concat(getRestartReason());
|
_response.concat(getRestartReason());
|
||||||
_response.concat("\nLast restart reason ESP: ");
|
_response.concat("\nLast restart reason ESP: ");
|
||||||
_response.concat(getEspRestartReason());
|
_response.concat(getEspRestartReason());
|
||||||
_response.concat("\nFree heap: ");
|
_response.concat("\nFree internal heap: ");
|
||||||
_response.concat(esp_get_free_heap_size());
|
_response.concat(ESP.getFreeHeap());
|
||||||
|
_response.concat("\nTotal internal heap: ");
|
||||||
|
_response.concat(ESP.getHeapSize());
|
||||||
|
#ifdef CONFIG_SOC_SPIRAM_SUPPORTED
|
||||||
|
if(esp_psram_get_size() > 0)
|
||||||
|
{
|
||||||
|
_response.concat("\nPSRAM Available: Yes");
|
||||||
|
_response.concat("\nTotal PSRAM: ");
|
||||||
|
_response.concat(esp_psram_get_size());
|
||||||
|
_response.concat("\nFree PSRAM: ");
|
||||||
|
_response.concat((esp_get_free_heap_size() - ESP.getFreeHeap()));
|
||||||
|
_response.concat("\nTotal free heap: ");
|
||||||
|
_response.concat(esp_get_free_heap_size());
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
_response.concat("\nPSRAM Available: No");
|
||||||
|
}
|
||||||
|
#else
|
||||||
|
_response.concat("\nPSRAM Available: No");
|
||||||
|
#endif
|
||||||
_response.concat("\nNetwork task stack high watermark: ");
|
_response.concat("\nNetwork task stack high watermark: ");
|
||||||
_response.concat(uxTaskGetStackHighWaterMark(networkTaskHandle));
|
_response.concat(uxTaskGetStackHighWaterMark(networkTaskHandle));
|
||||||
_response.concat("\nNuki task stack high watermark: ");
|
_response.concat("\nNuki task stack high watermark: ");
|
||||||
|
|||||||
@@ -514,6 +514,13 @@ void setup()
|
|||||||
|
|
||||||
if(doOta) setupTasks(true);
|
if(doOta) setupTasks(true);
|
||||||
else setupTasks(false);
|
else setupTasks(false);
|
||||||
|
|
||||||
|
#ifdef DEBUG_NUKIHUB
|
||||||
|
Log->print("Task Name\tStatus\tPrio\tHWM\tTask\tAffinity\n");
|
||||||
|
char stats_buffer[1024];
|
||||||
|
vTaskList(stats_buffer);
|
||||||
|
Log->println(stats_buffer);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void loop()
|
void loop()
|
||||||
|
|||||||
@@ -8,6 +8,8 @@ def get_board_name(env):
|
|||||||
board = env.get('BOARD_MCU')
|
board = env.get('BOARD_MCU')
|
||||||
if env.get('BOARD') == 'esp32-solo1':
|
if env.get('BOARD') == 'esp32-solo1':
|
||||||
board = env.get('BOARD').replace('-', '')
|
board = env.get('BOARD').replace('-', '')
|
||||||
|
elif env.get('BOARD') == 'nuki-esp32-s3-oct':
|
||||||
|
board = 'esp32s3oct'
|
||||||
return board
|
return board
|
||||||
|
|
||||||
def create_target_dir(env):
|
def create_target_dir(env):
|
||||||
|
|||||||
@@ -67,6 +67,8 @@ board = esp32dev
|
|||||||
extra_scripts =
|
extra_scripts =
|
||||||
pre:pio_package_pre.py
|
pre:pio_package_pre.py
|
||||||
post:pio_package_post.py
|
post:pio_package_post.py
|
||||||
|
board_build.cmake_extra_args =
|
||||||
|
-DSDKCONFIG_DEFAULTS="sdkconfig.defaults;sdkconfig.defaults.esp32"
|
||||||
|
|
||||||
[env:updater_esp32-c3]
|
[env:updater_esp32-c3]
|
||||||
extends = env:updater_esp32
|
extends = env:updater_esp32
|
||||||
@@ -75,6 +77,14 @@ board = esp32-c3-devkitc-02
|
|||||||
[env:updater_esp32-s3]
|
[env:updater_esp32-s3]
|
||||||
extends = env:updater_esp32
|
extends = env:updater_esp32
|
||||||
board = nuki-esp32-s3
|
board = nuki-esp32-s3
|
||||||
|
board_build.cmake_extra_args =
|
||||||
|
-DSDKCONFIG_DEFAULTS="sdkconfig.defaults;sdkconfig.defaults.esp32-s3"
|
||||||
|
|
||||||
|
[env:updater_esp32-s3-oct]
|
||||||
|
extends = env:updater_esp32
|
||||||
|
board = nuki-esp32-s3-oct
|
||||||
|
board_build.cmake_extra_args =
|
||||||
|
-DSDKCONFIG_DEFAULTS="sdkconfig.defaults;sdkconfig.defaults.esp32-s3-oct"
|
||||||
|
|
||||||
[env:updater_esp32-c6]
|
[env:updater_esp32-c6]
|
||||||
extends = env:updater_esp32
|
extends = env:updater_esp32
|
||||||
|
|||||||
6
updater/sdkconfig.defaults.esp32
Normal file
6
updater/sdkconfig.defaults.esp32
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
CONFIG_SPIRAM=y
|
||||||
|
CONFIG_SPIRAM_IGNORE_NOTFOUND=y
|
||||||
|
CONFIG_MBEDTLS_DEFAULT_MEM_ALLOC=y
|
||||||
|
CONFIG_BT_NIMBLE_MEM_ALLOC_MODE_DEFAULT=y
|
||||||
|
CONFIG_SPIRAM_MALLOC_ALWAYSINTERNAL=4096
|
||||||
|
CONFIG_SPIRAM_MALLOC_RESERVE_INTERNAL=50768
|
||||||
6
updater/sdkconfig.defaults.esp32-s3
Normal file
6
updater/sdkconfig.defaults.esp32-s3
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
CONFIG_SPIRAM=y
|
||||||
|
CONFIG_SPIRAM_IGNORE_NOTFOUND=y
|
||||||
|
CONFIG_MBEDTLS_DEFAULT_MEM_ALLOC=y
|
||||||
|
CONFIG_BT_NIMBLE_MEM_ALLOC_MODE_DEFAULT=y
|
||||||
|
CONFIG_SPIRAM_MALLOC_ALWAYSINTERNAL=4096
|
||||||
|
CONFIG_SPIRAM_MALLOC_RESERVE_INTERNAL=50768
|
||||||
7
updater/sdkconfig.defaults.esp32-s3-oct
Normal file
7
updater/sdkconfig.defaults.esp32-s3-oct
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
CONFIG_SPIRAM=y
|
||||||
|
CONFIG_SPIRAM_IGNORE_NOTFOUND=y
|
||||||
|
CONFIG_MBEDTLS_DEFAULT_MEM_ALLOC=y
|
||||||
|
CONFIG_BT_NIMBLE_MEM_ALLOC_MODE_DEFAULT=y
|
||||||
|
CONFIG_SPIRAM_MALLOC_ALWAYSINTERNAL=4096
|
||||||
|
CONFIG_SPIRAM_MALLOC_RESERVE_INTERNAL=50768
|
||||||
|
CONFIG_SPIRAM_MODE_OCT=y
|
||||||
@@ -1 +1,7 @@
|
|||||||
CONFIG_FREERTOS_UNICORE=y
|
CONFIG_FREERTOS_UNICORE=y
|
||||||
|
CONFIG_SPIRAM=y
|
||||||
|
CONFIG_SPIRAM_IGNORE_NOTFOUND=y
|
||||||
|
CONFIG_MBEDTLS_DEFAULT_MEM_ALLOC=y
|
||||||
|
CONFIG_BT_NIMBLE_MEM_ALLOC_MODE_DEFAULT=y
|
||||||
|
CONFIG_SPIRAM_MALLOC_ALWAYSINTERNAL=4096
|
||||||
|
CONFIG_SPIRAM_MALLOC_RESERVE_INTERNAL=50768
|
||||||
Reference in New Issue
Block a user