MCPcopy Create free account

hub / github.com/Th0rgal/open_oura / functions

Functions292 in github.com/Th0rgal/open_oura

↓ 21 callersMethodrequest
(&self, bytes: &[u8])
crates/oura-link/src/client.rs:109
↓ 14 callersFunctionconnect
(cli: &Cli)
crates/oura-cli/src/main.rs:218
↓ 13 callersMethodtransport
Borrow the underlying transport (e.g. to disconnect a BLE link).
crates/oura-link/src/client.rs:105
↓ 13 callersMethodupdate
Update with a new (unscaled) sample given the baseline age in days. The step size anneals across three age bands (<4, 4–14, >14 days): the warm-up is
crates/oura-analysis/src/ported/baseline.rs:35
↓ 12 callersMethodencode
Encode to wire bytes: `[tag, len, payload..]`.
crates/oura-protocol/src/protocol.rs:53
↓ 12 callersFunctionmaybe_auth
Authenticate if a key was supplied; returns whether auth was performed.
crates/oura-cli/src/main.rs:230
↓ 11 callersMethodfind
(packets: &[Packet], tag: u8)
crates/oura-link/src/client.rs:114
↓ 10 callersMethodwrite
(&self, data: &[u8])
crates/oura-link/src/ble.rs:191
↓ 9 callersMethoddisconnect
Disconnect from the ring.
crates/oura-link/src/ble.rs:183
↓ 8 callersMethodext_tag
The extended op tag (first payload byte) for `0x2f` frames.
crates/oura-protocol/src/protocol.rs:78
↓ 8 callersFunctionpacket
(tag: int, payload: bytes = b"")
tools/oura_protocol.py:154
↓ 7 callersMethodrdata_clear
Clear the RData session/data from the ring's flash (part of teardown). Returns the response status byte (255 if absent).
crates/oura-link/src/client.rs:396
↓ 7 callersMethodrdata_state
Query the RData collection state (read-only). Returns `(subtag, status)`.
crates/oura-link/src/client.rs:380
↓ 6 callersFunctionf32
(x)
tools/run_models.py:47
↓ 6 callersFunctionunix_s
(ds)
tools/run_models.py:42
↓ 5 callersMethodconnect
Scan for and connect to a ring, selecting the strongest match for `name_contains`. If `address` is given, only a device whose id matches is considered
crates/oura-link/src/ble.rs:91
↓ 5 callersFunctionms
(ds)
tools/run_sleep_model.py:39
↓ 5 callersMethodrdata_stop
Stop an active RData collection session (part of mandatory teardown). Returns the response status byte (255 if absent).
crates/oura-link/src/client.rs:389
↓ 5 callersFunctionresolve_db
Resolve the SQLite events DB path. Explicit ``arg`` wins; otherwise pick the first existing default among ./oura.db, repo/oura.db, repo/captu
tools/_common.py:9
↓ 5 callersMethodserial
Read the ring serial number.
crates/oura-link/src/client.rs:137
↓ 5 callersMethodsync_time
Align the ring clock to host UTC.
crates/oura-link/src/client.rs:203
↓ 4 callersFunction_emit
(label: str, value: str, host: str)
tools/oura_token_sniff.py:25
↓ 4 callersFunctionashr_round
Arithmetic shift right with round-toward-zero bias, matching the decompiled `(t < 0) ? (t + (2^s - 1)) >> s : t >> s`.
crates/oura-analysis/src/ported/baseline.rs:22
↓ 4 callersFunctionband
(coeffs: &[(f64, f64, f64)], age: f64, kg: f64)
crates/oura-analysis/src/ported/metabolic.rs:16
↓ 4 callersMethodbattery
Read battery state (requires app-auth on rings with a key installed).
crates/oura-link/src/client.rs:129
↓ 4 callersFunctiondecode_telemetry
Identify a BLE/radio-telemetry or diagnostic event whose payload layout is device-internal: tag the event by name and preserve the raw body (plus the
crates/oura-protocol/src/events.rs:476
↓ 4 callersFunctionf32
(seq, cols)
tools/run_activity_model.py:144
↓ 4 callersMethodinsert_reading
Record a scalar reading (e.g. live HR bpm, SpO2 %, battery %).
crates/oura-store/src/storage.rs:161
↓ 4 callersFunctionmat
2-D float32 tensor from row-major `rows` of `cols` each (handles empty).
crates/oura-cli/src/activity_model.rs:56
↓ 4 callersMethodmean
Mean in real units.
crates/oura-analysis/src/ported/baseline.rs:65
↓ 4 callersFunctionparse_packet
(data: bytes)
tools/oura_protocol.py:302
↓ 4 callersMethodrdata_configure
Configure/arm an RData session for one or more signal types. **This starts persistent flash sampling that does NOT self-stop** — the caller is respons
crates/oura-link/src/client.rs:404
↓ 4 callersMethodset_feature_mode
Set a feature's mode (e.g. `feature_mode::AUTOMATIC` to enable measurement).
crates/oura-link/src/client.rs:349
↓ 4 callersMethodsubscribe
(&self)
crates/oura-link/src/ble.rs:198
↓ 4 callersFunctionto_local
(minute)
tools/run_activity_model.py:175
↓ 4 callersFunctiontransact
(client: BleakClient, request: bytes, listen_seconds: float, capture: Optional[Path], name: str)
tools/oura_protocol.py:576
↓ 4 callersFunctionwrite_capture
(path: Optional[Path], record: dict)
tools/oura_protocol.py:531
↓ 3 callersFunction_req
(url: str, *, token: str | None, method: str = "GET", body: bytes | None = None, accept: str = "appli
tools/oura_firmware_download.py:50
↓ 3 callersMethodauthenticate
Run the app-auth challenge with a 16-byte key. Must be repeated per connection on rings that have a key installed.
crates/oura-link/src/client.rs:168
↓ 3 callersFunctioncol
(seq, i)
tools/run_sleep_model.py:75
↓ 3 callersFunctiondecode_debug_data
`debug_data` (tag `0x61`): ASCII when the body is printable, otherwise a binary DebugData record dispatched on the first byte (subtype). Charging/batt
crates/oura-protocol/src/events.rs:687
↓ 3 callersFunctiondecode_temperatures
Decode a body of one or more little-endian `i16` temperatures in centi-degrees Celsius. Returns `None` if the length is odd or any value falls outside
crates/oura-protocol/src/events.rs:185
↓ 3 callersMethodfirmware
Read firmware/version metadata (no auth required).
crates/oura-link/src/client.rs:121
↓ 3 callersFunctionforbidden
(sock: &mut TcpStream)
crates/oura-cli/src/motion_server.rs:188
↓ 3 callersFunctionheader
Case-insensitive lookup of an HTTP header value in the raw request.
crates/oura-cli/src/motion_server.rs:79
↓ 3 callersFunctionload
(name)
tools/run_models.py:26
↓ 3 callersMethodon
Register canned responses keyed by the request's full hex.
crates/oura-link/src/transport.rs:74
↓ 3 callersFunctionparse_acm_frame
Parse an ACM measurement indication (response tag `0x33`) into up to 2 samples. Frame: `[0]=0x33 [1]=len [2]=sampleRate [3]=seq [4..10]=x,y,z [10..16
crates/oura-link/src/client.rs:533
↓ 3 callersFunctionreq_realtime_off
Stop all real-time measurements (`06 04 00000000`, bitmask 0 = off).
crates/oura-protocol/src/protocol.rs:228
↓ 3 callersFunctionreq_set_feature_mode
Set a feature's mode (`0x2f` ext `0x22`).
crates/oura-protocol/src/protocol.rs:167
↓ 3 callersFunctionrun
Serve the visualizer at `127.0.0.1:port` (see [`crate::motion_server::run`]).
crates/oura-cli/src/viz.rs:20
↓ 3 callersMethodset_cursor
Persist the next sync cursor.
crates/oura-store/src/storage.rs:125
↓ 3 callersMethodset_feature_subscription
Subscribe/unsubscribe a feature capability (e.g. real steps, Atlas/bioZ) via `SetFeatureSubscription`. Returns the ring's raw result byte (0 = success
crates/oura-link/src/client.rs:368
↓ 3 callersFunctionwrite_named
(client: BleakClient, capture: Optional[Path], name: str, request: bytes)
tools/oura_realtime_listener.py:49
↓ 2 callersFunction_unix_min
(ds)
tools/run_activity_model.py:104
↓ 2 callersFunctionanchor
(rows)
tools/run_models.py:40
↓ 2 callersFunctionauthenticate
(client: BleakClient, key: bytes, listen_seconds: float, capture: Optional[Path])
tools/oura_protocol.py:624
↓ 2 callersFunctionbpm_from_ibi
Compute bpm from an inter-beat interval, ignoring implausible values.
crates/oura-link/src/client.rs:555
↓ 2 callersMethodcapabilities
Read both capability pages.
crates/oura-link/src/client.rs:153
↓ 2 callersFunctioncivil
Days-since-epoch -> (year, month, day). Howard Hinnant's civil_from_days.
crates/oura-cli/src/activity_model.rs:42
↓ 2 callersFunctiondecode_activity_info
`activity_information`: a state byte followed by per-bin MET levels. The native `parse_api_activity_info_event` scales each byte `b<128 -> b*0.1`, els
crates/oura-protocol/src/events.rs:259
↓ 2 callersFunctiondecode_ambient
`ambient_event` (tag `0x84`): signed-16 samples at a 5-minute interval.
crates/oura-protocol/src/events.rs:614
↓ 2 callersFunctiondecode_aohr
`aohr_event` (tag `0x86`): always-on HR. Header flag, a base offset, then a count and `count` 2-byte samples `(value, status)` at a fixed 1920 ms inte
crates/oura-protocol/src/events.rs:592
↓ 2 callersFunctiondecode_ascii
(body: &[u8])
crates/oura-protocol/src/events.rs:151
↓ 2 callersFunctiondecode_atlas_raw_bioz
`atlas_raw_bioz_data` (tag `0x88`): delta-coded i32 sample stream. Each byte is a signed-8 delta added to a running value; a `0x80` byte escapes into
crates/oura-protocol/src/events.rs:648
↓ 2 callersFunctiondecode_bedtime_period
`bedtime_period` (tag `0x76`): the ring's detected sleep window as two `u32` little-endian ring timestamps (deciseconds). Produced by sleep analysis.
crates/oura-protocol/src/events.rs:409
↓ 2 callersFunctiondecode_body
Best-effort decode of an event body. Unknown bodies are intentionally left raw (see module docs). Returns `None` when we don't (yet) understand the la
crates/oura-protocol/src/events.rs:63
↓ 2 callersFunctiondecode_cva_raw_ppg
`cva_raw_ppg_data` (tag 0x81): raw PPG ADC samples, delta-encoded as signed int8. Cumulative-sum reconstructs the waveform (per-event, relative to thi
crates/oura-protocol/src/events.rs:241
↓ 2 callersFunctiondecode_feature_session
`feature_session` (tag `0x6c`): start/stop markers for an on-ring measurement feature. `feature_id` (byte 0, < 8), `session_status` (byte 1, 0-12), an
crates/oura-protocol/src/events.rs:459
↓ 2 callersFunctiondecode_green_ibi_quality
`green_ibi_quality_event` (Ring 5 tag `0x80`): green-LED inter-beat intervals with a quality flag. Per the native `parse_api_green_ibi_quality_event`,
crates/oura-protocol/src/events.rs:205
↓ 2 callersFunctiondecode_hrv
Decode an `hrv_event` body: pairs of `(avg_hr_bpm, avg_rmssd_ms)`, one sample per 5-minute window. Layout confirmed from the ring's native parser (`pa
crates/oura-protocol/src/events.rs:138
↓ 2 callersFunctiondecode_motion
`motion_event` (tag `0x47`): a compact per-window motion summary. From the native `parse_api_motion_events`: `b0>>5` = orientation, `b0&0x1f` = motion
crates/oura-protocol/src/events.rs:381
↓ 2 callersFunctiondecode_motion_period
Map an event tag to its name. Mirrors the Android app's event taxonomy. `motion_period` (tag `0x6b`): a compact activity timeline. The header byte pac
crates/oura-protocol/src/events.rs:433
↓ 2 callersFunctiondecode_sleep_acm_period
`sleep_acm_period` (tag `0x72`): six accelerometer MAD statistics packed as fixed-point — three `int + frac/255` values, then three `12-bit/4095 + nib
crates/oura-protocol/src/events.rs:358
↓ 2 callersFunctiondecode_sleep_phases
Sleep-stage hypnogram: a header byte then 2-bit phase codes (4 per byte, MSB-first). Enum from the native `SleepPhase_OSSAv1`.
crates/oura-protocol/src/events.rs:294
↓ 2 callersFunctiondecode_spo2_r_pi
`spo2_r_pi_event` (Ring 5 tag `0x8b`): a header byte then 3-byte samples of `(R-ratio: u16 big-endian / 16384, perfusion index: u8/255 × 0.05)`. The R
crates/oura-protocol/src/events.rs:339
↓ 2 callersFunctiondecode_state_text
(body: &[u8])
crates/oura-protocol/src/events.rs:171
↓ 2 callersFunctiondecode_time_sync
(body: &[u8])
crates/oura-protocol/src/events.rs:163
↓ 2 callersFunctiondecode_u16_samples
A body of little-endian `u16` samples under a single key (ambient, intensity).
crates/oura-protocol/src/events.rs:225
↓ 2 callersFunctiondescribe_packet
(data: bytes)
tools/oura_protocol.py:475
↓ 2 callersFunctiondownload_image
(manifest: dict, out_dir: str, token: str | None)
tools/oura_firmware_download.py:84
↓ 2 callersFunctionencrypt_nonce
Encrypt a ring nonce (typically 15 bytes) into the 16-byte response block. Mirrors the Android app's `AES/ECB/PKCS5Padding`: the nonce is PKCS7-padde
crates/oura-protocol/src/auth.rs:44
↓ 2 callersMethodevent_counts
Count stored events grouped by event name (descending).
crates/oura-store/src/storage.rs:236
↓ 2 callersFunctionevent_name
(tag: u8)
crates/oura-protocol/src/events.rs:719
↓ 2 callersFunctionevents
(db)
tools/run_models.py:30
↓ 2 callersMethodfeature_status
Read a feature's status (mode/state/subscription).
crates/oura-link/src/client.rs:340
↓ 2 callersFunctionfind_device
(args: argparse.Namespace)
tools/oura_protocol.py:560
↓ 2 callersFunctionfirst_adapter
()
crates/oura-link/src/ble.rs:35
↓ 2 callersFunctionhm
(ms_)
tools/run_sleep_model.py:109
↓ 2 callersFunctionlast_bedtime
Most recent bedtime_period dict, or a clear error if none were synced.
tools/run_models.py:51
↓ 2 callersFunctionload_key
(args: argparse.Namespace)
tools/oura_protocol.py:539
↓ 2 callersFunctionload_key
(path: &Option<PathBuf>)
crates/oura-cli/src/main.rs:183
↓ 2 callersFunctionok
(sock: &mut TcpStream, msg: &str)
crates/oura-cli/src/motion_server.rs:178
↓ 2 callersMethodopen
Open (creating if needed) a database at `path` and ensure the schema.
crates/oura-store/src/storage.rs:70
↓ 2 callersMethodparse
(packet: &Packet)
crates/oura-protocol/src/events.rs:798
↓ 2 callersFunctionparse_live_hr_frame
Parse a daytime-HR live subscription notification (tag `0x2f`, sub-tag `0x28`). Frame layout: `[0]=0x2f [1]=len [2]=0x28(IND1) [3]=cap [4]=status [5]
crates/oura-link/src/client.rs:568
↓ 2 callersMethodrdata_get_page
Fetch one RData page by index. Returns `(status, page_bytes)` where `status` is the subtag-status byte (`6` = NO_DATA / past the end) and `page_bytes`
crates/oura-link/src/client.rs:421
↓ 2 callersFunctionrealtime_request
(payload: bytes)
tools/oura_realtime_listener.py:43
↓ 2 callersFunctionreq_set_realtime
Start a time-boxed real-time measurement stream (`0x06`): a `u32` type bitmask (see [`realtime`]), a `u16` max duration in **minutes** (the ring auto-
crates/oura-protocol/src/protocol.rs:219
↓ 2 callersFunctionsave_key
(path: Optional[str], key: bytes)
tools/oura_protocol.py:551
next →1–100 of 292, ranked by callers