Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Uploading using the GPX/TCX format #139

Closed
bobgott opened this issue May 3, 2023 · 4 comments
Closed

Uploading using the GPX/TCX format #139

bobgott opened this issue May 3, 2023 · 4 comments

Comments

@bobgott
Copy link

bobgott commented May 3, 2023

I'm hoping to get some insight into upload_activity() before I start my project. My goal is to update the value held by 'activityName', but I also understand that updating is not the main focus of garminconnect.

I think I can achieve my goal via download_activity() with the GPX or TCX format (it appears you can't download in FIT format), modify those fields that interest me, then upload the modified file via upload_activity().

Does this seem like a reasonable approach? Any merits one way or the other with regards to GPX/TCX format?

@bobgott
Copy link
Author

bobgott commented May 3, 2023

Well, I think my post wasn't well thought out. I now realize that uploading a previous activity that I have downloaded ... just creates 2 duplicate activities. (oops).

I'll keep this open for a couple of days hoping that someone will know how to update Garmin .. otherwise I'll close it or @cyberjunky .

@dan-p-p
Copy link

dan-p-p commented May 5, 2023

Hi @bobgott,

Having played with this myself a bit, not uploading, but downloading, it is worth knowing that the info you can download from Garmin via their API comes in two separate entities (formats):

  1. Garmin FIT files --> These are essentially the raw activity data, similar to a GPX/TCX file
  2. Activity "Metadata" --> Come as a JSON and contain additional information about your activity, like its name, notes etc.

Both can be downloaded and read via this library: https://github.com/petergardfjall/garminexport. The activity name is in the JSON file in a field called 'activityName'.

I don't know about UPloading info to Garmin Connect via the API, not sure if that is possible, but in case it is, you'd need to be manipulating the JSON file that contains the activity metadata, changing the activityName field and uploading. As it is in a JSON, parsing/modifying is straightforward enough.

Hope this helps,
Daniel

@bobgott
Copy link
Author

bobgott commented May 6, 2023

@dan-p-p
I think I have a handle on the download formats (thank you) .. but my intent was to change data in Garmin so my local DB can have a 2-way sync w/Garmin. Doing some scans on other python Garmin GitHub repositories, that does not seem the case.

I fear my goal might be a lost cause.

@cyberjunky
Copy link
Owner

Closing since it has become stale, if someone has new information please open a ticket.

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

No branches or pull requests

3 participants