diff --git a/journals/2026-07-14.md b/journals/2026-07-14.md new file mode 100644 index 0000000..3cc7856 --- /dev/null +++ b/journals/2026-07-14.md @@ -0,0 +1,10 @@ +# 2026-07-14 + +## Family Devotional / Kids Nightly + +**Challenge from ESP32 voice device (cli-loop-fix):** +> If there is anything you have been hiding from God or others, do not stay in the darkness. Tell God you are sorry. Then tell a parent, grandparent, teacher, or trusted friend. Truth brings freedom. + +- Theme: Confession / Truth / Freedom (cf. 1 John 1:7,9, James 5:16) +- Saved from voice input — for kids nightly reading / family discussion +- Voice: cli-loop-fix (Grace/Elías context) diff --git a/resources/wifi_csi_motion_sensing.md b/resources/wifi_csi_motion_sensing.md new file mode 100644 index 0000000..657a829 --- /dev/null +++ b/resources/wifi_csi_motion_sensing.md @@ -0,0 +1,69 @@ +# WiFi CSI Motion Sensing - Electronics Projects Reference + +Date: 2026-07-14 +Tags: [electronics, esp32, csi, motion-detection, home-assistant, esphome, reference] +Related: [[local_network_improvements]] [[Grace Poppy Storybook Image Voice App]] + +## Purpose +Camera-free motion detection using WiFi Channel State Information (CSI). ESP32 listens to WiFi distortions caused by people moving. No camera, no PIR, total privacy. Good for ESP32 website/demo, home automation, kids safety, energy saving. + +## Two Projects Evaluated + +### 1. eSPECTRe (RECOMMENDED for production) +- Repo: https://github.com/francescopace/espectre +- Stars: ~8.8k, License: GPLv3, Updated: active daily, language: C++/Python +- Hardware: ESP32, S3, C3, C6, C5 all supported. S3/C6 recommended ~€10 / $9-15. Needs 8MB flash + PSRAM for S3 +- Stack: ESPHome component only — YAML flash. No extra server. +- How: Generates 100 pps ping traffic to router, extracts 64 subcarrier amplitudes (HT20), gain lock 3s median AGC/FFT, auto-selects 12 best subcarriers via NBVI (Normalized Baseline Variability Index), computes spatial turbulence = std or CV, moving variance window 100, adaptive P95*1.1 threshold, Hampel outlier filter, hit filter 3 on/3 off -> binary motion +- Two detectors: + - MVS (default): variance heuristic, needs 10s quiet calibration at boot + - ML (experimental): MLP 9→32→16→1 (865 params, 816 MACs), 150µs S3 / 1.9ms C6, no calibration needed, 0.8% FP on S3 in 60s tests +- HA: Native ESPHome auto-discovery -> binary_sensor motion + movement score + adjustable threshold +- Performance: 67% flash S3, 1.5% CPU @100pps MVS, 4.3% ML S3. Published PERFORMANCE.md with real confusion matrices, shows failures too. +- Setup: 10-15 min - `esphome run espectre-c6.yaml` or Chrome web flash via ESPConnect, provisioning BLE/USB/Captive Portal +- Placement: 3-8m from router optimal, 1-1.5m height, avoid metal obstacles +- Limitations: Binary motion only (no person vs pet), ~50m² per sensor, detects any movement, through-wall works but reduced via concrete +- Best for: Website feature "Private Motion Sensing", home security away mode, elderly no-movement alerts, auto lights, energy saving + +### 2. RuView / WiFi-DensePose (research demo, heavy marketing) +- Repo: https://github.com/ruvnet/RuView +- Stars: 80.6k (likely inflated), License: MIT +- Hardware: ESP32-S3 ($9) or C6 ($6-10 research) + Rust sensing server on Pi/laptop + optional Cognitum Seed $140 appliance +- Stack: ESP-IDF C firmware + Rust server + Python torch + React dashboard + Docker + HA MQTT + Matter bridge +- What ESP32 actually does: Tier0 raw CSI UDP 0xC5110001 @20Hz stable, Tier1 phase unwrap/Welford/top-K, Tier2 biquad breathing 0.1-0.5Hz 6-30 BPM, HR 0.8-2.0Hz 40-120 BPM, presence = variance threshold (false positives fans/microwave, needs 60s empty room calib), person count = top_k/2 heuristic not ML +- Claims that are NOT on ESP32: 17-keypoint pose, SOTA 82.69% PCK, world model, 105 cogs, witness chain -> all server side, model loader currently broken (JSONL vs binary RVF mismatch), through-wall ~5m signal dependent +- HA: 21 entities per node via MQTT auto-discovery + Matter bridge +- Pros: Real CSI capture example, breathing DSP reference, MIT, Docker demo no HW, prebuilt bins +- Cons: Hype >> code, 100+ ADRs, funnel to cognitum.one paid, heavy deps, unencrypted UDP +- Use as: Inspiration only, not direct integration for product. Reference Espressif esp-csi official example instead for clean code. + +## Comparison + +| | RuView | eSPECTRe | +|---|---|---| +| Focus | Pose + vitals + 105 cogs | One thing: motion | +| Install | esptool + provision.py + cargo run + docker | esphome yaml / web flash 10 min | +| Edge compute | Heuristic + server ML | On-device MVS/ML | +| Credibility | Marketing heavy, hides caveats in small print | Publishes bad results too (C6 21% FP) | +| License | MIT but commercial funnel | GPLv3 pure OSS | + +## Recommendation for Reyna Family / Website + +- Feature eSPECTRe on ESP32 page, not RuView. +- Tagline: "Turn any €10 ESP32 into a camera-free motion sensor — no cloud, total privacy" +- Immediate project: Flash 1x S3 DevKitC-1 with espectre-s3.yaml -> HA -> automation ideas: lights, security, kid room night exit alert (links to Grace Poppy safety) +- Future extension: Could combine with existing ESP32 fleet (esp32_screen .123 RLCD, kitchen voice .122, Faith+Grace-Poppy .107) - add CSI sensing side by side with book player? Note resource constraints: RLCD already heavy. +- If want breathing HR: borrow RuView biquad filter idea, implement minimal in Arduino/ESPHome custom component, MQTT to backend, skip Rust server. + +## Links & Assets +- eSPECTRe SETUP.md: full yaml examples, tuning guide TUNING.md, ALGORITHMS.md scientific docs +- eSPECTRe PERFORMANCE.md: per-chip Recall/Precision/F1, flash/RAM/CPU budgets +- RuView firmware: firmware/esp32-csi-node/release_bins/ + ADR-018 binary format spec +- Placement guide optimal: 3-8m, 1-1.5m height, 50-70m² per sensor + +## TODO if building +- [ ] Test flash S3/C6 devkit with eSPECTRe, verify HA discovery +- [ ] Create minimal landing page section with image: Home Assistant dashboard screenshot + external antenna bundle photo +- [ ] Document GPLv3 compliance if publishing firmware bins on reynafamily.com +- [ ] Evaluate combining CSI motion with Tactility Book Player (320x240) as idle detection -> pause/play? +- [ ] Try ML detector vs MVS in 220 Emerald house layout (concrete walls = reduced sensitivity)