From c8b6cd7acefc2bfed443b2af7bf6b9d98ab0eaa2 Mon Sep 17 00:00:00 2001 From: ruv Date: Sat, 23 May 2026 15:04:39 -0400 Subject: [PATCH] feat(adr-115): ship 3 Lovelace dashboard YAMLs (single-room / multi-node / healthcare) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Drop-in Lovelace dashboard YAMLs covering the three common ADR-115 deployment shapes. Paste into HA's raw config editor, rename the `binary_sensor.ruview__*` entity IDs to match what HA auto-discovered, done. | File | Use case | |-------------------------------------|-----------------------------------| | 01-single-room-overview.yaml | One node, full 21-entity surface | | 02-multi-node-grid.yaml | 3+ nodes (whole-house) | | 03-healthcare-aal-view.yaml | Care-giver dashboard, --privacy-mode-safe | ## Single-room overview - Three top tiles: presence / sleeping / room active - Glance card with HR / BR / motion / persons / RSSI - Gauge for fall_risk_elevated with green<40 --- .../lovelace/01-single-room-overview.yaml | 93 +++++++++++++++++++ examples/lovelace/02-multi-node-grid.yaml | 82 ++++++++++++++++ examples/lovelace/03-healthcare-aal-view.yaml | 88 ++++++++++++++++++ examples/lovelace/README.md | 47 ++++++++++ 4 files changed, 310 insertions(+) create mode 100644 examples/lovelace/01-single-room-overview.yaml create mode 100644 examples/lovelace/02-multi-node-grid.yaml create mode 100644 examples/lovelace/03-healthcare-aal-view.yaml create mode 100644 examples/lovelace/README.md diff --git a/examples/lovelace/01-single-room-overview.yaml b/examples/lovelace/01-single-room-overview.yaml new file mode 100644 index 00000000..c958ff90 --- /dev/null +++ b/examples/lovelace/01-single-room-overview.yaml @@ -0,0 +1,93 @@ +# RuView — Single-room overview Lovelace dashboard +# +# Drop into a Home Assistant Lovelace view (raw config editor). Replace +# the `binary_sensor.ruview_bedroom_*` entity IDs with the entity IDs +# auto-generated by your RuView node (HA picks them up from MQTT +# discovery automatically — see `mosquitto_sub -t 'homeassistant/#'` +# to enumerate them). +# +# This view shows the full 21-entity RuView surface for one room: +# raw signals on the left (presence, HR, BR, motion, RSSI, fall risk +# score) and semantic primitives on the right (sleeping, distress, +# room active, no movement). Pose visualisation is a placeholder for +# the v0.7.1 picture-elements integration. + +title: RuView — Bedroom +path: ruview-bedroom +icon: mdi:home-thermometer +cards: + - type: vertical-stack + cards: + - type: markdown + content: > + ## Bedroom — RuView sensing + Status pulled live from MQTT auto-discovery. Tap any tile to + see the raw history graph. + + - type: horizontal-stack + cards: + - type: tile + entity: binary_sensor.ruview_bedroom_presence + name: Presence + icon: mdi:motion-sensor + color: green + - type: tile + entity: binary_sensor.ruview_bedroom_someone_sleeping + name: Sleeping + icon: mdi:sleep + color: blue + - type: tile + entity: binary_sensor.ruview_bedroom_room_active + name: Room active + icon: mdi:home-account + color: amber + + - type: glance + title: Raw vitals + entities: + - entity: sensor.ruview_bedroom_heart_rate + name: HR + - entity: sensor.ruview_bedroom_breathing_rate + name: BR + - entity: sensor.ruview_bedroom_motion_level + name: Motion + - entity: sensor.ruview_bedroom_person_count + name: Persons + - entity: sensor.ruview_bedroom_rssi + name: RSSI + + - type: gauge + entity: sensor.ruview_bedroom_fall_risk_elevated + name: Fall risk score + min: 0 + max: 100 + severity: + green: 0 + yellow: 40 + red: 70 + + - type: entities + title: Safety + entities: + - entity: binary_sensor.ruview_bedroom_possible_distress + name: Possible distress + - entity: binary_sensor.ruview_bedroom_no_movement + name: No movement (safety) + - entity: binary_sensor.ruview_bedroom_elderly_inactivity_anomaly + name: Inactivity anomaly + + - type: history-graph + title: Last 6h — Heart rate & breathing + hours_to_show: 6 + refresh_interval: 60 + entities: + - entity: sensor.ruview_bedroom_heart_rate + - entity: sensor.ruview_bedroom_breathing_rate + + - type: logbook + title: Recent events + hours_to_show: 24 + entities: + - event.ruview_bedroom_fall + - event.ruview_bedroom_bed_exit + - event.ruview_bedroom_multi_room_transition diff --git a/examples/lovelace/02-multi-node-grid.yaml b/examples/lovelace/02-multi-node-grid.yaml new file mode 100644 index 00000000..7f0c7c16 --- /dev/null +++ b/examples/lovelace/02-multi-node-grid.yaml @@ -0,0 +1,82 @@ +# RuView — Multi-node grid Lovelace dashboard +# +# For deployments with multiple RuView nodes (typical: one per room, +# all behind a Cognitum Seed bridge). Shows a top-level grid of every +# room's presence + person count + activity, with drill-in links. +# +# Replace `_bedroom`, `_living`, `_kitchen`, `_office`, `_bathroom` +# with your actual room slugs from the friendly_name resolution. + +title: RuView — Whole house +path: ruview-house +icon: mdi:home-search + +cards: + - type: markdown + content: > + ## RuView — Whole house view + Each tile is one room; tap to drill into raw vitals + semantic + primitives for that room. + + - type: grid + columns: 2 + square: false + cards: + - type: tile + entity: binary_sensor.ruview_bedroom_presence + name: 🛏 Bedroom + features: + - type: target-temperature + tap_action: + action: navigate + navigation_path: /lovelace/ruview-bedroom + + - type: tile + entity: binary_sensor.ruview_living_presence + name: 🛋 Living + tap_action: + action: navigate + navigation_path: /lovelace/ruview-living + + - type: tile + entity: binary_sensor.ruview_kitchen_presence + name: 🍳 Kitchen + tap_action: + action: navigate + navigation_path: /lovelace/ruview-kitchen + + - type: tile + entity: binary_sensor.ruview_office_presence + name: 💻 Office + tap_action: + action: navigate + navigation_path: /lovelace/ruview-office + + - type: tile + entity: binary_sensor.ruview_bathroom_occupied + name: 🚿 Bathroom + tap_action: + action: navigate + navigation_path: /lovelace/ruview-bathroom + + - type: glance + title: House-wide counts + entities: + - entity: sensor.ruview_bedroom_person_count + name: Bedroom + - entity: sensor.ruview_living_person_count + name: Living + - entity: sensor.ruview_kitchen_person_count + name: Kitchen + - entity: sensor.ruview_office_person_count + name: Office + + - type: logbook + title: Recent semantic events + hours_to_show: 24 + entities: + - event.ruview_bedroom_fall + - event.ruview_bedroom_bed_exit + - event.ruview_living_fall + - event.ruview_kitchen_fall + - event.ruview_office_multi_room_transition diff --git a/examples/lovelace/03-healthcare-aal-view.yaml b/examples/lovelace/03-healthcare-aal-view.yaml new file mode 100644 index 00000000..bbb769db --- /dev/null +++ b/examples/lovelace/03-healthcare-aal-view.yaml @@ -0,0 +1,88 @@ +# RuView — Healthcare / AAL (Active and Assisted Living) dashboard +# +# A care-giver-facing view designed for deployments where the +# resident's wellbeing is the primary signal. Uses ONLY the semantic +# primitives — no raw HR/BR exposed to the dashboard surface — so it +# remains useful under `--privacy-mode` where biometric values are +# stripped from MQTT. +# +# Drop into a Lovelace view that the carer accesses via their phone +# (HA mobile app). The custom-button-card and apexcharts-card +# dependencies are optional but improve readability — install via +# HACS or fall back to the standard "entity" and "history-graph" +# cards below as graceful degradation. + +title: RuView — Care view +path: ruview-care +icon: mdi:heart-pulse + +cards: + - type: markdown + content: > + ## RuView — Resident care view + **Privacy-mode-compatible** — only inferred wellbeing states + shown. No biometric values exposed to this dashboard. + + - type: vertical-stack + cards: + - type: horizontal-stack + cards: + - type: tile + entity: binary_sensor.ruview_bedroom_someone_sleeping + name: Sleeping + icon: mdi:sleep + color: blue + - type: tile + entity: binary_sensor.ruview_bedroom_room_active + name: Active + icon: mdi:home-account + color: green + - type: tile + entity: binary_sensor.ruview_bedroom_bathroom_occupied + name: Bathroom + icon: mdi:shower + color: cyan + + - type: horizontal-stack + cards: + - type: tile + entity: binary_sensor.ruview_bedroom_possible_distress + name: Distress + icon: mdi:alert-octagon + color: red + - type: tile + entity: binary_sensor.ruview_bedroom_elderly_inactivity_anomaly + name: Inactivity anomaly + icon: mdi:account-off + color: orange + - type: tile + entity: binary_sensor.ruview_bedroom_no_movement + name: No movement + icon: mdi:hand-back-left-off + color: amber + + - type: gauge + entity: sensor.ruview_bedroom_fall_risk_elevated + name: Fall risk (24h trailing) + min: 0 + max: 100 + severity: + green: 0 + yellow: 40 + red: 70 + + - type: logbook + title: 24h care events + hours_to_show: 24 + entities: + - event.ruview_bedroom_fall + - event.ruview_bedroom_bed_exit + - binary_sensor.ruview_bedroom_possible_distress + - binary_sensor.ruview_bedroom_elderly_inactivity_anomaly + - binary_sensor.ruview_bedroom_no_movement + + - type: entity + entity: binary_sensor.ruview_bedroom_presence + name: Last presence change + attribute: last_changed + icon: mdi:clock-outline diff --git a/examples/lovelace/README.md b/examples/lovelace/README.md new file mode 100644 index 00000000..f3493477 --- /dev/null +++ b/examples/lovelace/README.md @@ -0,0 +1,47 @@ +# RuView Lovelace dashboards + +Drop-in Lovelace dashboard YAMLs for three common deployment shapes. +Paste the contents of any file into HA's **Lovelace raw config editor** +(Settings → Dashboards → ⋮ → Edit dashboard → ⋮ → Raw config editor) +and edit the `binary_sensor.ruview__*` entity IDs to match what +HA auto-discovered from your RuView nodes. + +| # | View | When to use | +|---|-----------------------------------|----------------------------------------| +| 1 | [Single-room overview](01-single-room-overview.yaml) | One RuView node, full 21-entity surface | +| 2 | [Multi-node grid](02-multi-node-grid.yaml) | 3+ RuView nodes (whole-house deploy) | +| 3 | [Healthcare / AAL view](03-healthcare-aal-view.yaml) | Care-giver dashboard; **privacy-mode-safe** (no biometrics shown) | + +## Renaming entities + +RuView's MQTT auto-discovery generates entity IDs from the node's MAC +address by default (`binary_sensor.ruview_aabbccddeeff_presence`). +To get friendly names like `binary_sensor.ruview_bedroom_presence`, +either: + +1. **Rename in HA** — open the entity, click the settings cog, change + the entity ID. HA stores the rename in its own DB; the MQTT + discovery topic stays the same. +2. **Set `node_friendly_name`** in the sensing-server NVS config (per + ADR-115 §9.6 maintainer-ACK'd decision: NVS-only, no ADR-039 + packet change). HA picks the friendly name up at next discovery + refresh. + +## Privacy-mode compatibility + +The third dashboard is designed for healthcare / AAL deployments where +`--privacy-mode` is set on the sensing-server. Under privacy mode: + +- HR / BR / pose entities never reach HA (discovery is suppressed). +- Semantic primitives (someone_sleeping, possible_distress, etc.) + continue to publish because they're inferred *states* server-side, + not biometric *values*. + +The healthcare dashboard binds only to semantic-primitive entities, +so it remains useful — and HIPAA / GDPR-cleaner — under privacy mode. + +## Linked + +- [ADR-115](../../docs/adr/ADR-115-home-assistant-integration.md) — full design +- [`docs/integrations/home-assistant.md`](../../docs/integrations/home-assistant.md) +- [`examples/ha-blueprints/`](../ha-blueprints/) — 8 starter automations