iobroker.garmin
v1.0.0
Published
Adapter for Garmin Connect
Readme

ioBroker.garmin
Tests:
garmin adapter for ioBroker
Adapter for Garmin Connect
Loginablauf
Die garmin connect Mail und Passwort eingeben.
Datenpunkt Filter (Allowlist)
Der Adapter erzeugt standardmaessig viele Datenpunkte. Mit der Allowlist koennen gezielt nur bestimmte Datenpunkte angelegt werden.
Filter Typen
| Typ | Beschreibung | Beispiel |
| --------------- | ----------------------------------------------- | ------------------------------------------ |
| Exact Keys | Exakte Uebereinstimmung nur mit Feldnamen | bmi findet jedes Feld namens bmi |
| Exact Paths | Exakte Uebereinstimmung mit vollstaendigem Pfad | weight.dateweightlist.bmi |
| Search | Teilstring-Suche in Key oder Pfad | heart findet heartRate, restingHeart |
Beispiele
Nur bestimmte Feldnamen (ueberall):
Exact Keys: bmi, weight, bodyfat, bonemassNur bestimmte Pfade:
Exact Paths: weight.dateweightlist.bmi, hydration.valueinmlAlles aus einem Bereich:
Search: heart, sleep, stressKombination:
Exact Keys: bmi
Exact Paths: hydration.valueinml
Search: sleepHinweise
- Filter sind case-insensitive (Gross/Kleinschreibung egal)
- Pfade werden mit Punkt getrennt:
dailysleep.dailysleepdto.sleepscores.overall.value - Wichtig: Pfade OHNE Array-Indizes angeben (z.B.
weight.dateweightlist.bmiNICHTweight.dateweightlist01.bmi). Die Indizes (01,02, ...) werden erst von ioBroker hinzugefuegt. - Leere Allowlist = alle Datenpunkte werden angelegt
- Leere API-Antworten erzeugen keine Ordner
Diskussion und Fragen
https://forum.iobroker.net/topic/59413/test-adapter-garmin
Garmin API Authentication (Developer Notes)
OAuth Credentials
Die OAuth1 Consumer Credentials sind in der Garmin Connect Mobile APK in der native library libsr.so versteckt.
Extraction:
# 1. APK von APKMirror oder APKPure laden (APKM/XAPK = Split APKs)
# 2. APKM umbenennen zu .zip und entpacken
# 3. Native library aus ARM64 Split extrahieren:
unzip split_config.arm64_v8a.apk lib/arm64-v8a/libsr.so -d /tmp/
# 4. Strings durchsuchen - alle Credentials sind kommasepariert in einem langen Block:
strings /tmp/lib/arm64-v8a/libsr.so | grep "apps.googleusercontent.com"
# Output enthält: google_client_id,google_secret,...,oauth1_key,oauth1_secret,GARMIN_CONNECT_MOBILE_ANDROID_DI,...| Credential | Value |
| ---------------------- | -------------------------------------- |
| OAuth1 Consumer Key | fc3e99d2-118c-44b8-8ae3-03370dde24c0 |
| OAuth1 Consumer Secret | E08WAR897WEy2knn7aFBrvegVAf0AFdWBBF |
| OAuth2 DI Client ID | GARMIN_CONNECT_MOBILE_ANDROID_DI |
Alternativ von garth S3: https://thegarth.s3.amazonaws.com/oauth_consumer.json
Auth Flow (Mobile API)
- SSO Login:
POST https://sso.garmin.com/sso/signin-> Service Ticket (ST-xxxxx) - OAuth1 Token:
POST https://connectapi.garmin.com/oauth-service/oauth/preauthorized?ticket=ST-xxxxx-> oauth_token + oauth_token_secret (HMAC-SHA1 signiert) - OAuth2 Token:
POST https://connectapi.garmin.com/oauth-service/oauth/exchange/user/2.0-> access_token + refresh_token (Bearer) - Refresh Token:
POST https://connectapi.garmin.com/di-oauth2-service/oauth/tokenmitgrant_type=refresh_token&client_id=GARMIN_CONNECT_MOBILE_ANDROID_DI&refresh_token=... - API Calls:
GET https://connectapi.garmin.com/...mit HeaderAuthorization: Bearer {access_token}
API Endpoints
/userprofile-service/socialProfile/usersummary-service/usersummary/daily/?calendarDate=YYYY-MM-DD/wellness-service/wellness/.../activitylist-service/activities/...
Referenz
- garth - Python library for Garmin Connect
- Test-Script:
test-api.js(SSO Login + Token Exchange + API Test)
Changelog
1.0.0 (2026-01-15)
- fix login and add datapoint filter
0.2.0 (2025-03-02)
- rework login process
0.0.4
- (TA2k) fix installation problems
0.0.3
- (TA2k) initial release
License
MIT License
Copyright (c) 2022-2030 TA2k [email protected]
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

