feat(sensing+observatory): tunable presence floor, presence-gated vitals/field, configurable node map - #4
Open
PierreGode wants to merge 10 commits into
Open
Conversation
…als/field, configurable node map Server (csi.rs, main.rs): add RUVIEW_PRESENCE_FLOOR env (default 0.03, preserves behaviour) gating presence + rebasing motion-classify bands, so the empty-room noise floor is tunable per environment (room measured sm~0.15; deployed floor 0.22 via systemd env eliminates constant false-presence). Gate vitals (smooth_vitals/_node) and the Observatory signal-field (attach_field_positions) on presence so an empty room shows no phantom HR/RR and a calm, non-flickering floor. Observatory UI: room dimensions + per-node x/y/z editable in the settings panel (persisted, SETTINGS_VERSION 6->7), render each node as a labeled 3D marker at its position (replacing the decorative router), live-update on change, and default dataSource to live WebSocket. Render-only (does not yet feed server fusion geometry). Co-Authored-By: claude-flow <ruv@ruv.net>
…ings after reverting broken connected-nodes WIP Co-Authored-By: claude-flow <ruv@ruv.net>
Show a node marker only for ids in the live feed (data.nodes[].node_id); demo shows all. Guard _buildNodes + _autoDetectLive and wire settings/loop before networking so an init/data error can't freeze the page. Per-frame updaters wrapped. main.js only. Co-Authored-By: claude-flow <ruv@ruv.net>
…I assets The service worker uses cache-first for static assets, so updated main.js/observatory files were served stale across hard-refreshes (cause of 'still 3 nodes'/'Waiting for nodes' not updating). Bumping CACHE_NAME invalidates the old cache on next SW activation. Co-Authored-By: claude-flow <ruv@ruv.net>
…s on activate Old SW was cache-first, permanently serving stale UI (root cause of UI updates not reaching the browser). New SW deletes ALL caches on activate (one reload flushes the stale cache-first content) and serves network-first, so future UI changes always load fresh; cache is offline fallback only. Co-Authored-By: claude-flow <ruv@ruv.net>
…onnected render) Marker groups were hidden for disconnected nodes, but each node's 3 ripple shells are separate scene objects that kept animating -> 3 glowing 'nodes' still showed. Tag waves with nodeId, store connected-id set per frame, hide ripples for ids not in the live feed. Browser-verified: scene now renders only the 2 connected nodes. Co-Authored-By: claude-flow <ruv@ruv.net>
…orting nodes, manual tagging) Markers are reconciled to the node_ids reporting in the live feed (any N, not a fixed 3); no hardware assumptions (label 'Node <id>'). Settings 'Room & Nodes' shows a dynamic per-node list (name + x/y/z) persisted by id; auto-layout positions untagged nodes evenly. Browser-verified: scene renders the 2 reporting nodes and the settings list populates. Replaces the fixed S3/C6 3-slot model. Co-Authored-By: claude-flow <ruv@ruv.net>
…elf-apply On activate, after clearing caches + clients.claim(), navigate() each controlled window so a stale tab refreshes itself the moment the new worker takes over — one reload instead of the manual unregister/clear dance. Co-Authored-By: claude-flow <ruv@ruv.net>
…er restarts) WS onclose previously switched to demo permanently with no reconnect, so any drop (server restart, network blip) stranded the page on demo's 1 node until a manual reload. Now it stays in live mode and reconnects with exponential backoff (cap 15s); new nodes keep appearing live. Verified: restarted server -> same tab auto-recovered to 3 nodes with no reload. Co-Authored-By: claude-flow <ruv@ruv.net>
Summarizes this session's work: ST7789 display HAL for the Waveshare ESP32-S3-LCD-1.47, native ESP-IDF build env, calibration 3-bug fix, RUVIEW_PRESENCE_FLOOR env + presence-gated vitals/signal-field, the dynamic hardware-agnostic Observatory nodes, network-first service worker with auto-reload, and WebSocket auto-reconnect. Co-Authored-By: claude-flow <ruv@ruv.net>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Per-environment presence tuning + presence-gating of derived outputs, and a configurable node map in the Observatory.
Server (
csi.rs,main.rs)RUVIEW_PRESENCE_FLOORenv (default 0.03 — preserves current behaviour) gates the presence decision and rebases the motion-classify bands, so the empty-room noise floor is tunable per room. (Measured empty-room smoothed-motion ~0.15 on a 2-node ESP32 setup; a floor of 0.22 eliminates constant false-presence.)smooth_vitals/smooth_vitals_node) — no phantom HR/RR on an empty room.attach_field_positions, the shared publish chokepoint) — empty room renders a calm, non-flickering Observatory floor instead of per-frame-normalised noise.Observatory UI (
ui/observatory/*)SETTINGS_VERSION6→7).dataSource→ live WebSocket (was demo).Notes / follow-ups
SENSING_NODE_POSITIONSis still startup-only). Wiring UI positions → runtime fusion is a logical next step.sensing-server).Co-Authored-By: claude-flow ruv@ruv.net