Export R1 health history and latest heart-rate readings #11

Open
Blendman974 wants to merge 3 commits from feat/health-export into main
pull from: feat/health-export
Owner

Add opt-in authenticated HTTPS export of R1 health history, plus individual latest heart-rate readings alongside the existing hourly summaries.

Health export reuses the settings UI, protects its API key with Android Keystore and sends bounded, acknowledged batches with durable cursors and retries. Existing preferences and hourly health charts are preserved. Only resolved real data is exported.

Latest HR readings keep their measurement timestamps and are stored/exported as heartRate with spanMs=1, separate from hourly spanMs=3600000. Repeated readings deduplicate across restarts; corrections update the existing observation. The aligned collection cadence is now ten minutes, using the existing BLE worker and guards. This does not force the sensor to take measurements or guarantee six readings per hour. Hourly rollups exclude point observations.

Timestamp conversion inverts the current handshake timezone convention. Invalid, stale or future readings are rejected; old frame journals only restore hourly history because their clock domains are uncertain. No firmware or time-sync change is included.

The deployed API and SQL primary key already accept both resolutions, so no API release or database migration is required. The companion Grafana PR separates hourly averages and point readings.

Validation: conversion, export/retry, restart/deduplication, rollup and scheduling tests; timezone tests in Europe/Paris and America/Los_Angeles; full JS suite, TypeScript and lint. API v1 compatibility checked with synthetic mixed-resolution payloads. Actual sensor cadence, timestamps across timezone changes and battery impact still require R1 validation; no firmware was flashed.

Add opt-in authenticated HTTPS export of R1 health history, plus individual latest heart-rate readings alongside the existing hourly summaries. Health export reuses the settings UI, protects its API key with Android Keystore and sends bounded, acknowledged batches with durable cursors and retries. Existing preferences and hourly health charts are preserved. Only resolved real data is exported. Latest HR readings keep their measurement timestamps and are stored/exported as heartRate with spanMs=1, separate from hourly spanMs=3600000. Repeated readings deduplicate across restarts; corrections update the existing observation. The aligned collection cadence is now ten minutes, using the existing BLE worker and guards. This does not force the sensor to take measurements or guarantee six readings per hour. Hourly rollups exclude point observations. Timestamp conversion inverts the current handshake timezone convention. Invalid, stale or future readings are rejected; old frame journals only restore hourly history because their clock domains are uncertain. No firmware or time-sync change is included. The deployed API and SQL primary key already accept both resolutions, so no API release or database migration is required. The companion Grafana PR separates hourly averages and point readings. Validation: conversion, export/retry, restart/deduplication, rollup and scheduling tests; timezone tests in Europe/Paris and America/Los_Angeles; full JS suite, TypeScript and lint. API v1 compatibility checked with synthetic mixed-resolution payloads. Actual sensor cadence, timestamps across timezone changes and battery impact still require R1 validation; no firmware was flashed.
Blendman974 added 1 commit 2026-11-07 22:17:08 +00:00
Add opt-in authenticated HTTPS export of R1 health history
Secret scan / gitleaks (pull_request) Canceled after 0s
Tests / test (pull_request) Canceled after 0s
Tests / test-kotlin (pull_request) Canceled after 0s
Tests / stats-server (pull_request) Canceled after 0s
Tests / evenhub-extensions (pull_request) Canceled after 0s
f0bb727a80
Blendman974 added 1 commit 2026-11-07 22:43:33 +00:00
Document the separate health API repository
Tests / test (pull_request) Canceled after 0s
Tests / test-kotlin (pull_request) Canceled after 0s
Tests / stats-server (pull_request) Canceled after 0s
Tests / evenhub-extensions (pull_request) Canceled after 0s
Secret scan / gitleaks (pull_request) Canceled after 0s
8d57b7c1d0
Blendman974 changed title from Add optional HTTPS export of R1 health history to Export R1 health history and latest heart-rate readings 2026-11-08 00:13:57 +00:00
Blendman974 added 1 commit 2026-11-08 00:13:58 +00:00
feat: retain and export latest heart-rate measurements
Secret scan / gitleaks (pull_request) Canceled after 0s
Tests / test (pull_request) Canceled after 0s
Tests / test-kotlin (pull_request) Canceled after 0s
Tests / stats-server (pull_request) Canceled after 0s
Tests / evenhub-extensions (pull_request) Canceled after 0s
a575db8e27
Some required checks failed
Secret scan / gitleaks (pull_request) Canceled after 0s
Tests / test (pull_request) Canceled after 0s
Tests / test-kotlin (pull_request) Canceled after 0s
Tests / stats-server (pull_request) Canceled after 0s
Tests / evenhub-extensions (pull_request) Canceled after 0s
Checking for merge conflicts…
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin feat/health-export:feat/health-export
git checkout feat/health-export
Sign in to join this conversation.
No Reviewers
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Blendman974/faceclaw#11