Universal Webhook Integration
Universal Webhook Integration
This integration allows you to sync health data from any third-party app or custom script that supports sending HTTP POST webhooks.
Instead of relying on cloud polling, this integration works entirely locally by receiving data directly.
Supported Payload Parsers
Because different apps send their webhook data in different JSON formats, you must select the correct "Parser" when configuring this integration.
1. Life Dashboard Companion App (Health Connect)
Highly Recommended for Android Users! This parser perfectly maps the extensive JSON payload generated by the open-source Life Dashboard Companion App.
By installing that app on your Android phone, you can securely sync all data from Google's Health Connect (which aggregates data from Samsung, Oura, Garmin, Fitbit, Xiaomi, etc.) directly into Health Assistant!
How to setup:
- Generate an HTTPS tunnel to your local backend using
pinggyorlocaltunnel(since modern Android blocks cleartext HTTP). Example:ssh -p 443 -R0:localhost:8000 a.pinggy.io - Select the "Life Dashboard App" parser in the Health Assistant integration settings.
- Click "Get Webhook URL" under Actions.
- Open the Life Dashboard Android app.
- In the Health Connect Webhook section, paste:
https://<YOUR_TUNNEL_URL>/api/v1/integrations/webhook/webhook/YOUR-UUID
2. Basic Payload
Use this for custom Python scripts, Tasker, or Macrodroid. It expects a very simple flat JSON structure.
{
"type": "heart_rate",
"value": 75,
"timestamp": 1678886400000
}Note: timestamp is optional (expects milliseconds). Valid types are heart_rate, steps, and weight.
3. Home Assistant Format
Use this if you are using an app like Notify for Xiaomi/Amazfit that attempts to mimic the Home Assistant state-change API.
{
"entity_id": "sensor.miband_heartrate",
"state": "75"
}4. Custom JSONPath Parser
If you are sending data from an obscure app or script that uses a unique JSON format, you can use the Custom parser.
When selecting this parser, you must provide a valid JSON mapping configuration in the text box. The integration uses JSONPath syntax to extract the exact values you want from the incoming webhook.
Example Custom Mapping Configuration:
{
"heart_rate": {
"value_path": "$.health.vitals.bpm",
"timestamp_path": "$.time_recorded",
"timestamp_format": "iso8601"
},
"steps": {
"value_path": "$.activity.daily_steps",
"timestamp_path": "$.timestamp",
"timestamp_format": "unix_ms"
}
}Supported Timestamp Formats:
iso8601: e.g., "2024-01-01T12:00:00Z"unix_s: Unix timestamp in secondsunix_ms: Unix timestamp in milliseconds
Security
Every webhook is assigned a secure, unique UUID (e.g., /api/.../webhook/550e8400-e29b-41d4-a716-446655440000). Keep this URL secret, as anyone with the URL can push data to your profile.