Apple Health Data for Self-Hosters: Grafana, Home Assistant & a Private REST API
Use your Apple Health data in Home Assistant, or keep your history on a server you run for Grafana and your own scripts. Direct Home Assistant delivery requires Pro and a reachable Home Assistant instance, with no additional receiving server. HealthSave Observatory is an optional server route for stored history, Grafana, and a private read API. You choose the destination; HealthSave does not host a backend.
The pipeline, end to end
Choose the route that fits your setup:
iPhone (Apple Health)
└─ HealthSave Pro
├─▶ direct Home Assistant delivery
│ → your HA entities
└─▶ optional Observatory server
→ stored history
├─▶ Grafana panels
└─▶ private read API
Background delivery is best-effort; neither route has a guaranteed interval. The app reads HealthKit on your iPhone and sends data to the endpoint you configure. Home Assistant receives entity updates directly. For stored history and SQL queries, you can run the optional Observatory server.
Choose your delivery route
For Home Assistant, open Settings → Integrations → Home Assistant, enable the integration, enter your Home Assistant URL, pick REST States under Delivery, and paste a Long-Lived Access Token. A tokenless Webhook delivery option posts one JSON snapshot event instead of per-entity updates. The linked Home Assistant guide below covers setup and delivery checks. For the Observatory route, run the backend, open Settings → Self-Hosted Analytics → Server Sync, and configure its Server URL.
- Your endpoint must be reachable from your iPhone.
localhoston the phone does not address your Home Assistant instance or another machine running Observatory. - Background delivery has no guaranteed interval; iOS may delay it for hours. Design downstream dashboards and automations to handle missing or stale values.
Optional backend: HealthSave Observatory
Choose this route if you want a database for your history, Grafana, or a private read API. The optional companion project, HealthSave Observatory (the datahub project), is open-core: the protocol and SDK layers are open source, while the self-hosted server core is source-available under Elastic License 2.0. You can self-host it freely on a laptop, NUC, Mac mini, Synology, or a Proxmox VM. It's a FastAPI + TimescaleDB stack you bring up with Docker, and it ships Grafana dashboards out of the box plus a private read API.
The released iOS app sends Observatory batches to POST /api/v2/apple/batch and falls back to POST /api/apple/batch if the server returns 404 or 405. If you build your own receiver, match the supported protocol version; the protocol/client layer uses the permissive Apache-2.0 license.
There is no hosted backend. If you choose Observatory, you run and maintain the server, the database, backups, and any reverse proxy yourself. Direct Home Assistant delivery does not need Observatory. For a file instead of an integration, use the standalone export workflow (CSV/JSON to a file).
Grafana panels over your own history
Once data lands in TimescaleDB, the bundled Grafana dashboards give you SQL-backed exploration: resting heart rate over months, HRV trends, sleep duration, steps, your real longitudinal record, not a 90-day window. Because it's your Postgres, you can write your own panels and queries against it.
Home Assistant entities and nonessential automations
HealthSave Pro sends health metrics directly to your self-hosted Home Assistant instance using POST /api/states/<entity>. A successful connection test does not prove that a sensor received an update. Check the entity and its measurement and push timestamps before using its value.
A recovery-aware morning scene could use last night's resting HR and HRV to adjust lighting when you get up. If values are missing or stale, fall back to your normal nonessential scene. Do not use this path for anything safety-critical, alarms, or sub-minute triggers.
REST export and a private read API are separate
Pro-gated REST export sends JSON via POST to an endpoint you configure. Your endpoint receives the data; the iOS app does not provide a query server. The optional self-hosted Observatory backend supplies the private read API for scripts and notebooks. Buying Pro does not create or host that backend.
What's free vs Pro for this workflow
| Capability | Tier |
|---|---|
| On-device dashboard, CSV/JSON export | Free |
| 7-day export history | Free |
| Background auto-sync to your server | Pro |
| REST export to a configured endpoint | Pro |
| Home Assistant integration | Pro |
| Full 30/90-day trends, PDF, unlimited export history | Pro |
Pro is a one-time purchase with Family Sharing and no subscription. Check the App Store for current pricing. You provide and maintain any Home Assistant instance or optional backend you connect.
Honest limits for this audience
- You run the destination. Direct Home Assistant delivery uses your existing reachable instance. If you choose Observatory, budget time for its server setup, backups, and any reverse proxy. HealthSave offers no managed backend.
- Background sync is best-effort. iOS may delay delivery for hours. Check freshness and provide a fallback; do not rely on it for real-time triggers.
- iOS only today. An Android Health Connect app is in internal testing on Google Play and is not publicly released.
- HealthSave Observatory is open-core: protocol and SDK layers are Apache-2.0 open source; the server core is Elastic 2.0 source-available.
- Accuracy depends on your wearable. The pipeline faithfully moves whatever your device recorded; it doesn't validate sensors.
HealthSave is not a medical device. It is for informational purposes only and does not diagnose, treat, cure, or prevent any disease or condition. Privacy claims of zero data collection apply to the iOS app; self-host sync sends your data to your own server.
Related guides
- Build a custom REST API over your Apple Health data, the endpoints, curl examples, and how to write your own receiver.
- Store Apple Health in your own database, the TimescaleDB destination in detail.
- Receive Apple Health as a webhook, POST batches to your own endpoint.
- Apple Health to InfluxDB, the honest forward path from TimescaleDB.
- Apple Health to Prometheus, an exporter for current health gauges.
- Put your Apple Health history into Grafana, SQL-backed dashboards over your full record.
- Publish Apple Health metrics over MQTT, fan out to Node-RED, Home Assistant, and custom subscribers.
- Send Apple Health metrics directly to Home Assistant, the HA setup and freshness checks in detail.
- Back up 10+ years of history, give your homelab a real longitudinal record.
- Apple Health's export is unusable XML, get real CSV instead.
- How HealthSave handles your data, what leaves the device and what doesn't.
Get HealthSave
Download free and try the on-device export. Unlock Pro when you're ready to connect Home Assistant or send data to an endpoint you run.
Download HealthSave on the App Store
Setting this up for more than one person? See HealthSave Pro for a team or a group of testers.