Huawei Health smart home integration, free and open source

Huawei watches, bands and scales: steps, heart, SpO2, sleep and weight in Gladys.
Your Huawei Health account in Gladys: the health values of your Huawei watches, bands and scales (steps, heart rate, SpO2, stress, sleep, weight, body temperature), scene triggers and actions, and three dashboard widgets.
The integration reads the Huawei Health cloud through Huawei's official API, Health Service Kit. It never writes to your account. Your watch keeps syncing as usual through the Huawei Health app on your phone; Gladys then reads the cloud.
Before you start. Huawei only opens Health Service Kit to apps it has reviewed. You need your own (free) Huawei developer account and an approved app: plan about 10 working days for Huawei's review. The steps are below.
1. Create your Huawei app
- Create a developer account on HUAWEI Developers and complete the identity verification (individual or enterprise).
- In the Console, open HUAWEI ID → Apply for HUAWEI ID. Pick the
product type Server app (or Web app), create the product, and in
Callback URL enter the redirect URI Gladys shows under the Connect
button of the integration (by default
https://my.gladysassistant.com/redirect/oauth). - Note the App ID (Client ID) and the App secret (Client secret).
- In the Console, open Health Service Kit → Apply for Health Service
Kit, pick the same product and tick the read scopes of the data you
want, at least:
- Activity: Steps, Calories, Distance;
- Health: Heart rate, SpO2, Stress, Body temperature, Body fat (weight), Sleep. Fill in the application form Huawei provides (describe a personal home automation use) and submit.
- Wait for Huawei's e-mail (about 10 working days). The scopes become usable about 24 hours after approval.
Notes:
- The test approval allows up to 100 users: plenty for a household.
- Huawei states that individual developers only get the "basic" openness level and may be asked to publish a mobile app; if your application is refused for that reason, an enterprise developer account is the documented way out.
- Huawei only shares data generated after you link your account (no history before the authorization).
2. Configure the integration
- Open the Configuration tab of the integration.
- Enter the Client ID and Client secret.
- In Data to read, keep only what your app was approved for: Huawei refuses the connection when a scope was not granted.
- Optional settings: refresh interval (15 minutes by default, 5 minutes minimum), time zone (to know which day is "today"), daily step goal and the alert thresholds (high/low heart rate, low SpO2).
- Save, then click Connect and sign in with the HUAWEI ID used by your Huawei Health app.
- On your phone, in the Huawei Health app, open Me → Privacy management and allow data sharing with Health Kit (the Test the connection action tells you when it is missing).
3. Devices
Open the Discovery tab and add Huawei Health - <your name>. It holds one read-only feature per value:
| Value | Group |
|---|---|
| Steps, active calories, distance (today) | Activity |
| Heart rate, resting heart rate, HRV | Heart rate |
| Blood oxygen (SpO2) | Blood oxygen |
| Stress score | Stress |
| Body and skin temperature | Body temperature |
| Weight, body mass index, body fat | Weight |
| Sleep score, total, deep, light, REM | Sleep |
Huawei merges every device of the account (watch, band, scale, phone): the history survives a change of watch. A value your devices do not measure stays empty. The Test the connection action and the overview widget list the devices Huawei knows.
Actions
- Test the connection: checks the Huawei authorization and the privacy switch of the Health app, and lists your devices.
- Synchronize now: reads the Huawei cloud immediately.
- Sign out: deletes the Huawei tokens from Gladys. To fully revoke access, also remove the app from your HUAWEI ID (account settings → privacy).
Scene triggers
| Trigger | When | Variables |
|---|---|---|
| Night of sleep recorded | a new night reaches the cloud | sleep score, duration, deep sleep, wake-up time |
| Daily step goal reached | today's steps pass the goal (once a day) | steps, step goal |
| Abnormal heart rate | a new measurement crosses a threshold (filter: high/low) | heart rate, direction |
| Low blood oxygen | a new SpO2 measurement falls below the threshold | SpO2 |
| New weigh-in | a new weight reaches Huawei Health | weight, body mass index, body fat |
The first read after a restart is a reference point: it never fires a trigger.
Scene actions
- Synchronize Huawei Health: output
synced. - Get the health summary (option: synchronize first): steps, active calories, distance, heart rate, resting heart rate, SpO2, stress, weight, sleep score and duration, last sync time. Example message: "You slept {{sleep_minutes}} minutes, score {{sleep_score}}".
Dashboard widgets
- Huawei Health: steps, heart rate, SpO2, stress, sleep score and weight, with the account, the last sync and your devices, plus a Refresh button.
- Huawei activity: step goal gauge, active calories, distance and a chart of the last 7 days.
- Huawei sleep: last night's score and phases, fall-asleep and wake-up times, and the heart rate chart of the last 24 hours (needs the device created in Gladys).
Troubleshooting
- "Click Connect": the account is not linked, or the Client ID changed.
- Some data could not be read: the scope was not granted to your app, or was not ticked when you clicked Connect. Fix it in the Huawei console, then click Connect again.
- No data at all but "connected": allow data sharing in the Huawei Health app (Me → Privacy management), and wait for the watch to sync to the phone.
- "Authorization expired": the Huawei refresh token lasts about six months and dies when you change your HUAWEI ID password: click Connect again.
- Accounts registered outside Europe are served by another Huawei site: the integration finds it by itself.
Configuration settings
These are the settings Huawei Health asks for in its configuration screen in Gladys.
| Setting | Type | Required | Description |
|---|---|---|---|
| Your Huawei developer app | section | No | Huawei only shares Huawei Health data with apps approved for Health Service Kit. Create an app on HUAWEI Developers, apply for Health Service Kit with the read scopes of the data below (review: about 10 working days), declare the redirect URI shown under the Connect button, then enter the Client ID and Client secret here. The documentation link details every step. |
| Client ID (App ID) | string | Yes | OAuth 2.0 client ID of your app, in the HUAWEI Developers console. |
| Client secret | secret | Yes | OAuth 2.0 client secret of the same app. |
| Data to read | multi_select | No | Only tick what your Huawei app was approved for: Huawei refuses the connection when a scope was not granted. Click Connect again after a change. |
| Huawei account | oauth2 | No | Save the Client ID and secret first, then sign in with the HUAWEI ID used by the Huawei Health app. |
| Refresh interval (s) | number | No | How often the Huawei Health cloud is read (5 minutes minimum). Your watch syncs through the Huawei Health app on your phone. |
| Time zone | string | No | IANA time zone used to cut the days (today's steps) and show times. |
| Daily step goal | number | No | Fires the "Step goal reached" scene trigger and fills the activity widget gauge. |
| High heart rate alert (bpm) | number | No | |
| Low heart rate alert (bpm) | number | No | |
| Low blood oxygen alert (%) | number | No |
How to install Huawei Health in Gladys
- In Gladys, open Integrations: Huawei Health appears in the catalog, next to the native integrations, with a community badge.
- Click Install. Gladys pulls the Docker image (
ghcr.io/gboulvin/gladys-huawei-health:1.0.1), starts it in a sandbox isolated from the core, and generates the integration's interface (devices, discovery and configuration). - Open the Configuration screen of the integration, fill in the settings, and save.
- You can also install it directly from its repository URL: https://github.com/gboulvin/Gladys-Huawei-Health.
Huawei Health requires Gladys >=5.3.0. The catalog inside Gladys refreshes every hour, so a new version becomes available at most one hour after its release.
Not running Gladys yet? It is free and open source: follow the installation guide to get started.
About external integrations
Huawei Health is an external integration: a community integration packaged as a Docker container and published on GitHub, that Gladys installs in one click and runs in a sandbox isolated from its core. It is published and maintained by gboulvin, not by the Gladys core team.
- Browse all integrations, native and community
- Build and publish your own external integration
- Source code on GitHub — source of this documentation