Highlights
- More robust runtime on modern chips (ESP32-C5/C6): WiFi lifecycle handling is hardened, dual-band protocol/bandwidth APIs are used correctly (with safe fallback), C5 is forced to 2.4 GHz, and C5 CSI
114-bytepayloads are normalized to HT20128-byteinternal layout - Safer calibration and detector state transitions: calibration start failures are now handled explicitly, detector buffers are cold-cleared after calibration/channel switches, and NBVI input/band-size validation is hardened
- Stricter quality bar for motion validation: Python and C++ performance targets are now unified to
Recall >95%andFP <5%for both MVS and ML, with docs updated accordingly (PERFORMANCE.md,test/README.md)
Reliability and Runtime Fixes
- Threshold handling unified across stacks: validation is aligned to
0.0-10.0across ESPHome/C++ and Micro-ESPectre/Python (HA number, Serial, MQTT, detector setters); MQTT now propagates detector rejection correctly;factory_resetrestores ML threshold to5.0 - Serial command parsing hardening:
T:<value>now uses validatedstrtofparsing (endptr, finite/range checks) - Startup fail-fast behavior: setup now marks the component failed when WiFi initialization/handler registration fails
- Auxiliary task stability: DNS task always clears
running_on early exits, avoiding stale "already running" states - Safety guards in diagnostics utilities: progress-bar width/marker bounds are now clamped to prevent fixed-buffer edge cases
Calibration, ML, and Dataset Pipeline
- NBVI hot-path optimization: reduced allocations, enforced memory-bounded chunked validation reads (avoids
std::bad_alloc/abort()on low-heap targets), and replaced O(window) shifts with ring buffer + running statistics - Context-aware grid-search metadata workflow:
micro-espectre/tools/11_refresh_gridsearch_metadata.pyintroduced and then simplified to a single C++-aligned evaluation path (legacy hardcoded subcarrier override removed) - Metadata consistency cleanup:
gain_lockedis now the single source of truth in.npzanddataset_info.json; deprecateduse_cv_normalizationandlabel_idmetadata removed - ML pipeline alignment (training + inference): both stacks now use
[12, 14, 16, 18, 20, 24, 28, 36, 40, 44, 48, 52]; models were retrained/re-exported with validated seed, and feature extraction was simplified to the selected 12 runtime features
Tooling and Developer Experience
- Micro-ESPectre deploy diagnostics improved:
./me deploynow performs a REPL health-check and reports explicit remediation for ROM boot-loop (invalid header) with./me flash --erase - C5 support in
meCLI expanded: C5 auto/manual selection,--chip c5, correctesp32c5target mapping, and C5 firmware artifact selection (ESP32_CSI_C5.bin) - Flash mapping hardening: per-chip offsets aligned with MicroPython board deploy options (including C5
0x2000) - Optional BSSID lock in Micro-ESPectre:
WIFI_BSSIDsupport added insrc/main.py - ESP-IDF mock alignment: WiFi mock headers updated to modern protocol bitmasks, band-mode enums, and dual-band API signatures
- General cleanup: removed unused
BaseDetectoramplitude getters and refreshed stale comments/documentation (including C5 tested status in setup/examples, S2 still experimental) - ESPHome 2026.2.4 validation: project configuration was re-validated after upgrading ESPHome from
2026.2.0to2026.2.4(esphome config examples/espectre-c6-dev.yaml), with full Python and C++ test suites passing