[Release] Withings Integration (New Management)

Have you tried reauthing through the integration?

@DiverRich Judging by the error message, doing as @rlithgow1 suggests is a good idea.

In investigating my situation above, I discovered problems, probably longstanding, with my ISP that more than likely was the cause. My router logs showed that my provider's DHCP server was renewing my IP address for a very short period, causing a one second disconnection every 30 mins, to the second. Also, with each disconnect, my router was renewing all of my local IP addresses all at once. It just so happened that the api call took place during one of these events.

Yeah I tried that. Oddly I’m still getting all of the other states reported but presence isn’t updating at all.

Update: So now my presence is updating but the rest of the other states aren't updating. Even more interesting is that I keep getting this email every few minutes....

Okay, I finally have the issue of the incessant emails fixed. Since my wife and I have two separate withings accounts, I realized there's an account ID number associated with each. So, once I figured out it was her account that was causing trouble, I deleted it from the developer portal. But, because it takes five days to fully delete, I was getting emails constantly about not being able to reach the server. Once the five days were up, the emails stopped. At that point I created a new "app" in the developer portal under her login and that seems to have resolved the issue.

I should also mention that I've found maintaining two separate app installations of the withings integration app in Hubitat (one for her and one for me) seems to work the best. To pull that off I had to set up one in chrome and the other in safari.

1 Like

I installed and reinstalled and still encounter the same problem. I can't turn on "enable logging of specified data types to local file" because "select file manager device" can't be set/updated.
Do I need to do something to File Manager Device first?
Thanks

Have you installed File Manager Device?
https://community.hubitat.com/t/release-file-manager-device

I - using a ScanWatch - got it working...! :blush:

After installation I got only the battery value (but it shows "50" instead of "43"?).
6 hours later arrived the other values (like steps or heartRateAverage), :+1:
After 11 more hours... nothing changed! :thinking:

How often are the driver values updated (frequency)?
I would need an update at least once every hour...

Edit:
After I checked the Withings App for the numbers, the driver values have been updated!?! Coincidence?
What I noticed, too: The updates are arriving in groups, e.g. 3 different/increasing values for steps in 1 second!?!

Am I right in thinking that the data that is requested from Withings depends on which devices Withings says that the user has linked to their account?
I have a Samsung watch (which of course Withings does not know about) and I get my watch's step data into Withings via Samsung Health and Health Connect. But your app never retrieves this step data. Would it not be feasible to just get all the data irrespective of what Withings devices are registered on their website?

I think it’s unlikely the Withings API can be used to pull data from non-Withings devices, even if your phone is able to display that data in the Withings mobile app.

But maybe @JustinL can clarify.

As an experiment I modified JustinL's User app code to include a "fictional" activity tracker.
In GetWithingsDevices I added a line activityTrackers[10] = "Unnamed Activity Tracker". This allowed the app to subscribe to items including steps. The next time Samsung Health passed some steps data to Withings Health his app was notified and the date was retrieved correctly.
So I guess my question remains - why does the app limit retrieved data to that which corresponds to Withings devices?

1 Like

Because the original code developer didn’t think to do it, and because nobody has requested it or needed it yet, or maybe they have and it didn’t work right. You’re welcome to modify the code and send me a pull request on GitHub for review. Otherwise, I would recommend phrasing your post as a feature request, with details on exactly what data you would want pulled and what devices you would want populated with the data, and I could look into it. Such a “would it be possible to…” post might make for a more productive response than a “why is it not possible…” post.

2 Likes

Sincerely sorry if my post was offensive or badly expressed. I said "why is it not possible" because I thought there might be a good reason for the method used - perhaps like what Marktheknife suggested - that Withings would not provide such data.
My groovy coding is useless so I can't suggest code modifications of any quality. Is it ok if I add something as an issue on Github?
Or if you think that there would be little demand or benefit in such a mod, I can just make my own private version.

1 Like

No worries. Just trying to provide helpful feedback. Either GitHub or here would be a fine place to post a feature request with details. It might be something others would find useful, as it sounds like it could meaningfully expand the withings integration beyond withings devices. After I look into it, I can let you know if it would be more appropriate as a private version or not.

1 Like

@richard-brown
Check out the latest version that adds the option to create a virtual activity tracker to track any activity data even if you do not have a Withings-specific activity tracker device. Cool! Thanks @richard-brown for the idea.

3 Likes

Hi @JustinL, any idea how I can force a more often update of the data?

The data is updated as soon as Withings notifies that there is new data. So you should not need to poll to force an update of the data. What are you trying to do?

Among other things, I need the actual number of steps.

At the moment the device data is only updated, when I start the Withings App on my smartphone. So it remains e.g. Steps=1567 for the whole day... :roll_eyes:
(Or even worst: It shows the Steps of yesterday, as long as I've not started the Withings App!?!)

Just out of curiosity......

Are you a French speaker? Do you mean the current steps? (I think in french "actual" is called a "faux ami") :smiley:
Do you get the current steps if you look at your account website, without looking at the app on your phone? I have several Withings devices and I have not noticed your problem (maybe because I often open the app on my phone). Just wondering if it is a problem with your particular set up, or a Withings problem.

I'm a German speaker... But doesn't "actual steps" mean "real steps"? :thinking:

Today (and even yesterday) I've not started the Withings App. Looking on the Withings web app it shows "0 steps" for yesterday!?! (BTW: The smartwatch itself has notified me yesterday about my success to get more than 10000.)

OK, now I start the Withings App on my smartphone...
And voilà: Finally there are the actual/current :wink: numbers also in the Withings web app!

So my question is still relevant:
How can I force the Withings App to send automatically the data at least every hour?

Just did a test with my Scanwatch - and I would have had the same problem as you (except I have now changed to a Samsung watch - with a different set of problems :smiley:)
Have you tried leaving the phone app running and used the phone battery config to prevent it being put to sleep?
If the web app doesn't get updated I don't think there are any changes to the Hubitat app which could help.

1 Like