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

Withings API Broken - Since Jan 21 2018 #2764

Closed
arunh opened this issue Jan 25, 2018 · 9 comments
Closed

Withings API Broken - Since Jan 21 2018 #2764

arunh opened this issue Jan 25, 2018 · 9 comments
Assignees
Labels
Milestone

Comments

@arunh
Copy link
Contributor

arunh commented Jan 25, 2018

Withings API appears to be silently failing since Jan 21. Using a proxy to log responses I've established that valid data is being returned per the Withings API documentation. However, it does not seem to be being parsed and stored into the athlete record.

I don't have enough knowledge to update the Yacc parser code, but a look at the WithingsParser.l file suggests that in the response below that I logged there is a "timezone" field, whereas there is no corresponding field in the parser definition. Perhaps this is causing the issue?

{
	"status": 0,
	"body": {
		"updatetime": 1516908612,
		"timezone": "Europe\/London",

A couple of things I found out in WithingsDownload::parse

QStringList "errors" is empty - which is surprising as I expected it to contain the parser errors.
Function is seeing zero WithingsReading objects when it calls parser->readings().

Attached the full response I am currently getting from Withings showing valid data but not parsing.

withings.txt

@liversedge
Copy link
Member

Oh god. I wish we'd had a JSON parser back then. Will fix urgently and get into next dev build.
Thanks for doing the legwork.

@arunh
Copy link
Contributor Author

arunh commented Jan 26, 2018

@liversedge I've re-implemented the Withings API parse using the Qt Json Parser. It works for my local environment and the values check out against my known values on Withings and now have data in my athlete measurements right up to today. At your discretion if you choose to use it, but my hope was that it would be more robust to future un-versioned/un-announced API changes by Withings. In the case of the new timezone field it has proven to be the case (as you would expect) and it is duly ignored without error since we don't even try to read it. Pull request created.

liversedge added a commit that referenced this issue Jan 26, 2018
Use Qt Json Parser for Withings API (Fixes Issue #2764)
@liversedge
Copy link
Member

NEED TO MAKE 4.8 BUILDS COMPILE.

@liversedge liversedge self-assigned this Jan 26, 2018
@amtriathlon
Copy link
Member

Hi Mark, the generalization from Withings to BodyMeasures and the subsequent HrvMeasures also depends con Qt5, I can try to make it to compile on 4.8 if this is relevant, otherwise we could just mandate Qt5 for v3.5.

@liversedge
Copy link
Member

I think it would be good to make it dependant on QT > 5.1 so 4.8 builds still work, they just have less functionality?

@amtriathlon
Copy link
Member

Ok the new Body/Hrv Measures functionalities and previous Withings download would not be available but it should work

@drnovsek
Copy link

Hi all,
Not sure if relevant but will mention it for visibility.
Using 'dashboard.health.nokia.com' for weight data and works for me without issues.
GC ver: 3.5-dev1710

@liversedge
Copy link
Member

thanks, that's useful to know !

@drnovsek
Copy link

Sorry Mark, if it wasn't clear - it is possible to import from 'dashboard.health.nokia.com' when you configure Withings as Measurement.

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

No branches or pull requests

4 participants