Health Check on GitHub → The app is open source (AGPL-3.0), runs on Nextcloud 31 and later and speaks English, German and Italian. Every screenshot here shows a made-up demo dataset, no real health data.
Why
I wear a Huawei Watch GT 5 Pro. It measures well, but the data sits in the Huawei Health app and there is no open API for private users. I wanted three things: to see my values over months, not just a week; a report I can take to the doctor; and heart rate, sleep and weight stored on my server, not in yet another cloud.
The trick: Huawei Health can write to Apple Health, and Apple Health can export everything as Export.zip. That file is the way into your own Nextcloud. It works with any watch that writes to Apple Health.
How the data gets in
- Once a week: Health app → profile picture → Export All Health Data → save to Nextcloud under
/Health/Import. - A background job checks the folder every 15 minutes and imports the file.
- Optionally every day: an Apple Shortcut sends the last 48 hours to the app as soon as the morning alarm is stopped.
The Export.xml inside the zip is often close to 1 GB. The app reads it with XMLReader one element at a time, without loading it into memory. An export with about 1.9 million records takes around 15 seconds and roughly 40 MB of memory. Importing again never creates duplicates: the days covered by the export are replaced.
Watch and phone are not counted twice
This was the trickiest part. Apple Health holds steps from the watch and from the iPhone. Adding them up gives fantasy numbers. Health Check keeps every value per source and per day and then takes the preferred source that has data: current Huawei account before an older one, watch before app, phone only on days without the watch. For sleep, a segment belongs to the night that ends on the wake-up day; overlapping segments are merged and nights under 30 minutes are ignored.

Three rings with open formulas
I did not want a “score” nobody can explain. Tapping a ring shows the formula:
- Sleep: 60 % duration (target 7.5 h), 25 % deep-sleep share, 15 % REM share; more than 60 minutes awake costs 10 points.
- Recovery: 70 % resting heart rate compared with your own 28-day median, 30 % blood oxygen.
- Movement: 60 % steps (target 8,000), 40 % active energy (target 400 kcal).
Early hints, never a diagnosis
The app only compares you with yourself, never with norms from the internet. A hint appears, for example, when the resting heart rate is 5 beats above your own average on two days, night-time blood oxygen drops clearly for three nights, or weight shifts by more than 3 % in 30 days. The wording is deliberately neutral. Health Check is not a medical device and does not replace a doctor.

The agent: small steps instead of wishful goals
If you walk 6,000 steps and aim for 12,000, you give up after a week. So the app computes a weekly target from the last four weeks that rises by at most 10 % (15 minutes for sleep, one workout) and never goes above your actual goal. Correlations, for example between a late bedtime and resting heart rate, are computed in code. The AI only narrates them and must quote numbers from the context.
Weekly report from n8n
After every import (and on Mondays at 07:00) the app calls an n8n workflow through a signed webhook (HMAC-SHA256, at most 5 minutes old). It fetches aggregates only, never single readings, lets an OpenAI-compatible model write a summary, three tips and a plan for next week, and stores the result as Markdown and HTML in /Health/Reports. Successful runs are not saved in n8n, so no health data stays in the n8n database. Without n8n, the server can write the report itself.
A one-page doctor report
For an appointment the app creates a printable A4 page for 30 or 90 days: resting heart rate, sleep, blood oxygen, weight, workouts, plus prepared questions. The report language is set separately, so it can be Italian for a doctor in Italy.

Privacy
- Every query is filtered by the logged-in user. Admins cannot see other people's data in the app either.
- The AI only gets weekly and monthly values, never raw data. The “Ask your data” chat is limited to 10 questions per hour.
- “Delete all my data” removes days, workouts, reports, chats and the calendar. Export as JSON or CSV works at any time.
- Any AI provider, including local Ollama. Without AI, rings, trends, hints and weekly tips still work.
Installation
tar xzf healthcheck-0.4.0.tar.gz -C /var/www/html/custom_apps/
occ app:enable healthcheck
The package is under Releases. The Nextcloud App Store request is in progress. If you run Nextcloud yourself, the Nextcloud check tells you first whether your version and patch level are current.
What is still missing
Honestly: many bike rides arrive from Huawei Health without distance, and the n8n report sometimes slips into jargon (“RHR”). Both are on the list. Bugs and wishes are welcome as a GitHub issue.
The second Nextcloud app from the same workshop is TimeGuardian: time tracking by QR code, the native version of my Timesheet Guardian.