Garmin Connect

by Tareq Alansari
5
4
3
2
1
Score: 41/100

Description

Garmin Connect, rebuilt inside Obsidian: sync your Garmin health and activity data into your vault and browse it in Garmin-style pages. Unofficial; not affiliated with Garmin.

Reviews

No reviews yet.

Stats

3
stars
292
downloads
0
forks
20
days
1
days
1
days
43
total PRs
1
open PRs
2
closed PRs
40
merged PRs
3
total issues
1
open issues
2
closed issues
198
commits

Latest Version

2 days ago

Changelog

Added

  • Share an activity. Share, under an activity's figures, turns it into a picture, as Garmin's app does. Pick Full Portrait (9:16), Vertical (4:5) or Square (1:1), swipe through Rings, Map, Topographic and TRANSPARENT, and on a phone send it from the share sheet or save it to your photos. Save puts it in your vault. Share activity… opens it for the activity on screen. See An activity's page.

Fixed

  • An activity's map prints whole in a PDF. Export to PDF cropped an activity card's map, and on a phone could leave out its tiles. The card now prints its whole route on its map, sized to the page. See A note as a PDF.

All features from 2.0.0-beta.1 as well

README file from

Github

Garmin Connect for Obsidian

Garmin Connect inside Obsidian. Sync all your Garmin health, performance and activity data into your vault, and browse it on the built-in dashboard. Compatible on desktop and mobile.

Latest release CI Obsidian Platforms: desktop and mobile License: MIT

Install · Guide · FAQ · Troubleshooting · Contributing

[!IMPORTANT] This plugin is not affiliated nor endorsed by Garmin.

Features

  • Pages: As of now, we have pages for home, activities, health stats and performance stats. Most of these have the full stats details. For anything missing that you think could be a bug or should be included, please submit a bug report or feature request.
  • You own the data: plain JSON files hold your synced data. This means you can look at stats even offline!
  • Garmin cards in your notes: a garmin code block shows Home's cards, a stat page's charts or an activity with its route map in any note, for that note's day: last night's sleep in your daily note, a week of stress in your weekly review, today's run in your workout journal. Insert card… adds one, and the plugin can write a daily note template and a guide to every card. See Garmin cards in notes.
  • Share an activity: Share turns an activity into a picture in Garmin's style, in Stories, portrait or square shape, to send from your phone or save in your vault. A note with an activity's card exports to PDF with its map. See An activity's page.
  • Privacy and security: we respect your privacy and security. This plugin never stores your password, instead storing your session as a refreshToken in Obsidian's Secret Storage. Learn more about how this plugin handles security here.

Planned features

  • AI Coach/advisor: Users can opt-in and use a pre-configured or custom-configured model to analyze their data. paste a model API key or enter an Ollama base URL.
  • Customizable layouts & theming: The ability to customize layouts and component styles. This plugin hasn't yet been tested with popular themes. Please feel free to contribute some design ideas in feature request - ideally pair it with a visual.
  • More charts in notes: Performance Stats' trends (VO₂ Max, Training Load, Endurance Score and more), inline values and week and month notes.

[!TIP] Have any ideas? Please send a feature request or learn how to contribute.

A closer look

How it works

The plugin signs in to Garmin Connect, syncs your data into plain JSON files in your vault, and draws Garmin's pages from those files. So the pages open offline, on every device your vault syncs to.

flowchart LR
  garmin["Garmin Connect"] -->|"sync"| plugin["The plugin"]
  session["Session in Obsidian's keychain"] --- plugin
  plugin -->|"writes JSON"| folder[("Garmin/data in your vault")]
  folder -->|"read by"| pages["Home, Activities, Sleep, Health and Performance Stats"]

Install

Install the plugin from Obsidian's community plugin directory. Requires Obsidian 1.13.0 or later.

  1. In Obsidian, open Settings → Community plugins and choose Browse.
  2. Search for Garmin Connect, then choose Install and Enable.

For beta releases through BRAT, manual installation or building from source, see the installation guide.

Get started

Enabling the plugin opens a setup over Home:

  1. Sign in to your Garmin account. Multi-factor authentication is asked for in the same dialog.
  2. Scan: a few requests find where your Garmin history starts.
  3. Download all of it: the setup recommends your whole history and shows its size and how long it takes. It downloads in the background and carries on after a restart. Advanced options lets you keep less.

After that it syncs on its own when Obsidian starts and when you open Home, and Home's ↻ button syncs whenever you like. The Guide covers every page and command.

Storage

Everything is plain JSON in one data folder, Garmin/data by default. How much room it takes depends on how much history you keep. A year of data may vary for individuals, but should be around 50 MB per year on average.

[!IMPORTANT] With Obsidian Sync, turn on Sync all other types so the JSON reaches your other devices.

Privacy and network use

  • Sign-in flow. The plugin signs in the way Garmin's mobile app does. Your password is used for the sign-in and never stored, and the session stays on the device, in Obsidian's keychain, never in the vault.
  • API Calls at sso.garmin.com, diauth.garmin.com and connectapi.garmin.com (or their garmin.cn counterparts), to sign in and to fetch your data.
  • Automatic syncing. The plugin syncs on its own when Obsidian starts and when you open Home, once the last sync is 15 minutes old or from an earlier day; when nothing changed on Garmin, that takes two requests. Turn off Sync automatically in the settings to sync only when you ask. The history download you agree to in the setup also runs in the background.
  • Activity maps draw OpenStreetMap's map under an activity's route, from tile.openstreetmap.org. That server sees which part of the map you open, roughly where the activity was, and each request names this plugin. Turn Map tiles off in the settings, and the route is drawn on its own with no request at all.
  • tls.peet.ws is asked what your connection looks like, but only when you run the network check in Run diagnostics.
  • There is no telemetry and no analytics.
  • Outside the vault it keeps only the session, a few local-storage keys and a cache of map tiles, on each device.

What is stored where, and how it is redacted, is in Security.

Feedback and support

Documentation

Using the plugin
Installation Community plugins, BRAT betas, by hand, a second device, from source
Guide setup, syncing, what to keep, every page and command
Troubleshooting problems by symptom, and the diagnostics
FAQ short answers
Settings every setting and what it does
Data reference every file and key the sync writes
Security what is stored, what leaves your device, reporting a vulnerability
Working on the plugin
Contributing branches, releases, data versions, local development, writing docs
Architecture how the system fits together, with diagrams
Building pages how the pages inside Home work, and how to add one
Garmin API every endpoint called, sign-in, and the request budget
API catalogue the full endpoint list, the recorded shapes and the daily check
Changelog what changed in each release

Acknowledgements

  • Garmin Health Sync: the inspiration for the project, and I believe the first Garmin–Obsidian plugin. I took a lot of its ideas, like file properties on daily notes, but wanted headless sign-in, cross-platform support and data visualisation. I started by seeing if headless authentication was possible and kept building from there.
  • cyberjunky/python-garminconnect: an actively maintained Garmin Connect library that saved a huge amount of reverse-engineering work.
  • Lucide (ISC): the watch in the logo and the ribbon icon, and the plugin's other icons, through Obsidian.
  • Tabler Icons (MIT): the sport figures on the Activities pages.
  • Leaflet (BSD-2-Clause): the activity maps, bundled with the plugin.
  • OpenStreetMap: the map under a route, © OpenStreetMap contributors, available under the Open Database License.

License

MIT © Tareq Alansari.

Not affiliated with or endorsed by Garmin. Garmin, Garmin Connect, Body Battery and the other Garmin names are trademarks of Garmin Ltd. or its subsidiaries.