Skip to content

Oura (experimental): sanctioned path to display a ring-provided sleep stage timeline — without HR/RR ? #323

Closed

Description

@pipiche38

@ryanbr

one question in regards to the Oura Ring integration

Context

The experimental Oura integration can now pull the ring's own sleep analysis over BLE: the Gen3 ring runs its staging on-device (SleepNet) and, after wake, banks a complete night hypnogram in its event log as 0x4B/0x4E/0x5A records — 2-bit stage codes (deep/light/REM/awake).

The issue: the ring does not stream HR/RR overnight to the app (heart data arrives only while live-connected, or as banked history). NOOP's sleep pipeline — including Sleep V2 (#277) — computes sleep from continuous overnight HR/RR, so a pure-Oura night never produces a sleepSession/dailyMetric, and the Sleep card stays empty even though the ring handed us a complete, honest hypnogram.

Question

What's the way to feed an externally-staged sleep session (start/end + a stage timeline, no underlying HR/RR) into the display pipeline?

Options I can seer:

  1. Reuse the stage-timeline rows path from docs: add a validation protocol for scoring changes #988 / the HC import (Android: sleep stage-timeline rows (iOS #988 port) + HC sleep import fixes #240): the Health Connect import already ingests third-party-staged sleep with stage timelines. Could a BLE source feed the same structures (as source: oura-ring / provided rather than computed)? This seems closest to "richer record wins" semantics that already arbitrate WHOOP vs imported nights. (easiest)
  2. A first-class "provided sleep session" concept on the Repository — a device-supplied session that analyzeDay treats like a computed one for display, but never feeds HR-derived scoring it doesn't have inputs for.
  3. Keep it out of sleepSession entirely and render a separate "ring-reported sleep" row on the Sleep card (visually distinct, clearly labeled as device-computed).

Happy to build whichever direction fits the architecture

Activity

  1. pipiche38 commented on Jul 14, 2026

    @pipiche38
    Author

    I'm moving on option (1)
    Will post the PR when ready

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions