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
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
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?
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…
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?
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.
Made a look trough the README.
Looks much better.
I made some comments on your pull request.
I tried the following:
- deleting everything that contains to withings binding.
- A systemwide filemane search with * withings * endet up with no results
- A search for files containing * withings * ended up with this:
Thats clear so far, because I changed the logleve for this binding. I Think this has no effect on my problemSearch "withings" (12 hits in 2 files) \\OPENHAB2\openHAB-share\openhab2-userdata\etc\org.ops4j.pax.logging.cfg (6 hits) Line 115: log4j2.logger.withings.level = TRACE Line 116: log4j2.logger.withings.name = withings Line 116: log4j2.logger.withings.name = withings Line 117: log4j2.logger.org_openhab_binding_withings.level = TRACE Line 118: log4j2.logger.org_openhab_binding_withings.name = org.openhab.binding.withings Line 118: log4j2.logger.org_openhab_binding_withings.name = org.openhab.binding.withings \\OPENHAB2\openHAB-share\openhab2-userdata\config\org\ops4j\pax\logging.config (6 hits) Line 60: log4j2.logger.org_openhab_binding_withings.level="TRACE" Line 61: log4j2.logger.org_openhab_binding_withings.name="org.openhab.binding.withings" Line 61: log4j2.logger.org_openhab_binding_withings.name="org.openhab.binding.withings" Line 82: log4j2.logger.withings.level="TRACE" Line 83: log4j2.logger.withings.name="withings" Line 83: log4j2.logger.withings.name="withings"
- Now I threw the file
org.openhab.binding.withings-1.10.0.jar
to theaddons
folder endig up with this log:15:53:25.744 [DEBUG] [org.openhab.binding.withings ] - BundleEvent INSTALLED - org.openhab.binding.withings 15:53:26.332 [DEBUG] [org.openhab.binding.withings ] - BundleEvent RESOLVED - org.openhab.binding.withings 15:53:27.049 [DEBUG] [org.openhab.binding.withings ] - BundleEvent UNRESOLVED - org.openhab.binding.withings 15:53:27.507 [DEBUG] [org.openhab.binding.withings ] - BundleEvent RESOLVED - org.openhab.binding.withings 15:53:27.843 [DEBUG] [org.openhab.binding.withings ] - BundleEvent STARTING - org.openhab.binding.withings 15:53:28.297 [DEBUG] [org.openhab.binding.withings ] - BundleEvent STARTED - org.openhab.binding.withings 15:53:28.718 [DEBUG] [org.openhab.binding.withings ] - ServiceEvent REGISTERED - {org.osgi.service.cm.ManagedService}={service.pid=org.openhab.withings-oauth, osgi.command.function=[startAuthentication,finishAuthentication], component.name=org.openhab.binding.withings.authenticator, component.id=333, osgi.command.scope=withings, service.id=1235, service.bundleid=219, service.scope=bundle} - org.openhab.binding.withings 15:53:30.402 [ERROR] [org.apache.felix.configadmin ] - [org.osgi.service.cm.ManagedService, id=1235, bundle=219/file:/usr/share/openhab2/addons/org.openhab.binding.withings-1.10.0.jar]: Updating property consumerKey of configuration org.openhab.withings-oauth caused a problem: The given configuration key is unknown! org.osgi.service.cm.ConfigurationException: consumerKey : The given configuration key is unknown! at org.openhab.binding.withings.internal.api.WithingsAuthenticator.updated(WithingsAuthenticator.java:251) [219:org.openhab.binding.withings:1.10.0] at org.apache.felix.cm.impl.helper.ManagedServiceTracker.updated(ManagedServiceTracker.java:189) [7:org.apache.felix.configadmin:1.8.14] at org.apache.felix.cm.impl.helper.ManagedServiceTracker.updateService(ManagedServiceTracker.java:152) [7:org.apache.felix.configadmin:1.8.14] at org.apache.felix.cm.impl.helper.ManagedServiceTracker.provideConfiguration(ManagedServiceTracker.java:85) [7:org.apache.felix.configadmin:1.8.14] at org.apache.felix.cm.impl.ConfigurationManager$ManagedServiceUpdate.provide(ConfigurationManager.java:1463) [7:org.apache.felix.configadmin:1.8.14] at org.apache.felix.cm.impl.ConfigurationManager$ManagedServiceUpdate.run(ConfigurationManager.java:1419) [7:org.apache.felix.configadmin:1.8.14] at org.apache.felix.cm.impl.UpdateThread.run0(UpdateThread.java:141) [7:org.apache.felix.configadmin:1.8.14] at org.apache.felix.cm.impl.UpdateThread.run(UpdateThread.java:109) [7:org.apache.felix.configadmin:1.8.14] at java.lang.Thread.run(Thread.java:745) [?:?] 15:53:30.404 [DEBUG] [org.openhab.binding.withings ] - ServiceEvent REGISTERED - {org.openhab.model.item.binding.BindingConfigReader, org.openhab.binding.withings.WithingsBindingProvider}={component.name=org.openhab.binding.withings.genericbindingprovider, component.id=335, service.id=1236, service.bundleid=219, service.scope=bundle} - org.openhab.binding.withings 15:53:34.954 [DEBUG] [org.openhab.binding.withings ] - ServiceEvent REGISTERED - {org.osgi.service.cm.ManagedService}={service.pid=org.openhab.withings, component.name=org.openhab.binding.withings.binding, component.id=334, service.id=1238, service.bundleid=219, service.scope=bundle} - org.openhab.binding.withings
I really don’t know what I am doing wrong or waht else I could do.
Do I need a withings.cfg before I drop the *jar-FIle into the addons folder?
If so, what has to be in there? I can’t find any details about it in the README
EDIT:
For clarification:
I saw that there are some mandatory parameters:
- consumerkey
- consumersecret
- redirectUrl
The README just says "Your …"
Maybe I am a noob but I dont know what to fill in there and whats the correct typograpy.
Thanks alot for your help.
Can anyone help?
Someone around here having this binding working?