Setting up Withings Binding

I’m trying to setup my Withings scale and can’t figure out how to configure the Withings Binding.

On the wiki page it says the first time the binding is started it should print the following:

Withings Binding needs authentication.
Execute 'withings:startAuthentication “<'accountId>” on OSGi console.

I don’t get this, however. I’m assuming I need to ender the “accountID” in my config file. I’m assuming this is a authentication key I need to get from somewhere:

accountId is an arbitrary key also used in the openhab.cfg

Does anybody know what this account ID is and where I can get it from?

Just read a little bit further in the wiki:

So the user needs to open the shown url in a web browser, login with his withings credentials, confirm that openHAB is allowed to access his data and at the end he is redirected to a page on github. There the user finds the command withings:finishAuthentication "<accountId>" "<verifier>" "<user-id>" with filled parameters that is needed to finish the authentication.

Ok, but that’s step 2, I’m stuck on step 1 - I don’t have the URL

As far as I understand the wiki (I don’t use that binding) you can use for the accountId whatever you want, it is arbitrary. Just create something like U6fx92us.

Then on a console execute withings:startAuthentication U6fx92us and it should give you the url …

Good luck.

The still doesn’t work. I get the following message:
Couldn't find Credentials of Account 'U6fx92us'. Please check openhab.cfg or withings.cfg

It looks like @Dibbler42 is using that binding, maybe he can help …

No i am not using the binding, because Withings does not support the air quality data in the API. And my weight is use less. it is enough to see it once a day.

Thomas

1 Like

Last chance: @ldaniel ?

Would be great if @ldaniel could help. I don’t know what else to try.

In my openhab.cfg file I have the following:

############################## Withings Binding ###############################$
# 
# Data refresh interval in ms (optional, defaults to 60000)
withings:refresh=60000
withings:accountId=U6fgh       

In the OSGi console I enter
withings:startAuthentication U6fgh

Is this all correct?
I’m assuming I don’t need a withings.cfg although I tried creating one and entered the same information, which didn’t change anything.

Does the binding Work with OH2?

1 Like

@maze @thejayo

Hi guys,

anything new on this topic?

Unfortunately not. I never looked at this anymore as it wasn’t a priority.

What a pity.

Tried whole night to succed.
Issue posted:

Appears to be a bad configration key problem. See request in the logged issue.

unfortunately it issn’t that easy.
The WIKI of the binding tells us it will generate its own config-file, but it doesn’t.
I also watched the code to make my own .cfg and tried nearly everything thinkable.

I searched the docs and did not find a statement about withings generating its own config file. Please quote the sentence you’re referring to.

Also, please show your binding configs.

I see there are a number of problems with the docs; I’ve started correcting those…

1 Like

Look here.
I read the code and it looks like it generates its config-file itself if it is not there:
WhithingsAccount.java

138            if (!file.exists()) {
139                file.getParentFile().mkdirs();
140               file.createNewFile();
141            }

I dont have any binding configs (for withings)… Or what are you asking for? :slight_smile:

That section of code will only save out individual accounts, not the basic config.

eg. peter.userid, peter.token, etc.

Here’s a revised version of the withings README.

Look it over, maybe try redoing your setup based on it. Let me know what problems you see.