Skip to content

Add Garmin connector - #1253

Open
AndyReifman wants to merge 4 commits into
thomaschampagne:developfrom
AndyReifman:feature/garmin_connector
Open

Add Garmin connector#1253
AndyReifman wants to merge 4 commits into
thomaschampagne:developfrom
AndyReifman:feature/garmin_connector

Conversation

@AndyReifman

Copy link
Copy Markdown

Adding the ability to sync activities from Garmin. Garmin doesn't expose a public API, but there is a python package called garminconnect, so I wrote a small python script that allows for authentication and syncing of activities.

I'm not super familiar with Typescript so I mostly duplicated what the Strava connector is doing with a few hacky bits here and there to make the Python code fit. I'm sure there are cleaner ways to accomplish what I've done.


A few caveats/notes

  • This has not been overly extensively tested. It has been working for me to sync new activities, but I haven't really tried any weird edge or corner cases. Additionally I've only tested syncing a small number of types of activities
  • This has all been done on a Linux machine. I do not have a Windows or Mac to test on. Theoretically it should work, especially on a Mac, but I'm not positive.
  • It uses the same duplicate activity logic as the other connectors so it should not overwrite/duplicate any activities you synced via Strava or file connectors
  • I added an option to use Garmin activity titles if you want (similar to how the Strava connector works), however, for now at least I am only replacing activities with the default activity name. i.e. Morning/Afternoon <activity type>

@codacy-production

codacy-production Bot commented Jul 28, 2026

Copy link
Copy Markdown

Not up to standards ⛔

🔴 Issues 4 medium

Alerts:
⚠ 4 issues (≤ 0 issues of at least minor severity)

Results:
4 new issues

Category Results
Complexity 4 medium

View in Codacy

🟢 Metrics 116 complexity · 4 duplication

Metric Results
Complexity 116
Duplication 4

View in Codacy

NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.

@thomaschampagne

Copy link
Copy Markdown
Owner

Hi @AndyReifman . Thanks a lot for this ! Wanted to do it for years.

I will take a look at it under the 2 next weeks !

Thanks ! I know it's huge !

@steffenr

steffenr commented Aug 3, 2026

Copy link
Copy Markdown

I was in search for exactly this feature, since i had been experimenting with the garminconnect library within another side playground "project".
Great to see, that you got it working @AndyReifman.

I just run a test build/ package with your branch the sync is working really fine for me.

Environment: MacOS 27.0 Beta (26A5388g)

  • Garmin Account with more than 2500 activities (mostly bike rides with lots of data to process)
  • Existing activities are being skipped correctly (those were previously imported from strava)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants