No description
Find a file
Rainer Hauser 1cc16df7ab chore(release): bump firmware version to 1.1.0
PROJECT_VER had stayed at 1.0.0 since the first image, so every build
reported SoftwareVersionString 1.0.0 and SoftwareVersion 1 over Matter and
the running firmware was indistinguishable on the device page. Raise it to
1.1.0 with version number 2 for the sensor release.

Verified on node 06D9: the Matter server reads 0/40/9 = 2 and
0/40/10 = 1.1.0, and all three sensor endpoints keep reporting every 30
seconds. CONFIG_DEVICE_SOFTWARE_VERSION_NUMBER in the sdkconfig has no
effect; the app descriptor value from CMakeLists.txt is what gets reported.
2026-11-14 17:59:08 +01:00
main fix(sensors): tolerate transient SHT4x read failures 2026-11-14 17:37:43 +01:00
tests Initial ESP32-H2 Thread router firmware 2026-11-05 20:53:28 +01:00
tools Initial ESP32-H2 Thread router firmware 2026-11-05 20:53:28 +01:00
.gitignore Simplify README and keep node notes local 2026-11-05 21:40:59 +01:00
AGENTS.md Initial ESP32-H2 Thread router firmware 2026-11-05 20:53:28 +01:00
build.sh fix(sensors): tolerate transient SHT4x read failures 2026-11-14 17:37:43 +01:00
capture-dataset.py Initial ESP32-H2 Thread router firmware 2026-11-05 20:53:28 +01:00
CMakeLists.txt chore(release): bump firmware version to 1.1.0 2026-11-14 17:59:08 +01:00
dependencies.lock Initial ESP32-H2 Thread router firmware 2026-11-05 20:53:28 +01:00
generate-commissioning.py Initial ESP32-H2 Thread router firmware 2026-11-05 20:53:28 +01:00
HARDWARE.md Add BOOT pairing controls and sensor test mode 2026-11-05 23:45:47 +01:00
manual-code.py Initial ESP32-H2 Thread router firmware 2026-11-05 20:53:28 +01:00
partitions.csv Initial ESP32-H2 Thread router firmware 2026-11-05 20:53:28 +01:00
README.md fix(sensors): tolerate transient SHT4x read failures 2026-11-14 17:37:43 +01:00
requirements.txt Initial ESP32-H2 Thread router firmware 2026-11-05 20:53:28 +01:00
restore-dataset.py Initial ESP32-H2 Thread router firmware 2026-11-05 20:53:28 +01:00
sdkconfig.defaults fix(sensors): tolerate transient SHT4x read failures 2026-11-14 17:37:43 +01:00
serial-health.py Initial ESP32-H2 Thread router firmware 2026-11-05 20:53:28 +01:00

ESP32-H2 Matter Thread Router

Shared ESP-Matter firmware for an always-powered ESP32-H2-Zero Thread router, with room-climate and cold-wall sensors.

Features

  • One application image for every node; per-device Matter setup data is stored separately in the fctry partition.
  • Commissioning autostart is delayed until the per-node factory provider is installed, so BLE advertisements and QR labels use the same discriminator.
  • Thread router operation with live Matter diagnostics.
  • BOOT-button multi-admin pairing and deliberate factory reset feedback.
  • SHT41/SHT45 room temperature and humidity plus DS18B20 wall temperature.
  • A USB tool to provision nodes, create QR labels, restore setup data, and update firmware without erasing Matter or Thread credentials.
  • Sensor readings stay in RAM; Home Assistant records history.

Build

Uses ESP-Matter release-v1.4.2 and ESP-IDF 5.4.1. With Docker installed, run from this directory in PowerShell:

docker run --rm -v "${PWD}:/project" -w /project espressif/esp-matter:release-v1.4.2 bash -lc "bash /project/build.sh"

The application image is written to build/fishcreek_matter_router.bin.

USB Tool

Install the host requirements:

py -m venv .venv
.venv\Scripts\python.exe -m pip install -r requirements.txt

Use the port assigned to the board:

.venv\Scripts\python.exe tools\factory_tool.py provision --port COMx --firmware build\fishcreek_matter_router.bin
.venv\Scripts\python.exe tools\factory_tool.py read --port COMx
.venv\Scripts\python.exe tools\factory_tool.py update --port COMx --firmware build\fishcreek_matter_router.bin

provision creates unique Matter setup data and a QR label. read recreates the label from the board. update writes both application slots while preserving factory data and commissioned Matter/Thread NVS. Write operations back up the full flash first. Registries, QR labels, backups, and device-specific h2-*-update.md notes are local-only and Git-ignored.

Sensors

See HARDWARE.md for wiring and pin assignments. Sensor endpoints publish nullable measurements when hardware is missing; the firmware never substitutes dummy values. Home Assistant's Matter integration discovers these sensor entities only after the first non-null measurement. Later null readings appear as unknown; an offline node becomes unavailable.

Each 30-second period retries the SHT4x up to three times, and a measurement is reported as missing only after three consecutive failed periods, so one disturbed I2C transaction no longer flaps the entity to unknown. The One-Wire bus is rescanned every five minutes until a DS18B20 answers. Connect sensors with the board powered down: soldering onto a running board leaves the I2C master and the SHT4x out of sync until the next reset.

The firmware project is a home-built prototype, not a certified Matter product.

BOOT Button

The BOOT button is sampled on GPIO9 and must be used while the firmware is running. Holding it while resetting the board selects ROM download mode.

  • Uncommissioned node: white breathing indicates the 15-minute Matter pairing window. Each press opens or restarts the window.
  • Commissioned node: red while held; release before 5 seconds to cancel, release at 5 to under 10 seconds to open a 15-minute multi-admin window.
  • At 10 seconds the LED turns off. Releasing then performs a factory reset. Matter fabrics and the Thread dataset are cleared; fctry setup data remains. The rebooted node opens a new 15-minute pairing window.
  • Normal Thread status is green for Router/Leader, blue for Child, and amber blinking while detached. Pairing and button feedback temporarily override it.

CONFIG_FISHCREEK_SENSOR_TEST_VALUES is disabled. It exists only for bring-up: while enabled, a physically absent sensor publishes 0.00 for five minutes after the first fabric is commissioned so Home Assistant creates its entity. A connected sensor always takes precedence. Keep the option disabled for physical sensor tests and release builds.