Emerson Sensi Thermostat


(Robert Bouchard) #22

Yes !
I would like to have this working here ! :slight_smile:
But, I’m the best Rookie to test the foolproof of your work ! lol

Did you get the sensi thermostat working with openhab just over wifi, without any other device ? Hub or ?

Thank you ! :slight_smile:


(joel_shumann) #23

Yes. I have a jar built that uses the wink binding. No other wink hardware is required, but you do have to setup a wink software bridge which is pretty easy to do thru paper UI.

Also, you have to setup your device with wink’s app.

I’ll look how others share unreleased jar files so you can try it out if you are interested. I have a pull request pending.

Joel


(joel_shumann) #24

@Robert_Bouchard, You can download the wink jar from here: https://github.com/woopelderly/wink-thermostat-jar.git

Follow the readme from here: https://github.com/woopelderly/openhab2-addons/tree/ring_doorbell/addons/binding/org.openhab.binding.wink

For all the items to refresh properly on my sitemap in the basic ui, I added all of my thermostat items to my persistence file as well.

Let me know if you have any questions or issues!


(joel_shumann) #25

One downside with wink is that when you adjust the temperature set point, it turns scheduling off. I have reached out to sensi and to wink to see if they will expose the temporary temperature setting so scheduling does not get shut off when making changes with the wink binding. It is a feature request on wink’s side, so we will see if it ever gets implemented.


(Robert Bouchard) #26

Hum, Yeah I’m lost ! :confused:
Where I can find how to or where to put files… i’ve looked in Eclipse SmartHome binding tutorial, but i’m not there ! :confounded:

I’ve created and account at Wink, got Client ID and Secret…
I’ve put the Wink binding folder in my \OPENHABIANPI\openHAB-share/org.openhab2-addons/ folder.

Added the wink.cfg in \OPENHABIANPI\openHAB-conf\services\ with Wink’s clien ID and secret inside.
(Even there, I’m not shure I’ve done it right, they asked for a web site I used my Github page, is it good ? they finaly provide clienID and secret, but…)

But the jar ? where it goes ? Edit: ok it’s an archive… :roll_eyes: …working on it…

I can’t see in the PaperUI the Wink binding install option.

Thank you very mutch ! :slight_smile:


(joel_shumann) #27

I used the following service so I did not have to create my own secret and ID with wink.

https://openhab-authservice.herokuapp.com

Then, in my wink.cfg file, i have:

auth_service=delegated
auth_service_token=token_displayed_on_authservice_screen_after_login

Did you try to use the herokuapp link? It is a little confusing, but here is the process:

  1. Navigate to the auth service website and use your github credentials to login

  2. Then create a password for the service.

  3. Then, you will be presented with a screen that asks you to change your password, you do not need to do this. Go back to the original link for the auth service.

  4. Then, near the bottom, click the “Connect to Wink”. You will be directed to Wink’s login page. Use your wink credentials to login.

  5. Finally, go back to the original link for the auth service and your token will be available near the bottom. This is the token you put in your wink.cfg for the auth_service_token parameter.

The jar should go into your addons folder.

After doing this, you should be able to add items through the PaperUI. I don’t think I had to ‘install’ the binding. Don’t forget to manually add the WinkHub2 Thing with the PaperUI before trying to add your thermostat.

Let me know how it goes, and thank you for trying it out!


(Robert Bouchard) #28

Hey thank you sir !
Will have a look this week :smiley:
I’ll keep you updated :grinning::+1:


(Robert Bouchard) #29

:hugs: It Work !
Thank you very mutch ! I wouldn’t be able alone for shure.

It oppened a new door to conquer (at least discover new obstacles, but many opportunyties !? :wink: )

A lot to learn again… :slight_smile:


(joel_shumann) #30

Thanks for letting me know. I’m glad it worked!


(Nathan Ellsworth) #31

Hi Joel

I think I have successfully followed your recipe for getting my two Sensi thermostats connected to openHAB2. I got the token and the Wink app on my iPhone can see my thermostats. openHAB can see my pseudo Wink hub. But when I search for Wink devices, nothing happens and I see this error repeatedly in openhab.log.

Any ideas? Does the jar need to be rebuilt against some newer libraries?

2018-06-28 14:40:18.635 [WARN ] [org.eclipse.jetty.server.HttpChannel] - //10.1.1.20:8080/rest/discovery/bindings/wink/scan

javax.servlet.ServletException: javax.servlet.ServletException: org.glassfish.jersey.server.ContainerException: java.lang.IncompatibleClassChangeError: Expected static field org.openhab.binding.wink.internal.discovery.WinkDeviceDiscoveryService.scheduler

(joel_shumann) #32

Hello Nathan,

The jar was built for OpenHAB 2.2. Are you running 2.2? Over the next week or so I will get this going in the debugger and try to duplicate your error. Please let me know which version of OpenHAB you are running so I will have a better chance of resolving this.

Thanks,
Joel


(Nathan Ellsworth) #33

My install was from the latest openHABian image and says “openHAB 2.3.0 Release Build”.

I never used openHAB 2.2. Do you think your jar will need to be recompiled for 2.3?

-Nathan


(joel_shumann) #34

I think I read on the forum somewhere about the versions needing to be the same. Once I get a 2.3 build, I’ll post the jar.

Joel


(Nathan Ellsworth) #35

Excellent


(Nathan Ellsworth) #36

Hi Joel. I see you posted an OH 2.3 Wink jar file. What is the procedure for upgrading to this new version? Do I just put the jar file in the addons directory?

Thanks


(Nathan Ellsworth) #37

So I put in the new Wink jar file and restarted OH. Lots of errors are showing up related to Wink, like this:

2018-07-06 11:46:09.782 [ERROR] [org.openhab.binding.wink            ] - [binding.wink(24)] Error during instantiation of the implementation object

java.lang.Error: Unresolved compilation problems: 

	The import com.google.common cannot be resolved

	ImmutableSet cannot be resolved

	ImmutableSet cannot be resolved

	at org.openhab.binding.wink.internal.WinkHandlerFactory.<init>(WinkHandlerFactory.java:30) ~[?:?]

	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) ~[?:?]

	at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) ~[?:?]

Also, why I try to manually add a Wink Hub 2 thing:

2018-07-06 11:47:43.416 [WARN ] [ore.thing.internal.ThingRegistryImpl] - Cannot create thing. No binding found that supports creating a thing of type 'wink:wink_hub_2'.

Any ideas?

-Nathan


(joel_shumann) #38

Sorry. I posted that jar prematurely. I am working on this still but only get an hour here and there to work on it. I am close I think to having a working jar.

Joel


(joel_shumann) #39

I have a version built that I am trying to debug with. I installed the 2.3 runtime and dropped in my jar to the addons folder, but I keep getting the following error:

org.osgi.framework.BundleException: The bundle class path entry "lib/pubnub-gson-4.4.3-all.jar" 
could not be found for the bundle "osgi.identity; type="osgi.bundle"; version:Version="2.4.0.201807071109";
osgi.identity="org.openhab.binding.wink"; singleton:="true""

I’m not sure how to add the necessary dependency so the binding will work. Previously when debugging my jar, I did not have this dependency issue.

I am also getting:

2018-07-07 07:46:02.931 [ERROR] [org.openhab.binding.wink            ] - Component descriptor entry 'OSGI-INF/*.xml' not found

This is what I am currently stuck on…

@shawncrosbys, do you happen to know what I’m doing wrong with the wink binding and the pubnub-gson dependency? My end goal is to use the wink thermostat feature.

EDIT: I see, I was missing a lib directory call out in my build.properties file… All set on the dependency issue.

@42Network, Please try the 2.4 jar. The bundle activated without errors, but I was unable to add any things in paper ui. Can you let me know if this is the same for you?


(Nathan Ellsworth) #40

Thanks for letting me know about the new version.

All I have to do is put the 2.4.0 jar in my addons directory?

I copied it and then restarted OH. I see this error in the logs:

2018-07-07 21:17:17.259 [ERROR] [org.apache.felix.configadmin        ] - [org.osgi.service.cm.ManagedService, id=121, bundle=222/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]

Am I doing something wrong for the installation of the jar possibly?

Thanks


(joel_shumann) #41

You should be able to just drop the jar into the addons folder.

Could you please try closing down OH and Clear OH Cache and try again.

How far do you get before the errors show up? Do the errors come just after starting up OH, or do they come as you try to add the wink hub thing and/or thermostat thing?