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

Duplicate entries #99

Open
michaelknox opened this issue Jan 26, 2023 · 4 comments
Open

Duplicate entries #99

michaelknox opened this issue Jan 26, 2023 · 4 comments
Labels
enhancement New feature or request

Comments

@michaelknox
Copy link

Is there a way to have the app check if an entry has already been uploaded and then not upload if already present?

I have noticed that if you put a fromdate parameter in there it will re upload any values that were already present. Garmin doesn't seem to care.

@longstone
Copy link
Collaborator

Currently, there is no such prevention.

@longstone longstone added the enhancement New feature or request label Feb 7, 2023
@dhiltonp
Copy link

dhiltonp commented Feb 7, 2023

I looked at the way the chart is rendered in garmin connect, it hits 2 endpoints of note.

This is the first weight measurement of all time. I suspect there would also be an equivalent "last", which would be convenient.

https://connect.garmin.com/weight-service/weight/first

This is a call to get all measurements within a time range.

https://connect.garmin.com/weight-service/weight/range/2023-02-01/2023-02-07?includeAll=true

If I try to directly connect via session without any headers or cookies set (using the session returned by login), I get a 404.

If I set a get request header "DI-Backend": "connectapi.garmin.com", I get a 403.

If I add a get header "Authorization", I get a 401. That may be because I copied it from my web session into pycharm for evaluation.

The "Authorization" value is the "access_token" returned from https://connect.garmin.com/services/auth/token/refresh.

@dhiltonp
Copy link

dhiltonp commented Feb 7, 2023

To be clear, my thought is that the default behavior could be changed to auto-set the fromdate to the day after the most recent value in garmin connect.

@app4g
Copy link

app4g commented Oct 20, 2023

Yes you do and will see duplicate entries. Garmin seems to add in a "version" id even if it's for the same timestamped data. which is why there are duplicates.

However, what this means is that it will just clutter the "readings" if you export as CSV or the web list view will have multiple entries with the same data (same timestamp, same weight, same bp etc) But.. since they are all the same (for the day) it will be plotted as 1 entry.

Garmin plots the data as an average of the day's reading/entry

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants