It’s always bothered me that fitness data is siloed in various apps and platforms and from what I’ve seen there is no automated self-hosted solution for such data.
Thus, when you change hardware, app or mobile platform, all your history goes down the tubes unless the platform you’re going to has some bilateral agreement with your current platform and, even then, it’s likely that not all sensors/data types are supported.
Thus, HA to the rescue!
With HA, InfluxDB & Grafana, your fitness history can live forever, as even if you change a platform you can just rename the new entities that get created, thus ensuring continuity in the graphs.
Here’s what I did for Android, I’ll keep it short for now and expand it as requested or as new hardware/software solutions become available:
If you don’t want to go down the custom component route, there seem to be only 2 integrations that provide consistent fitness data in HA: Withings & Fitbit. Thus, the hardware that you use should either come from them, or have data importable in their apps (Health Mate & Fitbit, respectively).
Although Withings wearable devices can monitor steps, the Withings integration doesn’t have this (a feature request for the HA integration exists, as the API does seem to expose steps), so for now Fitbit seems to be the only (native) game in town for getting your daily step count automatically imported.
Withings you can setup simply via the native integration and will provide many data points, depending on your hardware:
- the scales provide weight, bone mass, fat mass & ratio, muscle mass & pulse wave velocity
- the thermometer provides body temperature, skin temperature & ambient temperature when the reading was taken
- the blood pressure monitor provides diastolic blood pressure, heart bpm (but obviously only at the time of the reading) & (I think) SP02 (also only at the time of the reading)
- the under-mattress sleep analyzer provides a whole bunch of sleep data, too many sensors to list (will update this when I eventually get one)
Fitbit provides the data listed in Fitbit - Home Assistant (home-assistant.io)
A very important element is the Health Sync - Apps on Google Play app (free to try for a week, 3 EUR for a lifetime license), which can send data from pretty much any major fitness ecosystem like Google Fit, Samsung Health, etc. into Fitbit. This resolves the issue of steps & distance (as well as sleep & weight data if not using Withings hardware), but unfortunately lacks the option of importing heart rate data into Fitbit. Apparently, Fitbit doesn’t allow either import or export of heart rate data from their app, so if you want constant heart rate data from Android natively in HA, the only way to go is to buy a Fitbit wearable with a heart rate tracker.
Together, Withings & Fitbit can provide all the above-mentioned stuff to HA, which can then be added into InfluxDB & Grafana. How to setup InfluxDB & Grafana is outside the scope of this guide, but you can just use the generic instructions for installing them and simply select the entities exposed by the Withings & Fitbit integrations in order to get your graph on
For iOS Apple Watch data there seem to be 2 options:
- At step 5 above, connect the Apple Watch data to Strava and then Strava to Fitbit (free)
- Use Health Auto Export - JSON+CSV on the App Store (apple.com) , which apparently hooks into HA and sends the Apple Watch data (not free, still need to test it)
Hope this helps someone else also