Skip to content

feat(sensing+observatory): tunable presence floor, presence-gated vitals/field, configurable node map - #4

Open
PierreGode wants to merge 10 commits into
mainfrom
feat/presence-tuning-observatory-nodes
Open

feat(sensing+observatory): tunable presence floor, presence-gated vitals/field, configurable node map#4
PierreGode wants to merge 10 commits into
mainfrom
feat/presence-tuning-observatory-nodes

Conversation

@PierreGode

Copy link
Copy Markdown
Owner

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_FLOOR env (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.)
  • Vitals gated on presence (smooth_vitals/smooth_vitals_node) — no phantom HR/RR on an empty room.
  • Signal-field gated on presence (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/*)

  • Room dimensions + per-node x/y/z editable in the settings panel (persisted; SETTINGS_VERSION 6→7).
  • Renders each node as a labeled 3D marker at its configured position, replacing the previously decorative single 'router' prop; live-updates on change.
  • Default dataSourcelive WebSocket (was demo).

Notes / follow-ups

  • Node positions are render-only so far — they do not yet feed the server fusion geometry (SENSING_NODE_POSITIONS is still startup-only). Wiring UI positions → runtime fusion is a logical next step.
  • Occupied-case detection at floor 0.22 not yet hardware-verified (operator was remote); the floor is env-tunable live if it needs lowering.
  • Deployed and running on the Pi (native systemd sensing-server).

Co-Authored-By: claude-flow ruv@ruv.net

PierreGode and others added 10 commits June 25, 2026 15:21
…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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant