Emerson Sensi Thermostat


(Nathan Ellsworth) #62

Hi Joel. Thanks for working on this.

I have recently noticed that OH will stop getting any data from my thermostats for days at a time. Like right now it hasn’t gotten an update since Aug.10. The behavior is the data will get stuck on one set of values and never update again. In the past when I saw this I would restart OH and I started getting data again.

I will install your latest jar and see if that behavior changes as well as whether the humidity stops bouncing around.

Thanks!


(Nathan Ellsworth) #63

Hi Joel,

The new jar worked great for the past five days. Temps and humidity all reporting in within seconds in the right units. However, the data feed has now stopped. Here is a screenshot from my Grafana.

How can I begin helping troubleshoot?


(joel_shumann) #64

Do you see any wink related error messages that show up in the log around the time it stops?

Joel


(Mkeefe310) #65

I’m just getting started in this. I’ve downloaded OpenHab 2.3.0 Stable Runtime, installed on Win 10 using the instructions, grabbed the latest org.openhab.binding.wink-2.4.0-SNAPSHOT.jar (commit 98cec76) and added to “addons” folder, got a token via openhab-authservice.herokuapp.com, configured the binding for “delegated” and added my token.

I add the Wink 2 Hub manually and shows “online” and i don’t get any discovery notifications, either manually or by scanning the binding.

I am “logged in” to Wink via herokuapp this whole time. Does that make a difference?

So, what information can I offer to help diagnose this problem? I have three Lutron Caseta Dimmers added to the Wink Hub, FYI.

Help is appreciated. Thank you!

Here’s “events.log” after manually adding the hub:

2018-09-12 21:07:56.676 [hingStatusInfoChangedEvent] - 'wink:wink_hub_2:a5bb19a9' changed from UNINITIALIZED to INITIALIZING
2018-09-12 21:07:56.677 [hingStatusInfoChangedEvent] - 'wink:wink_hub_2:a5bb19a9' changed from INITIALIZING to ONLINE

Here’s “openhab.log” from that timestamp onwards:

2018-09-12 21:07:56.671 [WARN ] [.core.thing.binding.BaseThingHandler] - BaseThingHandler.initialize() will be removed soon, ThingStatus can be set manually via updateStatus(ThingStatus.ONLINE)
2018-09-12 21:08:11.145 [WARN ] [okhttp3.OkHttpClient                ] - A connection to https://myopenhab.org/ was leaked. Did you forget to close a response body?
2018-09-12 21:08:38.756 [WARN ] [okhttp3.OkHttpClient                ] - A connection to https://myopenhab.org/ was leaked. Did you forget to close a response body?
2018-09-12 21:08:52.528 [WARN ] [mmon.WrappedScheduledExecutorService] - Scheduled runnable ended with an exception
java.lang.RuntimeException: java.lang.ClassNotFoundException: org.glassfish.jersey.client.JerseyClientBuilder cannot be found by javax.ws.rs-api_2.0.1
	at javax.ws.rs.client.ClientBuilder.newBuilder(ClientBuilder.java:103) [33:javax.ws.rs-api:2.0.1]
	at javax.ws.rs.client.ClientBuilder.newClient(ClientBuilder.java:114) [33:javax.ws.rs-api:2.0.1]
	at org.openhab.binding.wink.client.CloudRestfulWinkClient.listDevices(CloudRestfulWinkClient.java:49) [189:org.openhab.binding.wink:2.4.0.201808071632]
	at org.openhab.binding.wink.internal.discovery.WinkDeviceDiscoveryService$1.run(WinkDeviceDiscoveryService.java:56) [189:org.openhab.binding.wink:2.4.0.201808071632]
	at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source) [?:?]
	at java.util.concurrent.FutureTask.run(Unknown Source) [?:?]
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(Unknown Source) [?:?]
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(Unknown Source) [?:?]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) [?:?]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) [?:?]
	at java.lang.Thread.run(Unknown Source) [?:?]
Caused by: java.lang.ClassNotFoundException: org.glassfish.jersey.client.JerseyClientBuilder cannot be found by javax.ws.rs-api_2.0.1
	at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:484) ~[?:?]
	at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:395) ~[?:?]
	at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:387) ~[?:?]
	at org.eclipse.osgi.internal.loader.ModuleClassLoader.loadClass(ModuleClassLoader.java:150) ~[?:?]
	at java.lang.ClassLoader.loadClass(Unknown Source) ~[?:?]
	at java.lang.Class.forName0(Native Method) ~[?:?]
	at java.lang.Class.forName(Unknown Source) ~[?:?]
	at javax.ws.rs.client.FactoryFinder.newInstance(FactoryFinder.java:115) ~[?:?]
	at javax.ws.rs.client.FactoryFinder.find(FactoryFinder.java:225) ~[?:?]
	at javax.ws.rs.client.ClientBuilder.newBuilder(ClientBuilder.java:86) ~[?:?]

(joel_shumann) #66

It looks like somehow your system is missing the org.glassfish.jersey.client.JerseyClientBuilder dependency. I’m not sure exactly how to get it added at this point, but I’ll do some looking around.

One thing you could try is installing a binding that has this same dependency thru paper ui. It looks like the nest binding has this same dependency. Try installing the nest binding and then try dropping in the wink binding to the addon folder again.


(Mkeefe310) #67

UPDATE: Working.
I misunderstood the readme and did not add the wink.cfg to the conf/services directory. I got it to see the dimmers already added to the Wink hub.

OK, So I decided to start fresh. Still not working.

I removed the current openhab install and re-installed to a new directory.

This time I picked the “UI Only” install option (no bindings installed automatically)

I added the WINK binding and then configured for “delegated” mode. Added the Hub manually and then searched.

Here is the log file after performing the search from startup to shutdown of openhab(I did two searches).

Thanks again for any help you can offer.

2018-09-14 19:04:22.850 [INFO ] [.internal.GenericScriptEngineFactory] - Activated scripting support for ECMAScript

2018-09-14 19:04:24.851 [ERROR] [org.apache.felix.configadmin        ] - [org.osgi.service.cm.ManagedService, id=123, bundle=204/file:/F:/openhab/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:98) [204:org.openhab.binding.wink:2.4.0.201808071632]
	at org.openhab.binding.wink.client.DelegatedAuthenticationService.<init>(DelegatedAuthenticationService.java:60) [204:org.openhab.binding.wink:2.4.0.201808071632]
	at org.openhab.binding.wink.internal.AuthenticationConfigurationService.configure(AuthenticationConfigurationService.java:51) [204:org.openhab.binding.wink:2.4.0.201808071632]
	at org.openhab.binding.wink.internal.AuthenticationConfigurationService.updated(AuthenticationConfigurationService.java:39) [204:org.openhab.binding.wink:2.4.0.201808071632]
	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(Unknown Source) [?:?]
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
2018-09-14 19:04:27.771 [INFO ] [thome.model.lsp.internal.ModelServer] - Started Language Server Protocol (LSP) service on port 5007
2018-09-14 19:04:28.830 [INFO ] [.dashboard.internal.DashboardService] - Started Dashboard at http://192.168.1.100:8080
2018-09-14 19:04:28.831 [INFO ] [.dashboard.internal.DashboardService] - Started Dashboard at https://192.168.1.100:8443
2018-09-14 19:04:29.652 [INFO ] [arthome.ui.paper.internal.PaperUIApp] - Started Paper UI at /paperui
2018-09-14 19:04:29.668 [INFO ] [panel.internal.HABPanelDashboardTile] - Started HABPanel at /habpanel
2018-09-14 20:38:13.835 [WARN ] [.core.thing.binding.BaseThingHandler] - BaseThingHandler.initialize() will be removed soon, ThingStatus can be set manually via updateStatus(ThingStatus.ONLINE)
2018-09-14 20:39:35.580 [WARN ] [mmon.WrappedScheduledExecutorService] - Scheduled runnable ended with an exception
java.lang.IllegalStateException: Not a JSON Object: null
	at com.google.gson.JsonElement.getAsJsonObject(JsonElement.java:90) [22:com.google.gson:2.7.0]
	at org.openhab.binding.wink.client.CloudRestfulWinkClient.getResultAsJson(CloudRestfulWinkClient.java:147) [204:org.openhab.binding.wink:2.4.0.201808071632]
	at org.openhab.binding.wink.client.CloudRestfulWinkClient.executeGet(CloudRestfulWinkClient.java:124) [204:org.openhab.binding.wink:2.4.0.201808071632]
	at org.openhab.binding.wink.client.CloudRestfulWinkClient.listDevices(CloudRestfulWinkClient.java:52) [204:org.openhab.binding.wink:2.4.0.201808071632]
	at org.openhab.binding.wink.internal.discovery.WinkDeviceDiscoveryService$1.run(WinkDeviceDiscoveryService.java:56) [204:org.openhab.binding.wink:2.4.0.201808071632]
	at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source) [?:?]
	at java.util.concurrent.FutureTask.run(Unknown Source) [?:?]
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(Unknown Source) [?:?]
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(Unknown Source) [?:?]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) [?:?]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) [?:?]
	at java.lang.Thread.run(Unknown Source) [?:?]
2018-09-14 20:40:31.723 [WARN ] [mmon.WrappedScheduledExecutorService] - Scheduled runnable ended with an exception
java.lang.IllegalStateException: Not a JSON Object: null
	at com.google.gson.JsonElement.getAsJsonObject(JsonElement.java:90) [22:com.google.gson:2.7.0]
	at org.openhab.binding.wink.client.CloudRestfulWinkClient.getResultAsJson(CloudRestfulWinkClient.java:147) [204:org.openhab.binding.wink:2.4.0.201808071632]
	at org.openhab.binding.wink.client.CloudRestfulWinkClient.executeGet(CloudRestfulWinkClient.java:124) [204:org.openhab.binding.wink:2.4.0.201808071632]
	at org.openhab.binding.wink.client.CloudRestfulWinkClient.listDevices(CloudRestfulWinkClient.java:52) [204:org.openhab.binding.wink:2.4.0.201808071632]
	at org.openhab.binding.wink.internal.discovery.WinkDeviceDiscoveryService$1.run(WinkDeviceDiscoveryService.java:56) [204:org.openhab.binding.wink:2.4.0.201808071632]
	at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source) [?:?]
	at java.util.concurrent.FutureTask.run(Unknown Source) [?:?]
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(Unknown Source) [?:?]
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(Unknown Source) [?:?]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) [?:?]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) [?:?]
	at java.lang.Thread.run(Unknown Source) [?:?]
2018-09-14 20:41:37.384 [INFO ] [arthome.ui.paper.internal.PaperUIApp] - Stopped Paper UI
2018-09-14 20:41:37.388 [INFO ] [panel.internal.HABPanelDashboardTile] - Stopped HABPanel
2018-09-14 20:41:37.392 [INFO ] [.dashboard.internal.DashboardService] - Stopped Dashboard

(Mkeefe310) #68

OK, got the control of dimmers via openhab. When I adjust the settings via openhab, I see it reflected in the Wink app on my phone. However, if I adjust settings in the Wink App, they are not updated in openhab. Should openhab update after adjusting in Wink app?


(joel_shumann) #69

It should update. Maybe not immediately, but it should. The longest I’ve seen is 5 min. Are there any errors in your logs, maybe search for pubnub in your log and see if any error messages could tell us some clues.

Joel


(Mkeefe310) #70

So, it appears to be updating in the logs, but not the Paper UI.

I changed the state via Paper UI here: (events.log)

2018-09-16 18:19:14.573 [ome.event.ItemCommandEvent] - Item 'wink_light_bulb_e4d82b32_59c4_400e_b9af_983ddf44c4fb_lightlevel' received command ON
2018-09-16 18:19:14.575 [vent.ItemStateChangedEvent] - wink_light_bulb_e4d82b32_59c4_400e_b9af_983ddf44c4fb_lightlevel changed from 0 to 100

I turned it off via the Wink app a couple seconds after the app updated with the status, but no change shown in Paper UI.

See below for status: (openhab.log)

2018-09-16 18:16:25.995 [INFO ] [g.wink.client.CloudRestfulWinkClient] - Json Result: {"uuid":"e4d82b32-59c4-400e-b9af-983ddf44c4fb","created_at":1536520080,"updated_at":1536520097,"desired_state":{"powered":false,"brightness":1.0},"last_reading":{"connection":true,"connection_updated_at":1537134654.0014062,"needs_repair":false,"needs_repair_updated_at":1537134654.0014062,"powered":false,"powered_updated_at":1537134654.0014062,"brightness":1.0,"brightness_updated_at":1537134654.0014062,"desired_powered_updated_at":1536977237.047838,"desired_brightness_updated_at":1536977409.7027335,"connection_changed_at":1536520080.0341692,"needs_repair_changed_at":1536520085.6543643,"powered_changed_at":1537134654.0014062,"brightness_changed_at":1537132261.762635,"desired_powered_changed_at":1536977237.047838,"desired_brightness_changed_at":1536977409.7027335},"subscription":{"pubnub":{"subscribe_key":"xxx","channel":"87b89e2a72bef13e92c11fd357b7e1778f276f68|light_bulb-3838115|user-924054"}},"light_bulb_id":"3838115","name":"Kitchen Main Lights","locale":"en_us","units":{},"hidden_at":null,"capabilities":{},"triggers":[],"manufacturer_device_model":"lutron_p_pkg1_w_wh_d","manufacturer_device_id":null,"device_manufacturer":"lutron","model_name":"Caseta Wireless Dimmer & Pico","upc_id":"556","upc_code":"lutron_p-pkg1w-wh-d","primary_upc_code":"lutron_p-pkg1w-wh-d","gang_id":null,"hub_id":"908267","local_id":"2","radio_type":"lutron","linked_service_id":null,"order":0}
2018-09-16 18:16:26.327 [INFO ] [g.wink.client.CloudRestfulWinkClient] - Json Result: {"uuid":"e4d82b32-59c4-400e-b9af-983ddf44c4fb","created_at":1536520080,"updated_at":1536520097,"desired_state":{"powered":false,"brightness":1.0},"last_reading":{"connection":true,"connection_updated_at":1537134654.0014062,"needs_repair":false,"needs_repair_updated_at":1537134654.0014062,"powered":false,"powered_updated_at":1537134654.0014062,"brightness":1.0,"brightness_updated_at":1537134654.0014062,"desired_powered_updated_at":1536977237.047838,"desired_brightness_updated_at":1536977409.7027335,"connection_changed_at":1536520080.0341692,"needs_repair_changed_at":1536520085.6543643,"powered_changed_at":1537134654.0014062,"brightness_changed_at":1537132261.762635,"desired_powered_changed_at":1536977237.047838,"desired_brightness_changed_at":1536977409.7027335},"subscription":{"pubnub":{"subscribe_key":"xxx","channel":"87b89e2a72bef13e92c11fd357b7e1778f276f68|light_bulb-3838115|user-924054"}},"light_bulb_id":"3838115","name":"Kitchen Main Lights","locale":"en_us","units":{},"hidden_at":null,"capabilities":{},"triggers":[],"manufacturer_device_model":"lutron_p_pkg1_w_wh_d","manufacturer_device_id":null,"device_manufacturer":"lutron","model_name":"Caseta Wireless Dimmer & Pico","upc_id":"556","upc_code":"lutron_p-pkg1w-wh-d","primary_upc_code":"lutron_p-pkg1w-wh-d","gang_id":null,"hub_id":"908267","local_id":"2","radio_type":"lutron","linked_service_id":null,"order":0}
2018-09-16 18:18:55.027 [INFO ] [g.wink.client.CloudRestfulWinkClient] - Json Result: {"uuid":"e4d82b32-59c4-400e-b9af-983ddf44c4fb","created_at":1536520080,"updated_at":1536520097,"desired_state":{"powered":false,"brightness":1.0},"last_reading":{"connection":true,"connection_updated_at":1537134654.0014062,"needs_repair":false,"needs_repair_updated_at":1537134654.0014062,"powered":false,"powered_updated_at":1537134654.0014062,"brightness":1.0,"brightness_updated_at":1537134654.0014062,"desired_powered_updated_at":1536977237.047838,"desired_brightness_updated_at":1536977409.7027335,"connection_changed_at":1536520080.0341692,"needs_repair_changed_at":1536520085.6543643,"powered_changed_at":1537134654.0014062,"brightness_changed_at":1537132261.762635,"desired_powered_changed_at":1536977237.047838,"desired_brightness_changed_at":1536977409.7027335},"subscription":{"pubnub":{"subscribe_key":"xxx","channel":"87b89e2a72bef13e92c11fd357b7e1778f276f68|light_bulb-3838115|user-924054"}},"light_bulb_id":"3838115","name":"Kitchen Main Lights","locale":"en_us","units":{},"hidden_at":null,"capabilities":{},"triggers":[],"manufacturer_device_model":"lutron_p_pkg1_w_wh_d","manufacturer_device_id":null,"device_manufacturer":"lutron","model_name":"Caseta Wireless Dimmer & Pico","upc_id":"556","upc_code":"lutron_p-pkg1w-wh-d","primary_upc_code":"lutron_p-pkg1w-wh-d","gang_id":null,"hub_id":"908267","local_id":"2","radio_type":"lutron","linked_service_id":null,"order":0}
2018-09-16 18:18:55.520 [INFO ] [g.wink.client.CloudRestfulWinkClient] - Json Result: {"uuid":"e4d82b32-59c4-400e-b9af-983ddf44c4fb","created_at":1536520080,"updated_at":1536520097,"desired_state":{"powered":false,"brightness":1.0},"last_reading":{"connection":true,"connection_updated_at":1537134654.0014062,"needs_repair":false,"needs_repair_updated_at":1537134654.0014062,"powered":false,"powered_updated_at":1537134654.0014062,"brightness":1.0,"brightness_updated_at":1537134654.0014062,"desired_powered":false,"desired_powered_updated_at":1537136339.4158561,"desired_brightness_updated_at":1536977409.7027335,"connection_changed_at":1536520080.0341692,"needs_repair_changed_at":1536520085.6543643,"powered_changed_at":1537134654.0014062,"brightness_changed_at":1537132261.762635,"desired_powered_changed_at":1537136339.4158561,"desired_brightness_changed_at":1536977409.7027335},"subscription":{"pubnub":{"subscribe_key":"xxx","channel":"87b89e2a72bef13e92c11fd357b7e1778f276f68|light_bulb-3838115|user-924054"}},"light_bulb_id":"3838115","name":"Kitchen Main Lights","locale":"en_us","units":{},"hidden_at":null,"capabilities":{},"triggers":[],"manufacturer_device_model":"lutron_p_pkg1_w_wh_d","manufacturer_device_id":null,"device_manufacturer":"lutron","model_name":"Caseta Wireless Dimmer & Pico","upc_id":"556","upc_code":"lutron_p-pkg1w-wh-d","primary_upc_code":"lutron_p-pkg1w-wh-d","gang_id":null,"hub_id":"908267","local_id":"2","radio_type":"lutron","linked_service_id":null,"order":0}
2018-09-16 18:19:14.853 [INFO ] [g.wink.client.CloudRestfulWinkClient] - Json Result: {"uuid":"e4d82b32-59c4-400e-b9af-983ddf44c4fb","created_at":1536520080,"updated_at":1536520097,"desired_state":{"powered":false,"brightness":1.0},"last_reading":{"connection":true,"connection_updated_at":1537134654.0014062,"needs_repair":false,"needs_repair_updated_at":1537134654.0014062,"powered":false,"powered_updated_at":1537134654.0014062,"brightness":1.0,"brightness_updated_at":1537134654.0014062,"desired_powered":false,"desired_powered_updated_at":1537136339.4158561,"desired_brightness_updated_at":1536977409.7027335,"connection_changed_at":1536520080.0341692,"needs_repair_changed_at":1536520085.6543643,"powered_changed_at":1537134654.0014062,"brightness_changed_at":1537132261.762635,"desired_powered_changed_at":1537136339.4158561,"desired_brightness_changed_at":1536977409.7027335},"subscription":{"pubnub":{"subscribe_key":"xxx","channel":"87b89e2a72bef13e92c11fd357b7e1778f276f68|light_bulb-3838115|user-924054"}},"light_bulb_id":"3838115","name":"Kitchen Main Lights","locale":"en_us","units":{},"hidden_at":null,"capabilities":{},"triggers":[],"manufacturer_device_model":"lutron_p_pkg1_w_wh_d","manufacturer_device_id":null,"device_manufacturer":"lutron","model_name":"Caseta Wireless Dimmer & Pico","upc_id":"556","upc_code":"lutron_p-pkg1w-wh-d","primary_upc_code":"lutron_p-pkg1w-wh-d","gang_id":null,"hub_id":"908267","local_id":"2","radio_type":"lutron","linked_service_id":null,"order":0}
2018-09-16 18:19:15.209 [INFO ] [g.wink.client.CloudRestfulWinkClient] - Json Result: {"uuid":"e4d82b32-59c4-400e-b9af-983ddf44c4fb","created_at":1536520080,"updated_at":1536520097,"desired_state":{"powered":true,"brightness":1.0},"last_reading":{"connection":true,"connection_updated_at":1537134654.0014062,"needs_repair":false,"needs_repair_updated_at":1537134654.0014062,"powered":false,"powered_updated_at":1537134654.0014062,"brightness":1.0,"brightness_updated_at":1537134654.0014062,"desired_powered":true,"desired_powered_updated_at":1537136359.1939468,"desired_brightness":1.0,"desired_brightness_updated_at":1537136359.1939468,"connection_changed_at":1536520080.0341692,"needs_repair_changed_at":1536520085.6543643,"powered_changed_at":1537134654.0014062,"brightness_changed_at":1537132261.762635,"desired_powered_changed_at":1537136359.1939468,"desired_brightness_changed_at":1537136359.1939468},"subscription":{"pubnub":{"subscribe_key":"xxx","channel":"87b89e2a72bef13e92c11fd357b7e1778f276f68|light_bulb-3838115|user-924054"}},"light_bulb_id":"3838115","name":"Kitchen Main Lights","locale":"en_us","units":{},"hidden_at":null,"capabilities":{},"triggers":[],"manufacturer_device_model":"lutron_p_pkg1_w_wh_d","manufacturer_device_id":null,"device_manufacturer":"lutron","model_name":"Caseta Wireless Dimmer & Pico","upc_id":"556","upc_code":"lutron_p-pkg1w-wh-d","primary_upc_code":"lutron_p-pkg1w-wh-d","gang_id":null,"hub_id":"908267","local_id":"2","radio_type":"lutron","linked_service_id":null,"order":0}
2018-09-16 18:19:15.418 [INFO ] [g.wink.client.CloudRestfulWinkClient] - Json Result: {"uuid":"e4d82b32-59c4-400e-b9af-983ddf44c4fb","created_at":1536520080,"updated_at":1536520097,"desired_state":{"powered":true,"brightness":1.0},"last_reading":{"connection":true,"connection_updated_at":1537134654.0014062,"needs_repair":false,"needs_repair_updated_at":1537134654.0014062,"powered":false,"powered_updated_at":1537134654.0014062,"brightness":1.0,"brightness_updated_at":1537134654.0014062,"desired_powered":true,"desired_powered_updated_at":1537136359.1939468,"desired_brightness":1.0,"desired_brightness_updated_at":1537136359.1939468,"connection_changed_at":1536520080.0341692,"needs_repair_changed_at":1536520085.6543643,"powered_changed_at":1537134654.0014062,"brightness_changed_at":1537132261.762635,"desired_powered_changed_at":1537136359.1939468,"desired_brightness_changed_at":1537136359.1939468},"subscription":{"pubnub":{"subscribe_key":"xxx","channel":"87b89e2a72bef13e92c11fd357b7e1778f276f68|light_bulb-3838115|user-924054"}},"light_bulb_id":"3838115","name":"Kitchen Main Lights","locale":"en_us","units":{},"hidden_at":null,"capabilities":{},"triggers":[],"manufacturer_device_model":"lutron_p_pkg1_w_wh_d","manufacturer_device_id":null,"device_manufacturer":"lutron","model_name":"Caseta Wireless Dimmer & Pico","upc_id":"556","upc_code":"lutron_p-pkg1w-wh-d","primary_upc_code":"lutron_p-pkg1w-wh-d","gang_id":null,"hub_id":"908267","local_id":"2","radio_type":"lutron","linked_service_id":null,"order":0}
2018-09-16 18:19:15.693 [INFO ] [g.wink.client.CloudRestfulWinkClient] - Json Result: {"uuid":"e4d82b32-59c4-400e-b9af-983ddf44c4fb","created_at":1536520080,"updated_at":1536520097,"desired_state":{"powered":true,"brightness":1.0},"last_reading":{"connection":true,"connection_updated_at":1537134654.0014062,"needs_repair":false,"needs_repair_updated_at":1537134654.0014062,"powered":false,"powered_updated_at":1537134654.0014062,"brightness":1.0,"brightness_updated_at":1537134654.0014062,"desired_powered":true,"desired_powered_updated_at":1537136359.7378452,"desired_brightness":1.0,"desired_brightness_updated_at":1537136359.1939468,"connection_changed_at":1536520080.0341692,"needs_repair_changed_at":1536520085.6543643,"powered_changed_at":1537134654.0014062,"brightness_changed_at":1537132261.762635,"desired_powered_changed_at":1537136359.1939468,"desired_brightness_changed_at":1537136359.1939468},"subscription":{"pubnub":{"subscribe_key":"xxx","channel":"87b89e2a72bef13e92c11fd357b7e1778f276f68|light_bulb-3838115|user-924054"}},"light_bulb_id":"3838115","name":"Kitchen Main Lights","locale":"en_us","units":{},"hidden_at":null,"capabilities":{},"triggers":[],"manufacturer_device_model":"lutron_p_pkg1_w_wh_d","manufacturer_device_id":null,"device_manufacturer":"lutron","model_name":"Caseta Wireless Dimmer & Pico","upc_id":"556","upc_code":"lutron_p-pkg1w-wh-d","primary_upc_code":"lutron_p-pkg1w-wh-d","gang_id":null,"hub_id":"908267","local_id":"2","radio_type":"lutron","linked_service_id":null,"order":0}
2018-09-16 18:21:25.814 [INFO ] [g.wink.client.CloudRestfulWinkClient] - Json Result: {"uuid":"e4d82b32-59c4-400e-b9af-983ddf44c4fb","created_at":1536520080,"updated_at":1536520097,"desired_state":{"powered":false,"brightness":1.0},"last_reading":{"connection":true,"connection_updated_at":1537136373.7172275,"needs_repair":false,"needs_repair_updated_at":1537136373.7172275,"powered":false,"powered_updated_at":1537136373.7172275,"brightness":1.0,"brightness_updated_at":1537136373.7172275,"desired_powered_updated_at":1537136373.6371195,"desired_brightness_updated_at":1537136360.2472386,"connection_changed_at":1536520080.0341692,"needs_repair_changed_at":1536520085.6543643,"powered_changed_at":1537136373.5041091,"brightness_changed_at":1537132261.762635,"desired_powered_changed_at":1537136373.6371195,"desired_brightness_changed_at":1537136360.2472386},"subscription":{"pubnub":{"subscribe_key":"xxx","channel":"87b89e2a72bef13e92c11fd357b7e1778f276f68|light_bulb-3838115|user-924054"}},"light_bulb_id":"3838115","name":"Kitchen Main Lights","locale":"en_us","units":{},"hidden_at":null,"capabilities":{},"triggers":[],"manufacturer_device_model":"lutron_p_pkg1_w_wh_d","manufacturer_device_id":null,"device_manufacturer":"lutron","model_name":"Caseta Wireless Dimmer & Pico","upc_id":"556","upc_code":"lutron_p-pkg1w-wh-d","primary_upc_code":"lutron_p-pkg1w-wh-d","gang_id":null,"hub_id":"908267","local_id":"2","radio_type":"lutron","linked_service_id":null,"order":0}
2018-09-16 18:21:26.033 [INFO ] [g.wink.client.CloudRestfulWinkClient] - Json Result: {"uuid":"e4d82b32-59c4-400e-b9af-983ddf44c4fb","created_at":1536520080,"updated_at":1536520097,"desired_state":{"powered":false,"brightness":1.0},"last_reading":{"connection":true,"connection_updated_at":1537136373.7172275,"needs_repair":false,"needs_repair_updated_at":1537136373.7172275,"powered":false,"powered_updated_at":1537136373.7172275,"brightness":1.0,"brightness_updated_at":1537136373.7172275,"desired_powered_updated_at":1537136373.6371195,"desired_brightness_updated_at":1537136360.2472386,"connection_changed_at":1536520080.0341692,"needs_repair_changed_at":1536520085.6543643,"powered_changed_at":1537136373.5041091,"brightness_changed_at":1537132261.762635,"desired_powered_changed_at":1537136373.6371195,"desired_brightness_changed_at":1537136360.2472386},"subscription":{"pubnub":{"subscribe_key":"xxx","channel":"87b89e2a72bef13e92c11fd357b7e1778f276f68|light_bulb-3838115|user-924054"}},"light_bulb_id":"3838115","name":"Kitchen Main Lights","locale":"en_us","units":{},"hidden_at":null,"capabilities":{},"triggers":[],"manufacturer_device_model":"lutron_p_pkg1_w_wh_d","manufacturer_device_id":null,"device_manufacturer":"lutron","model_name":"Caseta Wireless Dimmer & Pico","upc_id":"556","upc_code":"lutron_p-pkg1w-wh-d","primary_upc_code":"lutron_p-pkg1w-wh-d","gang_id":null,"hub_id":"908267","local_id":"2","radio_type":"lutron","linked_service_id":null,"order":0}

(joel_shumann) #71

I do not see any issues with the JSON, however it appears that your logging does not have the debug messages enabled. Can you turn on debug logging and send the log messages again please?

Into the Karaf console, put:

log:set DEBUG org.openhab.binding.wink

I found how to enable debug logging in this thread.


(joel_shumann) #72

Another thought I had while looking at the code is that there are two channels for the light. A lightlevel channel and a lightstate channel. The logs are pointing out that your item on PaperUi is hooked up to the lightlevel channel. The lightlevel channel watches the ‘brightness’ param from the JSON logs. When you made the changes, the ‘powered’ param changed, but the ‘brightness’ did not. The ‘powered’ param from the JSON is monitored by the lightstate channel.

It might be worth trying to create two items, one for each channel, and see if one or the other channels receive an update after making changes on the wink app. Then we may be able to determine what needs to change so the items will work the way you would expect.

Unfortunately, I do not have any dimmers or an actual wink hub to try any of this out on. I use the wink binding for my Sensi thermostat, which does not require a physical hub.

Send some logs with debug logging turned on and with the multiple items added to your PaperUi and I’ll look thru the code and try to figure out what is going on here.

Thanks,
Joel


(Mkeefe310) #73

Joel,

I turned debug logging on and have more outputs in the openhab.log file.

I removed the light and added it back to THINGS via PaperUI and have both channels/items enabled (Dimmer with on/off and a separate State on/off)

I am still noticing a disconnect, but it will update, just not properly. Sometimes the State will update, other times the 0-100 dimmer value, other times the dimmer on/off will update.

So, give me some to play around and put this together in a manner that makes sense. I’ll report back with either some logs or if I find something poking through the code and debug logs.

Thanks for the assistance.


(oh_newbie) #74

Questions:

  1. Do I need to have a real Wink hub in order to use this add-on?
  2. Do I need to create a wink account first BEFORE setting up the heroku service?

Thank you.


(joel_shumann) #75

You do not need a physical wink hub.

You do need a wink account before heroku.

Joel


(oh_newbie) #76

Thanks Joel. I got it working after signing up for a Wink acct using the Wink app.

I would like to ask another question. Looking at OH logs, I noticed that the thermostat data seemed to get refreshed every 5 min:

2018-12-10 13:59:25.657 [INFO ] [g.wink.client.CloudRestfulWinkClient] - Json Result: {...}

Could I change the refresh rate? If yes, where?
Thank you.


(joel_shumann) #77

Unfortunately, the refresh period is hardcoded to 5 min.

Joel