Commit Graph
14 Commits
Author SHA1 Message Date
Gideon ZenzandJosé Rebelo 2e5a77e541 Add missing Health Connect permissions and WORKOUTS data type
- Add PERMISSION_WRITE_EXERCISE_ROUTE import to HealthConnectPermissionManager
- Include ElevationGainedRecord, PowerRecord, SpeedRecord, and ExerciseRoute permissions in requiredHealthConnectPermissions
- Add WORKOUTS enum to HealthConnectDataType with comprehensive permission mapping
- Handle WORKOUTS branches in HealthConnectUtils when expressions for exhaustiveness
2026-01-03 15:03:21 +01:00
Gideon ZenzandJosé Rebelo aea638d4be Adding HealthConnect sync for:
Body Temperature
    Skin Temperature
    Distance
    Exercise
    Heart rate
    Heart rate variability
    Oxygen saturation
    Sleep
    Steps
    Total calories burned
    VO2 max
    Weight

The feature is configurable via Settings->External Integrations->Health Connect

Based on https://codeberg.org/LLan/Gadgetbridge

Kudos to LLan for the preliminary work!
2026-01-03 15:03:21 +01:00
Gideon ZenzandJosé Rebelo 40137ef9e7 Ignore devices that don't support HRV measurements 2025-12-20 19:07:34 +01:00
Gideon ZenzandJosé Rebelo 3b4b7292c3 Invalidate HRV cache based on latest sample timestamp
Query latest HRV sample to invalidate also yesterday if needed
2025-12-20 19:07:34 +01:00
Gideon ZenzandJosé Rebelo 68f12ea92e Invalidate HRV summary cache when new data arrives
Add HrvCacheInvalidationReceiver to listen for ACTION_NEW_DATA broadcasts and invalidate the computed HRV summary cache for the current day.
2025-12-20 19:07:34 +01:00
Gideon ZenzandJosé Rebelo 9ef4942102 Add HRV summary computation for Huawei devices
Uses ComputedHrvSummarySampleProvider to generate HRV summary statistics
from per-minute HRV values stored by Huawei devices.
2025-12-20 19:07:34 +01:00
Gideon ZenzandJosé Rebelo ca532a6350 Implemented a static, thread-safe LRU cache that persists across provider instances: 2025-12-20 19:07:34 +01:00
Gideon ZenzandJosé Rebelo 290379a462 - Use SleepAnalysis for last night HRV calculation
- remove ColmiHrvSummarySampleProvider
2025-12-20 19:07:34 +01:00
Gideon ZenzandJosé Rebelo 0c7a2c3960 Adding Yawell Rings 2025-12-20 19:07:34 +01:00
Gideon ZenzandJosé Rebelo 8c0b8934ee Require minimum 7 days of overnight HRV data before calculating baseline status to prevent unreliable POOR status in first few days 2025-12-20 19:07:34 +01:00
Gideon ZenzandJosé Rebelo 9df32ad1ac Generic provider creation
Garmin algorithm implementation
POOR status addition
Caching for performance
Application to both Huami and Ultrahuman devices
2025-12-20 19:07:34 +01:00
Gideon ZenzandJosé Rebelo c0f5da073e Add HRV summary computation for Huami/Zepp OS devices
Implements HuamiHrvSummarySampleProvider to compute HRV summary statistics
on-demand from per-minute HRV value samples. Calculates weekly averages,
last night values, baselines, and HRV status (LOW/UNBALANCED/BALANCED).

This enables full HRV dashboard and status screen functionality for devices
that only provide raw HRV measurements without pre-computed summaries.

- Created HuamiHrvSummarySampleProvider with computed summary logic
- Added getHrvSummarySampleProvider() override in HuamiCoordinator
- Computes 7-day rolling average, last-night stats, and 14-day baselines
- Works retroactively with existing historical HRV data
2025-12-20 19:07:34 +01:00
Gideon ZenzandJosé Rebelo d10ad8b650 Finalizing device temperature and adding device location implementation 2025-10-20 00:38:34 +02:00
Gideon ZenzandJosé Rebelo d869eae55c Add DeviceKind (#5382)
Adding DeviceKinds to DeviceCoordinators as introduced by https://codeberg.org/Freeyourgadget/Gadgetbridge/pulls/5346

Reviewed-on: https://codeberg.org/Freeyourgadget/Gadgetbridge/pulls/5382
Co-authored-by: Gideon Zenz <gzenz@gmx.de>
Co-committed-by: Gideon Zenz <gzenz@gmx.de>
2025-09-23 23:23:20 +02:00