All integrations
Built, in the next release

Xiaomi data, in your own stack.

Xiaomi publishes no health API, so Open Health Sync reads Xiaomi data through two official paths the user controls: the Mi Fitness data copy for the full history, then Health Connect or Apple Health for what comes after.

Source
Bands and watches
How the data arrives
Data copy from the Xiaomi account privacy center, imported with ohs import mi-fitness to POST /v1/ingest/xiaomi; ongoing data through Health Connect (Android) or Apple Health (iPhone).

What it collects.

Each record maps to the same model as every other source, with the provider, source and device it came from.

  • Heart rate and resting heart rate
  • SpO2
  • Steps, distance and active energy
  • Weight and body fat
  • VO2 max
  • Sleep with stages
  • Workouts

How it works.

  1. 01

    The user requests a copy

    From the privacy center of their Xiaomi account, the user asks for a copy of their Mi Fitness data. It arrives by email as CSV files.

  2. 02

    You import it

    ohs import mi-fitness uploads the whole history to POST /v1/ingest/xiaomi. After that, Health Connect or Apple Health carries the new data.

  3. 03

    You read one model

    Raw files are kept, records are normalized and served over REST, MCP and FHIR R4.

Before you start.

  • Nothing to register with Xiaomi: the user requests a copy of their Mi Fitness data from their own Xiaomi account, and it arrives by email.
  • The copy holds the full history. Importing it again stores nothing twice: rows already stored are updated in place.
  • Mi Fitness, Mi Health and Zepp Life records in Health Connect keep Xiaomi as their source.
  • No private or reverse-engineered Xiaomi API is used, and the server never holds Xiaomi credentials.

Set it up.

Ask the user for the Mi Fitness copy from their Xiaomi account, then import it with the ohs command line. The guide has every step. This connector is on main: build from source until the next release.

Terminal
# The Mi Fitness copy from the user's Xiaomi account, a folder or a zipexport OHS_URL=$OHS OHS_TOKEN=ohs_ut_...   # a user token with the upload scopeohs import mi-fitness ~/Downloads/MiFitness --dry-run   # count firstohs import mi-fitness ~/Downloads/MiFitness# Read what came incurl -s "$OHS/v1/users/$USER_ID/samples?type=heart_rate" -H "Authorization: Bearer $KEY"

Questions.

Can I use Xiaomi with Open Health Sync today?

Not in a release yet. The connector is built and merged on main, and comes in the next release. You can build from source to try it now.

Do I need anything from Xiaomi?

Nothing to register with Xiaomi: the user requests a copy of their Mi Fitness data from their own Xiaomi account, and it arrives by email.

Where does the data go?

Only to the server you run. Open Health Sync is self-hosted software, not a service: no account with us and no call home. Each user can be deleted with one call, raw files included.