Emerson Sensi Thermostat

Joel, and all,

First of all… THANK YOU Joel Shumann for creating the WINK Binding!

None of this would be possible without your excellent work and posts and the binding code. THANKS SO MUCH!

I have read every post on this thread (several times) to figure it all out and now I have successfully connected my Emerson Sensi WiFi Thermostat to my OH2 running on my Intel NUC. Its a detailed process of many steps, but this thread had enough info to point me the right way.

I am using BINDING org.openhab.binding.wink-2.4.0-SNAPSHOT.jar in the FOLDER /usr/share/openhab2/addons/

2 QUESTIONS as of now:

  1. is there ANY WAY to please allow the 5-minute WINK POLLING INTERVAL to be faster? The 5-minute resolution of monitoring my Thermostat(s) is far too long… I use mySQL persist to capture IDLE timestamps COOLING timestamps into my local database for analysis and reports… and the coarse 5-minute boundary is not really something I can use long term. PLEASE?

  2. The PubNub Errors… can this be fixed or solved?

Again, THANK YOU and I look forward to working with you on this. GREAT STUFF!
Dave

Hello @BirdingPix Dave,

First of all, I cannot take credit for the binding. I have just worked on adding the thermostat support, which works, but not as well as I hoped. Thank you for the kind words.

Over the next few weeks I should have time to look into this some more. I will figure out a way to make the polling interval configurable.

I will also do some work on the PubNub errors. Thanks for posting what your logs look like.

Joel

Joel, THANKS SO MUCH!

I am also frustrated by the fact that sometimes… even though the binding is online and everything looks okay in openHAB… any THERMOSTAT setting changes made in the PaperUI or via my own BasicUI running my sitemap… (for example, change the setpoint temp)… the change appears on my screen… but NOTHING changes on the actual thermostat.

Its as if either WINK or openhab-authservice or ? is not connected or active… and the bottom line is that I am UNABLE to actually change any settings or if I manually change the thermostat by pushing the buttons on the actual thermostat… those changes do not show up in my openhab.

After installation 2 weeks ago, all worked great… for a few days. Then, something was “down” for 4 days… and suddenly as of 2 days ago… it all started working again and changes made in my openhab basicUI screens DID IN FACT change the thermostat!

I really would love to be able to not need any external cloud services to make this all work!

THANKS SO MUCH… looking forward very much to working with you.
Dave
Houston, Texas

I made the polling interval configurable. It defaults to 300 seconds. Add the following to your wink.cfg to adjust the time to 60 seconds, for instance.

pollingIntervalSeconds=60

For the PubNub issues, I found while reading on the HomeAssistant site that Wink changed the PubNub setup. I made adjustments so things no longer timeout, however more work is needed to get the PubNub subscriptions working properly.

I pushed a new jar to my github.

Please let me know what you find. I made the polling wait for the PubNub to connect, so there is a chance the polling will never work if the PubNub does not succeed. Let me know if that happens and I can make an adjustment.

Joel

1 Like

Hi @joel_shumann

THANK YOU! I’ve installed your updated BINDING… and it’s working GREAT! Still something that PubNub is not happy about… but the 60 seconds polling is working nicely. Great progress!!

What do we need PubNub for ?


THANKS SO MUCH!
Dave

Glad it is working so far.

We use pubnub to get instant updates when things change, rather than polling. But since pubnub is not working right, we will continue to rely on polling.

Joel

Hi @joel_shumann, @BirdingPix
With the latest binding and polling interval set at 60 sec, do you get a temperature update every 60 sec? In my log below, I can see a device polling every 60 sec but not all results in an update. Is this a correct behavior?

In older bindings, an update occurs every 5 minutes which I rely on to trigger some of my rules. So for now I have to use an older version.
Thanks

2019-09-24 14:57:20.492 [DEBUG] [ng.wink.handler.WinkBaseThingHandler] - WinkBaseThingHandler::pollingJob() calling GetDevice
2019-09-24 14:57:34.717 [DEBUG] [ng.wink.handler.WinkBaseThingHandler] - PubNub request is incorrect.
2019-09-24 14:57:36.032 [DEBUG] [ng.wink.handler.WinkBaseThingHandler] - PubNub status operation null
2019-09-24 14:58:20.492 [DEBUG] [ng.wink.handler.WinkBaseThingHandler] - WinkBaseThingHandler::pollingJob() calling GetDevice
2019-09-24 14:58:23.710 [DEBUG] [ng.wink.handler.WinkBaseThingHandler] - PubNub request is incorrect.
2019-09-24 14:58:25.034 [DEBUG] [ng.wink.handler.WinkBaseThingHandler] - PubNub status operation null
2019-09-24 14:59:20.492 [DEBUG] [ng.wink.handler.WinkBaseThingHandler] - WinkBaseThingHandler::pollingJob() calling GetDevice
2019-09-24 15:00:20.492 [DEBUG] [ng.wink.handler.WinkBaseThingHandler] - WinkBaseThingHandler::pollingJob() calling GetDevice
2019-09-24 15:00:30.227 [DEBUG] [ng.wink.handler.WinkBaseThingHandler] - PubNub.message string to be parsed by json: {"nonce":"xxxxx","pull_url":"https://api.wink.com/thermostats/xxxxxx","thermostat_id":"xxxxxxx"}
2019-09-24 15:00:30.230 [DEBUG] [ng.wink.handler.WinkBaseThingHandler] - PubNub.message, PubNub unable to get current state, calling GetDevice, polling...
2019-09-24 15:00:30.233 [DEBUG] [g.wink.client.CloudRestfulWinkClient] - Getting Device: xxxxxxxxxxxxxxxxxxxx
2019-09-24 15:00:30.249 [DEBUG] [g.wink.client.CloudRestfulWinkClient] - Doing Get: JerseyWebTarget { https://api.wink.com/thermostats/xxxxxxxxxxxxxxxxxxxx }
2019-09-24 15:00:30.960 [DEBUG] [g.wink.client.CloudRestfulWinkClient] - CloudRestfulWinkClient::getResultAsJson() response passed in = {"data":xxxxxx}
2019-09-24 15:00:30.989 [DEBUG] [g.wink.client.CloudRestfulWinkClient] - Got Device, Name: T2
2019-09-24 15:00:31.009 [DEBUG] [nding.wink.handler.ThermostatHandler] - units string contents: f
2019-09-24 15:00:31.016 [DEBUG] [nding.wink.handler.ThermostatHandler] - Updated CHANNEL_THERMOSTAT_CURRENTTEMPERATURE

In an effort to get PubNub working, I made it so the polling does not occur until the PubNub subscription is established. In your log, I do not see a ‘PubNub connected’ statement which means polling is disabled.

I just uploaded a version that removed this and also does not attempt any PubNub subscriptions.

Thanks,

Joel

Thank you @joel_shumann! It works-updating every 60 sec.

Using the latest 2.5.0 SNAPSHOT. Got this error message when I added the .jar to the addons folder.

22:46:44.968 [ERROR] [org.apache.felix.configadmin         ] - [org.osgi.service.cm.ManagedService, id=444, bundle=236/file:/C:/openhab2/addons/org.openhab.binding.wink-2.4.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) ~[?:?]
        at org.apache.felix.cm.impl.helper.ManagedServiceTracker.updated(ManagedServiceTracker.java:189) ~[bundleFile:?]
        at org.apache.felix.cm.impl.helper.ManagedServiceTracker.updateService(ManagedServiceTracker.java:152) [bundleFile:?]
        at org.apache.felix.cm.impl.helper.ManagedServiceTracker.provideConfiguration(ManagedServiceTracker.java:85) [bundleFile:?]
        at org.apache.felix.cm.impl.ConfigurationManager$ManagedServiceUpdate.provide(ConfigurationManager.java:1118) [bundleFile:?]
        at org.apache.felix.cm.impl.ConfigurationManager$ManagedServiceUpdate.run(ConfigurationManager.java:1074) [bundleFile:?]
        at org.apache.felix.cm.impl.UpdateThread.run0(UpdateThread.java:138) [bundleFile:?]
        at org.apache.felix.cm.impl.UpdateThread.run(UpdateThread.java:105) [bundleFile:?]
        at java.lang.Thread.run(Thread.java:748) [?:1.8.0_163]

I’m sorry, I have not been able to get things to build with the latest version, 2.5. I have stopped using the wink binding.

Oh I didnt realize that new versions of openhab broke bindings. Thats not good

Im trying to get my Emerson Sensi thermostat linked to OpenHab. Is there something else that you use now?

I do not use my thermostat with OpenHAB any more. Sorry.

Any pointers on how to get it working?

Do you have the 2.5 addons building? If you do, I could share the wink code on github and then see if you have better success.

I have emailed Sensi on more than one occasion asking if they’d support things like openHAB commercially, but they just say they’ll forward to their developers…and I guess they just throw it out. :frowning:

Yeah I want to get the termostat connected so Ill give it a go. Not sure what you mean by 2.5 addons building though.

I was talking about going thru the development setup and getting everything compiling. I had this working for the older release, but I cannot get it working with the latest release. In theory if we can get things compiling successfully, we should be able to add the wink code into the structure and build it so it will work again.

I could be interested in collaborating if there are some others who want to try and pick this up together.

I could likely throw 10-15 hours at it and see if it is fruitful.

Hello @openhab2 Gadget Guy,

I could not get past my dependency issues. I was failing for android.net very similar to this post.

Unable to resolve org.openhab.binding.netatmo/2.5.0.201907090725: missing requirement [org.openhab.binding.netatmo/2.5.0.201907090725] osgi.wiring.package; filter:=“(osgi.wiring.package=android.net)”]]

I tried a few different things, but I was unable to resolve it.

I put my code in its current state on GitHub here. This was previously building properly under openHAB 2.3.x. I tried to get it building on the latest 2.5.x without success.

It would be great if you could see what I am doing wrong.

Thanks,
Joel