Cadence - Health App

A personalized Health App.

It started with the release of the new Google Health App and therefore the replacement of the Fitbit and Google Fit App.
I was looking forward to a centralized hub that gathers all my Health Data in one sleek UI.
Sadly the App sucks, was probably Vibe Coded and is simply incapable of pulling data from Garmin Connect even if Garmin Connect pushes to Android Health Connect or at least it is buggy and not worth trying. Funny enough Google Fit had no such issues.
So then I was like: "Pff what Google can do I can do too".
So I used this frustration and motivation to create my first vibe coded project to see what these Coding Agents can do and to also have to learn how to work with them for my career and actually for my several ideas floating in my head.

At first the results were mediocre, fundamentally broken math and UI that was quite frankly awful.

***USE OLD SCREENSHOTS OF UI***

Slowly and after over 450 commits I got to a point where not only it works, it actually works really good to the point that I can trust Cadence and it reflects my body state.

UI and UX were done in careful consideration what I want (and maybe other people) I took inspiration from Whoop and Bevel and streamlined it for my needs.
Cadence pulls from Garmin Connect via a unofficial reversed engineered API based on python-garminconnect by cyberjunky.
Don't get me wrong the Garmin Connect App is great but it simply is not really great in showing all the Metrics in a nice and clean way. My "buddy" Claude and I tried to change that.

High Nocturnal Movement Calibration

Additionally Cadence has a feature I wish commercial offerings would have.
People with ADHD and maybe other Neurodivergent People experience something called High Nocturnal Movement in Sleep, this causes common sleep tracking algorithms to punish sleep quality because they wrongly think that High Movement are automatically High Restlessness phases and reduce for example REM phase estimations. I tried to implement a calibration value based on a trailing baseline of expected Restlessness.
It works and the score better reflects how I feel after I woke up.

Energy & Stress

Energy and Stress calculations are handled solely by Cadence, a Proxy Value for Heart Rate Variability(HRV) and Resting Heart Rate (RHR).
Getting a real HRV Metric is still necessary, usually on modern Garmin Watches this comes as an additional Sleep Metric together with Pulse, SpO2 and others. The Venu 2 Plus Im using doesnt have that yet but luckily we can utilize the Health Snapshot Feature where the watch is recording health metrics from a 2 minute window, yes even HRV. Using this Snapshot after around 1 hour after wakeup gives us a close enough estimate of our HRV state. Over the day we can make Snapshots to further push the HRV Proxy to a better predicted value.

The HRV Proxy is calculated based on an imprecise Heart Rate sampling rate of 1 Sample every 2 Minutes, based on HRV differences from our baseline over the day and the resting heart rate from sleep we can estimate a stress metric that drains our Energy Metric.
Dialing this in was probably the most work in Cadence.
Cadence also uses Respiratory Rate to further enhance the precision of the Stress estimation.
Pulse, HRV and Respiratory Rate are in a Dynamically weighted system, if one of these metrics are not avialable we change the weighting of the others to always have a valid stress window.


co-created with AI badge