I cleared the cache and reastarted OH. These are the wink errors I got:
2018-06-28 14:04:57.499 [ERROR] [org.apache.felix.configadmin ] - [org.osgi.service.cm.ManagedService, id=341, bundle=212/file:/usr/share/openhab2/addons/org.openhab.binding.wink-2.2.0-SNAPSHOT.jar]: Unexpected problem updating configuration org.openhab.wink
java.lang.NullPointerException: null
at org.openhab.binding.wink.internal.AuthenticationConfigurationService.updated(AuthenticationConfigurationService.java:37) [212:org.openhab.binding.wink:2.2.0.201801262202]
at org.apache.felix.cm.impl.helper.ManagedServiceTracker.updated(ManagedServiceTracker.java:189) [8:org.apache.felix.configadmin:1.8.16]
at org.apache.felix.cm.impl.helper.ManagedServiceTracker.updateService(ManagedServiceTracker.java:152) [8:org.apache.felix.configadmin:1.8.16]
at org.apache.felix.cm.impl.helper.ManagedServiceTracker.provideConfiguration(ManagedServiceTracker.java:85) [8:org.apache.felix.configadmin:1.8.16]
at org.apache.felix.cm.impl.ConfigurationManager$ManagedServiceUpdate.provide(ConfigurationManager.java:1479) [8:org.apache.felix.configadmin:1.8.16]
at org.apache.felix.cm.impl.ConfigurationManager$ManagedServiceUpdate.run(ConfigurationManager.java:1435) [8:org.apache.felix.configadmin:1.8.16]
at org.apache.felix.cm.impl.UpdateThread.run0(UpdateThread.java:141) [8:org.apache.felix.configadmin:1.8.16]
at org.apache.felix.cm.impl.UpdateThread.run(UpdateThread.java:109) [8:org.apache.felix.configadmin:1.8.16]
at java.lang.Thread.run(Thread.java:748) [?:?]
2018-06-28 14:11:27.072 [WARN ] [g.dispatch.internal.ConfigDispatcher] - Could not parse line 'xxxxxxxxxxxxxxxx'
2018-06-28 14:11:40.448 [ERROR] [org.apache.felix.configadmin ] - [org.osgi.service.cm.ManagedService, id=341, bundle=212/file:/usr/share/openhab2/addons/org.openhab.binding.wink-2.2.0-SNAPSHOT.jar]: Unexpected problem updating configuration org.openhab.wink
com.google.gson.JsonSyntaxException: com.google.gson.stream.MalformedJsonException: Use JsonReader.setLenient(true) to accept malformed JSON at line 1 column 15 path $
at com.google.gson.JsonParser.parse(JsonParser.java:65) [212:org.openhab.binding.wink:2.2.0.201801262202]
at com.google.gson.JsonParser.parse(JsonParser.java:45) [212:org.openhab.binding.wink:2.2.0.201801262202]
at org.openhab.binding.wink.client.DelegatedAuthenticationService.getResultAsJson(DelegatedAuthenticationService.java:93) [212:org.openhab.binding.wink:2.2.0.201801262202]
at org.openhab.binding.wink.client.DelegatedAuthenticationService.<init>(DelegatedAuthenticationService.java:60) [212:org.openhab.binding.wink:2.2.0.201801262202]
at org.openhab.binding.wink.internal.AuthenticationConfigurationService.configure(AuthenticationConfigurationService.java:51) [212:org.openhab.binding.wink:2.2.0.201801262202]
at org.openhab.binding.wink.internal.AuthenticationConfigurationService.updated(AuthenticationConfigurationService.java:39) [212:org.openhab.binding.wink:2.2.0.201801262202]
at org.apache.felix.cm.impl.helper.ManagedServiceTracker.updated(ManagedServiceTracker.java:189) [8:org.apache.felix.configadmin:1.8.16]
at org.apache.felix.cm.impl.helper.ManagedServiceTracker.updateService(ManagedServiceTracker.java:152) [8:org.apache.felix.configadmin:1.8.16]
at org.apache.felix.cm.impl.helper.ManagedServiceTracker.provideConfiguration(ManagedServiceTracker.java:85) [8:org.apache.felix.configadmin:1.8.16]
at org.apache.felix.cm.impl.ConfigurationManager$UpdateConfiguration.run(ConfigurationManager.java:1792) [8:org.apache.felix.configadmin:1.8.16]
at org.apache.felix.cm.impl.UpdateThread.run0(UpdateThread.java:141) [8:org.apache.felix.configadmin:1.8.16]
at org.apache.felix.cm.impl.UpdateThread.run(UpdateThread.java:109) [8:org.apache.felix.configadmin:1.8.16]
at java.lang.Thread.run(Thread.java:748) [?:?]
Caused by: com.google.gson.stream.MalformedJsonException: Use JsonReader.setLenient(true) to accept malformed JSON at line 1 column 15 path $
at com.google.gson.stream.JsonReader.syntaxError(JsonReader.java:1559) ~[?:?]
at com.google.gson.stream.JsonReader.checkLenient(JsonReader.java:1401) ~[?:?]
at com.google.gson.stream.JsonReader.doPeek(JsonReader.java:542) ~[?:?]
at com.google.gson.stream.JsonReader.peek(JsonReader.java:425) ~[?:?]
at com.google.gson.JsonParser.parse(JsonParser.java:60) ~[?:?]
... 12 more
I rebooted my RPi. Same error happens, but with the right jar version.
2018-07-09 17:39:53.947 [ERROR] [org.apache.felix.configadmin ] - [org.osgi.service.cm.ManagedService, id=114, bundle=189/file:/usr/share/openhab2/addons/org.openhab.binding.wink-2.4.0-SNAPSHOT.jar]: Unexpected problem updating configuration org.openhab.wink
com.google.gson.JsonSyntaxException: com.google.gson.stream.MalformedJsonException: Use JsonReader.setLenient(true) to accept malformed JSON at line 1 column 15 path $
at com.google.gson.JsonParser.parse(JsonParser.java:65) [22:com.google.gson:2.7.0]
at com.google.gson.JsonParser.parse(JsonParser.java:45) [22:com.google.gson:2.7.0]
at org.openhab.binding.wink.client.DelegatedAuthenticationService.getResultAsJson(DelegatedAuthenticationService.java:93) [189:org.openhab.binding.wink:2.4.0.201807080123]
at org.openhab.binding.wink.client.DelegatedAuthenticationService.<init>(DelegatedAuthenticationService.java:60) [189:org.openhab.binding.wink:2.4.0.201807080123]
at org.openhab.binding.wink.internal.AuthenticationConfigurationService.configure(AuthenticationConfigurationService.java:51) [189:org.openhab.binding.wink:2.4.0.201807080123]
at org.openhab.binding.wink.internal.AuthenticationConfigurationService.updated(AuthenticationConfigurationService.java:39) [189:org.openhab.binding.wink:2.4.0.201807080123]
at org.apache.felix.cm.impl.helper.ManagedServiceTracker.updated(ManagedServiceTracker.java:189) [8:org.apache.felix.configadmin:1.8.16]
at org.apache.felix.cm.impl.helper.ManagedServiceTracker.updateService(ManagedServiceTracker.java:152) [8:org.apache.felix.configadmin:1.8.16]
at org.apache.felix.cm.impl.helper.ManagedServiceTracker.provideConfiguration(ManagedServiceTracker.java:85) [8:org.apache.felix.configadmin:1.8.16]
at org.apache.felix.cm.impl.ConfigurationManager$ManagedServiceUpdate.provide(ConfigurationManager.java:1479) [8:org.apache.felix.configadmin:1.8.16]
at org.apache.felix.cm.impl.ConfigurationManager$ManagedServiceUpdate.run(ConfigurationManager.java:1435) [8:org.apache.felix.configadmin:1.8.16]
at org.apache.felix.cm.impl.UpdateThread.run0(UpdateThread.java:141) [8:org.apache.felix.configadmin:1.8.16]
at org.apache.felix.cm.impl.UpdateThread.run(UpdateThread.java:109) [8:org.apache.felix.configadmin:1.8.16]
at java.lang.Thread.run(Thread.java:748) [?:?]
Caused by: com.google.gson.stream.MalformedJsonException: Use JsonReader.setLenient(true) to accept malformed JSON at line 1 column 15 path $
at com.google.gson.stream.JsonReader.syntaxError(JsonReader.java:1559) ~[?:?]
at com.google.gson.stream.JsonReader.checkLenient(JsonReader.java:1401) ~[?:?]
at com.google.gson.stream.JsonReader.doPeek(JsonReader.java:542) ~[?:?]
at com.google.gson.stream.JsonReader.peek(JsonReader.java:425) ~[?:?]
at com.google.gson.JsonParser.parse(JsonParser.java:60) ~[?:?]
... 13 more
I cannot say how the old version showed up. Strange for sure.
Are you using a wink.cfg file in your services folder to set the delgated option and to set the herokuapp auth_service_token ? I noticed the log mentioned not being able to parse something that looked like it might be your herokuapp auth_service_tokenā¦ Maybe there is a typo there?
Also, just to confirm, with the 2.4 jar, you can add the sudo wink hub, but not your thermostats, correct?
And no, I am not able to add the Wink Hub completely. It always has a status of āUninitializedā shown in the UI.
Are there more places to clear out tmp and cache besides /var/lib/openhab/cache and tmp? It was really strange that my system didnāt forget about your old 2.2.0 jar until after a reboot.
Yes, that does look correct. You may want to edit your post to remove the token though, otherwise someone could use it to control your devices. Your token was also in your log errors a couple posts above.
Iām curious if the root of our problems is with the herokuapp authentication. I am going to try to setup the alternate authentication and see if I have success.
Are there more places to clear out tmp and cache besides /var/lib/openhab/cache and tmp?
Not that I know of, but I cannot say for sure.
Also, have you tried to remove the wink hub and re-add it?
@42Network I was able to get the thermostat support to work again! I uploaded a new 2.4 jar, The jar has a lot of debugging logging that I will eventually trim out.
The problem was not with the herokuapp authentication. I set up the oauth through developer.wink.com and had the same issues. it ended up being a json parsing issue.
Let me know if it works for you. Please clear you cache and remove your items and then try the new jar.
Thanks for your hard work on this. Iām looking forward to it working. But I still get the same error as before about malformed JSON after clearing the OH cache & tmp files, installing the new jar, and restarting OH. I wish the error said what JSON file had an error.
How can I enable the debugging code you have in the jar? Perhaps we can get some more helpful errors!
2018-07-13 17:06:11.849 [ERROR] [org.apache.felix.configadmin ] - [org.osgi.service.cm.ManagedService, id=99, bundle=157/file:/usr/share/openhab2/addons/org.openhab.binding.wink-2.4.0-SNAPSHOT.jar]: Unexpected problem updating configuration org.openhab.wink
com.google.gson.JsonSyntaxException: com.google.gson.stream.MalformedJsonException: Use JsonReader.setLenient(true) to accept malformed JSON at line 1 column 15 path $
at com.google.gson.JsonParser.parse(JsonParser.java:65) [22:com.google.gson:2.7.0]
at com.google.gson.JsonParser.parse(JsonParser.java:45) [22:com.google.gson:2.7.0]
at org.openhab.binding.wink.client.DelegatedAuthenticationService.getResultAsJson(DelegatedAuthenticationService.java:93) [157:org.openhab.binding.wink:2.4.0.201807130010]
at org.openhab.binding.wink.client.DelegatedAuthenticationService.<init>(DelegatedAuthenticationService.java:60) [157:org.openhab.binding.wink:2.4.0.201807130010]
at org.openhab.binding.wink.internal.AuthenticationConfigurationService.configure(AuthenticationConfigurationService.java:51) [157:org.openhab.binding.wink:2.4.0.201807130010]
at org.openhab.binding.wink.internal.AuthenticationConfigurationService.updated(AuthenticationConfigurationService.java:39) [157:org.openhab.binding.wink:2.4.0.201807130010]
at org.apache.felix.cm.impl.helper.ManagedServiceTracker.updated(ManagedServiceTracker.java:189) [8:org.apache.felix.configadmin:1.8.16]
at org.apache.felix.cm.impl.helper.ManagedServiceTracker.updateService(ManagedServiceTracker.java:152) [8:org.apache.felix.configadmin:1.8.16]
at org.apache.felix.cm.impl.helper.ManagedServiceTracker.provideConfiguration(ManagedServiceTracker.java:85) [8:org.apache.felix.configadmin:1.8.16]
at org.apache.felix.cm.impl.ConfigurationManager$ManagedServiceUpdate.provide(ConfigurationManager.java:1479) [8:org.apache.felix.configadmin:1.8.16]
at org.apache.felix.cm.impl.ConfigurationManager$ManagedServiceUpdate.run(ConfigurationManager.java:1435) [8:org.apache.felix.configadmin:1.8.16]
at org.apache.felix.cm.impl.UpdateThread.run0(UpdateThread.java:141) [8:org.apache.felix.configadmin:1.8.16]
at org.apache.felix.cm.impl.UpdateThread.run(UpdateThread.java:109) [8:org.apache.felix.configadmin:1.8.16]
at java.lang.Thread.run(Thread.java:748) [?:?]
Caused by: com.google.gson.stream.MalformedJsonException: Use JsonReader.setLenient(true) to accept malformed JSON at line 1 column 15 path $
at com.google.gson.stream.JsonReader.syntaxError(JsonReader.java:1559) ~[?:?]
at com.google.gson.stream.JsonReader.checkLenient(JsonReader.java:1401) ~[?:?]
at com.google.gson.stream.JsonReader.doPeek(JsonReader.java:542) ~[?:?]
at com.google.gson.stream.JsonReader.peek(JsonReader.java:425) ~[?:?]
at com.google.gson.JsonParser.parse(JsonParser.java:60) ~[?:?]
... 13 more
Despite the above error, I was able to add the Wink Hub. Discovery didnāt find anything, but I was able to manually add a thermostat. But it asked for a Wink-assigned UID. I have no idea how to find this UID. The Wink app on my phone, which shows my two Sensi thermostats, doesnāt tell me the UID.
I guessed and put in a UID of 1 and OH did add a thermostat, which I can see in the control area, but it shows no data.
To manually add the uuid, you would have to use the wink api on their website to get it. I couldnāt figure out how to get it from there.
It looks like the errors you are getting are earlier than my error logging. It may be worth trying to got to the herokuapp and click disconnect from wink, then reconnect to wink. It shouldnāt change your Iād, but it may be worth trying.
How did you add your thermostat? Did Discovery work for you? Or did you add manually? If so, how did you determine the UID? Is this only a problem for me because I have two Sensis?
@42Network, Here is a jar with additional debugging messages. I added a āversionā debug message that should appear so we know OH isnāt running with an old jar like it did once before. The āversionā message is:
In this jar, I added a JsonReader.setLenient(true) call based on your error messages, along with tracing out the string data we are trying to parse with a JsonParser.
Thanks for the update. I just installed it and it is much more responsive to hardware button changes. Except the change shows up in Celsius rather than Farenheit. Right now my thermostats in the paperUI Control area bounce back and forth between F and C. Didnāt used to do this.