-
-
Notifications
You must be signed in to change notification settings - Fork 134
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
Steps data not working #168
Comments
|
Thanks for your quick response!
The web UI shows 17.843 steps for 2022-10-18 though. |
I have the same issue for 2022-10-18. Can you try a more recent date like 2023-10-01? |
weekly works though: api.garth.connectapi('/usersummary-service/stats/steps/weekly/2022-10-18/52') |
daily also works for me: api.get_daily_steps('2022-10-01', '2022-10-28') It looks like the issue is when you want to get the granular data for an individual day. |
Figured it out ... You can do the following:
resp = api.garth.post('connectapi', '/wellness-service/wellness/epoch/request/2022-10-18', api=True)
resp.json() Response: {'userProfilePk': 2591602,
'calendarDate': '2022-10-18',
'status': 'SUBMITTED',
'source': 'USER',
'ghReloadMetaData': '',
'createDate': '2023-10-16T17:49:56.980',
'deviceList': [{'deviceId': 3329978681,
'deviceName': 'fēnix® 6X - Pro and Sapphire Editions',
'preferredActivityTracker': True}]}
api.get_steps_data("2022-10-18") In other words, this is not a garminconnect or Garth issue. It has to do with how Garmin handles old data. This issue can be closed as it has instructions to:
HTH! |
@cyberjunky not sure if you want to add the following endpoint: api.garth.post('connectapi', '/wellness-service/wellness/epoch/request/2022-10-18', api=True) See the conversation above for context on what it does. |
Thanks, would appreciate if the endpoint could be added |
Lets keep open so I won't forget to add it ;) |
|
@cyberjunky created the PR #174 with tests Here's how it works: def test_request_reload(garmin):
garmin.login()
cdate = "2021-01-01"
assert sum(steps['steps'] for steps in garmin.get_steps_data(cdate)) == 0
assert garmin.request_reload(cdate)
# In practice, the data can take a while to load
assert sum(steps['steps'] for steps in garmin.get_steps_data(cdate)) > 0 |
Hi, did Garmin change the url for steps data?
Neither one of these work:
json = api.get_daily_steps("2023-01-01", "2023-10-01")
Throws garth.exc.GarthHTTPError: Error in request: 400 Client Error: Bad Request for url: https://connectapi.garmin.com/usersummary-service/stats/steps/daily/2023-01-01/2023-10-01
json = api.get_steps_data("2023-10-17")
Returns an empty list.
On https://connect.garmin.com there is step data for 2023-10-17.
Other routes like get_weigh_ins work and return data.
The text was updated successfully, but these errors were encountered: