Halthy - an iPhone app to sync Apple Health & Workouts directly to HA - with custom Integration and Workout log card

As someone interested in several sports, I like logging my workouts so I can look back and see my progress over time.

At first, I used apps like Strava and Komoot. They are good apps, but I didn’t like depending on another company’s cloud or paying another subscription just to work with my own data.

I already run Home Assistant and a home server, so I started wondering: could I use AI to help me build my own solution?

The original plan was simple: make a small iOS app for myself that automatically sends selected HealthKit data directly to Home Assistant through its API. Then I could use Home Assistant to store, display, and analyze everything.

I’m an engineer, but not a software engineer, so it took quite a bit of time. The small personal project also became much bigger than expected.

The result is Halthy.

Halthy connects Apple Health with systems you control. You choose which health metrics and workouts it can read, and the app sends them directly from your iPhone to your own Home Assistant or InfluxDB instance.

There is no Halthy account, no Halthy cloud, and no external server in the middle. I cannot see your health data, workouts, or routes. The app also has no advertising, analytics, or tracking SDKs. Access tokens are stored in the iPhone Keychain, and connections to your server use HTTPS.

Halthy also has its own Home Assistant integration. It creates sensors for your selected health data and includes a workout dashboard card. The card shows the workout route and main statistics, and it has a calendar-based selector for browsing previous workouts.

The integration also creates calendar entities. This makes it easy to see when you trained and view the main statistics for each workout, such as duration, distance, active energy, heart rate, speed, and cadence when that information is available.

Multiple users are supported. Each person has a separate setup and their own entities, workout calendar, and history. This can be useful for a partner or close family member who also chooses to share their data with your Home Assistant.

For longer-term tracking, the integration creates Halthy-specific historical statistics. These can be used to follow changes and build dashboards inside Home Assistant over time.

The connection works in both directions too. Halthy can read selected Home Assistant sensors and write their values into HealthKit after you give permission. For example, if you have a scale connected to Home Assistant that is not supported by HomeKit, you can import its weight readings into Apple Health.

Some other things Halthy can do:

  • Display health metrics, trends, sleep data, and workouts
  • Show workout routes on standard, satellite, or 3D maps
  • Replay a workout route
  • Add weather information to workouts
  • Create small workout-replay videos for sharing
  • Export data as PDF or CSV, with GPX export for workout routes
  • Upload workout maps and workout history to Home Assistant
  • Import selected Home Assistant sensor values into HealthKit
  • Send raw HealthKit samples directly to InfluxDB

InfluxDB support was important to me because Home Assistant entities mainly represent the current value. Halthy can import historical values into Home Assistant’s long-term statistics, but those statistics are grouped into hourly periods. This works well for long-term trends, but it does not preserve every individual HealthKit sample.

InfluxDB is the better option if you want raw, sample-by-sample data, longer history, or more detailed dashboards in tools like Grafana.

My main goal was to remove the middleman: my iPhone, my health data, and my server.

I originally built Halthy for myself, but I thought other Home Assistant users might find it useful too.

You can join TestFlight

To add an integration currently you need to add a custom repository to HACS or manually copy files. currently its pending for addition to HACS store.

I’d be interested to hear what you think, what data you would want to sync, and how you currently manage your fitness data.

This looks very good Mosher and I’m interested, but cannot add the integration. The mobile app works, connects to HA well. I added your custom repository, installed the integration in HACS but it just doesn’t show up among the actual integrations (cannot be added).
I installed it several times and restarted HA every time, still no joy.
Do you have an idea where should I look?

I just found the issue. HACS put your files two folders deeper than it should be:

config / custom components / halthy / custom components / halthy / files…

I copied all files from the last halthy folder into the root of the first halthy folder and now it works as intended.

1 Like

Thank you for pointing that out.
Fix is already deployed

1 Like

Hello. Just wanted to you let you know the camera to scan the QR code does not open proper. It opens for half a second, then closes.

I’d be interested to hear what you think, what data you would want to sync, and how you currently manage your fitness data.

Can we have a wake up time sensor?
For the height sensor, how to change to cm with no decimal?
Is body mass the weight? Can we have it as weight instead?

1 Like

Hey,

thanks for reporting.

What iPhone have you tested it on? All iPhones I have tested and used it works just fine.

Height and Weight I will fix in the next update.

Regarding the wake up sensor. All depends on what you exactly want to do with it. If you just want to have a time stamp when you woke up, I can add it. But a real time sensor to trigger anything within HA is almost not possible, unless first thing you do on wake up is unlock your phone. It is a limitation of iOS. Unless unlocked, background task run is really limited.

I am using iPhone 15+. The wakup sensor is just so I can track the time I wakeup. Didn’t realised the phone have to be unlock to record the timestamp. Though I am alway unlocking my phone the moment I wakeup to turn on my PC. The camera did work when I first installed testflight app a few days ago. There was an update to testflight a day ago. That was when the camera wouldn’t open. Not sure if it is related to your app.

I have a question regarding the workout display on halthy. Are you using apple watch to track your walk/run? I do have a series 3 apple watch but I don’t like wearing one. I started using the ringconn 3 smart ring for my metric. It can auto detect if you are walking or running so you can add the record. No walk workout has been display on the Halthy even if I manually add the walk exercise. Is it only limited to track on apple watch?