jedarden
733f0b9f94
docs: mark Phase 8 and Phase 9 COMPLETE — all 9 phases of Spaxel implementation done
2026-04-15 19:18:53 -04:00
jedarden
af0dc8a5b5
docs: document Phase 7 completion - presence prediction implementation
...
Document the complete presence prediction system implementation
for Home Assistant integration with:
- Per-person transition probability tracking with Laplace smoothing
- Per-zone occupancy patterns from historical data
- Time-slot based predictions via Monte Carlo simulation
- HA sensor exposure with auto-discovery (3 sensors per person)
- Accuracy tracking targeting >75% at 15-minute horizon
All acceptance criteria for presence prediction have been met.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-09 10:17:32 -04:00
jedarden
973b0a0b62
feat(mothership): signal processing package with phase/baseline/motion detection
...
- Phase sanitization: complex CSI computation, RSSI normalization, spatial
phase unwrapping, linear regression for STO/CFO removal
- HT20 subcarrier map: 64 total, 46 data subcarriers (null/guard/pilot excluded)
- Baseline system: EMA with motion-gated updates, confidence scoring,
snapshot/restore for SQLite persistence
- Motion detection: NBVI subcarrier selection (Welford's algorithm),
deltaRMS computation, exponential smoothing, threshold-based detection
- LinkProcessor/ProcessorManager: thread-safe per-link processing
Complete: phase sanitization, baseline, motion detection (items 7-9 of Phase 2)
Remaining: dashboard presence indicator, CSI recording buffer, adaptive rate
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-26 08:08:46 -04:00
jedarden
3f2962f945
feat(deploy): Docker packaging with multi-stage build and compose orchestration
...
- Dockerfile: golang:1.23-bookworm builder → distroless/static-debian12:nonroot
- docker-compose.yml: host networking (required for mDNS), Traefik labels, resource limits
- VERSION: 0.1.0 for image tagging
- .dockerignore: excludes docs, build artifacts, IDE files
- .gitignore: standard Go/ESP-IDF ignores
Key decisions:
- Host networking required: Docker bridge blocks mDNS multicast 224.0.0.251
- distroless/static-debian12:nonroot: no shell, minimal attack surface, UID 65532
- Firmware via volume mount: users provide their own binaries for OTA
- Traefik labels disabled by default: enable SPAXEL_TRAEFIK_ENABLE=true for TLS
Complete: Phase 1 Docker packaging — all foundation items now done
Remaining: Phase 2 signal processing (baseline, deltaRMS, Fresnel zones)
2026-03-26 07:46:15 -04:00
jedarden
8230ef4222
feat(dashboard): web dashboard skeleton with Three.js 3D scene and CSI visualization
...
- Static HTML/JS dashboard served by mothership at /
- Three.js 3D scene with ground grid, OrbitControls (pan/zoom/rotate)
- WebSocket connection at /ws/dashboard for real-time CSI streaming
- Binary CSI frame parsing (24-byte header + I/Q payload)
- Amplitude bar chart (64 subcarriers) as 2D Canvas overlay
- Node/link panels with live status and click-to-select
- Dashboard Go package with Hub for client broadcasting
- Ingestion server broadcasts CSI frames and node events to dashboard
- 5 new tests for dashboard hub operations
Complete: 3D scene, WebSocket, amplitude chart, node/link panels
Remaining: Docker packaging (Phase 1 final item)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-26 07:40:53 -04:00
jedarden
f178496c83
feat(firmware): ESP32-S3 firmware skeleton with CSI/BLE/WebSocket
...
- State machine: 7-state lifecycle (BOOT→WIFI→DISCOVERY→CONNECTED,
degraded modes WIFI_LOST/MOTHERSHIP_UNAVAILABLE/CAPTIVE_PORTAL)
- WiFi: STA connection with exponential backoff, mDNS discovery with
cached IP fallback, captive portal AP for provisioning
- WebSocket: bidirectional comms, binary CSI frames (24B header + I/Q),
JSON hello/health/ble/ota_status upstream, role/config/ota/reboot
downstream, OTA task with progress reporting
- CSI: promiscuous mode capture, queue-based processing, passive BSSID
filter, on-device variance tracking (Welford's) for motion hints
- BLE: passive scanning on Core 0, 60-device cache, 5s reporting
- NVS: 15-key schema with versioning, role/rate persistence
Complete: ESP32 firmware skeleton, passive radar, BLE scanning
Remaining: Dashboard skeleton, Docker packaging (Phase 1 items 5-6)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-26 07:20:55 -04:00
jedarden
3937dbe06e
feat(mothership): WebSocket ingestion server with binary/JSON frame parsing
...
- /ws/node endpoint: one goroutine per connection, bidirectional
- Binary frames: 24-byte header → CSIFrame struct; payload as []int8 I/Q pairs
- JSON frames: dispatched by "type" field (hello, health, ble, motion_hint, ota_status)
- Per-link ring buffer: 256-sample circular, keyed by (node_mac, peer_mac)
- Node identity from first "hello" — no pre-registration required
- Used gorilla/websocket: mature, SetReadDeadline, binary frame support
- mDNS via hashicorp/mdns at _spaxel._tcp.local:8080
- Ping/pong keepalive: 30s ping interval, 60s read deadline
- Malformed frame tracking: warn at 100/min, close at 1000/min
Complete: frame parsing, ring buffers, mDNS, hello/health/ble dispatch, tests (22 passing)
Remaining: OTA command dispatch, /ws/dashboard publisher, SQLite fleet manager (Phase 2)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-26 06:55:22 -04:00