Openhab2 Nest binding - 2.2.0.SNAPSHOT An Updated 2.0 Binding that works!

I also hope you are not expecting the values to be in Fahrenheit, because all temperature values are currently Celsius only! :wink:

Celsius is fine.

Have just thought, should I be doing sendCommand rather than postUpdate?

Yes you should use sendCommand for the binding to send a command to Nest. postUpdate will only update the value of an openHAB item.

It’s also possible to send commands via Paper UI by changing the values of your themostat using the “Control” page. This will also result in a sendCommand.

Now i’m doing it right and sending a command and not an update, it’s working. :slight_smile:

Apologies for being a numptie and thanks for your help in getting me sorted.

I have just noticed that errors appear in the log when changing the set_point. As it’s still in development I guess those are already known about, but if someone would like to see those errors just say.

That’s great news! These posts will also be helpful to other people. :wink:

Can you post the warnings/errors that you see when updating the set_point? There shouldn’t be any.

sure.

2017-10-13 16:47:59.962 [WARN ] [eclipse.jetty.servlet.ServletHandler] - /proxy
java.lang.NullPointerException: null
        at java.net.URI$Parser.parse(URI.java:3042) [?:?]
        at java.net.URI.<init>(URI.java:588) [?:?]
        at java.net.URI.create(URI.java:850) [?:?]
        at org.eclipse.smarthome.ui.internal.proxy.ProxyServletService.uriFromRequest(ProxyServletService.java:267) [138:org.eclipse.smarthome.ui:0.9.0.201709121704]
        at org.eclipse.smarthome.ui.internal.proxy.AsyncProxyServlet.rewriteTarget(AsyncProxyServlet.java:61) [138:org.eclipse.smarthome.ui:0.9.0.201709121704]
        at org.eclipse.jetty.proxy.ProxyServlet.service(ProxyServlet.java:63) [81:org.eclipse.jetty.proxy:9.3.14.v20161028]
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:790) [31:javax.servlet-api:3.1.0]
        at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:845) [86:org.eclipse.jetty.servlet:9.3.14.v20161028]
        at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:584) [86:org.eclipse.jetty.servlet:9.3.14.v20161028]
        at org.ops4j.pax.web.service.jetty.internal.HttpServiceServletHandler.doHandle(HttpServiceServletHandler.java:71) [172:org.ops4j.pax.web.pax-web-jetty:6.0.6]
        at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143) [85:org.eclipse.jetty.server:9.3.14.v20161028]
        at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:548) [83:org.eclipse.jetty.security:9.3.14.v20161028]
        at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:226) [85:org.eclipse.jetty.server:9.3.14.v20161028]
        at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1180) [85:org.eclipse.jetty.server:9.3.14.v20161028]
        at org.ops4j.pax.web.service.jetty.internal.HttpServiceContext.doHandle(HttpServiceContext.java:284) [172:org.ops4j.pax.web.pax-web-jetty:6.0.6]
        at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:512) [86:org.eclipse.jetty.servlet:9.3.14.v20161028]
        at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185) [85:org.eclipse.jetty.server:9.3.14.v20161028]
        at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1112) [85:org.eclipse.jetty.server:9.3.14.v20161028]
        at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) [85:org.eclipse.jetty.server:9.3.14.v20161028]
        at org.ops4j.pax.web.service.jetty.internal.JettyServerHandlerCollection.handle(JettyServerHandlerCollection.java:80) [172:org.ops4j.pax.web.pax-web-jetty:6.0.6]
        at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:134) [85:org.eclipse.jetty.server:9.3.14.v20161028]
        at org.eclipse.jetty.server.Server.handle(Server.java:534) [85:org.eclipse.jetty.server:9.3.14.v20161028]
        at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:320) [85:org.eclipse.jetty.server:9.3.14.v20161028]
        at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:251) [85:org.eclipse.jetty.server:9.3.14.v20161028]
        at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:273) [77:org.eclipse.jetty.io:9.3.14.v20161028]
        at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:95) [77:org.eclipse.jetty.io:9.3.14.v20161028]
        at org.eclipse.jetty.io.SelectChannelEndPoint$2.run(SelectChannelEndPoint.java:93) [77:org.eclipse.jetty.io:9.3.14.v20161028]
        at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.executeProduceConsume(ExecuteProduceConsume.java:303) [88:org.eclipse.jetty.util:9.3.14.v20161028]
        at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.produceConsume(ExecuteProduceConsume.java:148) [88:org.eclipse.jetty.util:9.3.14.v20161028]
        at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.run(ExecuteProduceConsume.java:136) [88:org.eclipse.jetty.util:9.3.14.v20161028]
        at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:671) [88:org.eclipse.jetty.util:9.3.14.v20161028]
        at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:589) [88:org.eclipse.jetty.util:9.3.14.v20161028]
        at java.lang.Thread.run(Thread.java:745) [?:?]

@DSTM Maybe your browser is on a page generated by openHAB with an Image or Video item that has a URL that is null?

Not as far as I’m aware. is that what the error is, then? I couldn’t see anything in it to identify what was triggering it.

If it’s nothing to do with the Nest binding, that’s good. Thanks again for your help.

@DSTM The error seems to be generated by a call made from one of the openHAB UIs (or maybe even an iOS/Android App). The call is processed by the Jetty server running inside openHAB and it then tries to proxy it to a destination that is null (hence the NullPointerException). So it looks unrelated to the Nest binding.

You could further debug the source of it by opening your browser debug view (F12). There is a “Network” tab where you can monitor all HTTP requests that are made. When a call fails it is highlighted in a red font. Typically it will have a 4xx or 5xx status code.

When you then click on the failed request it will show its details. E.g. the request URL/method and headers. Those details may help with finding the source of the error.

@wborn thanks. I think i’ve identified the problem.

1 Like

Hi @DSTM i’m newbie on OA2 and i’m try to use the nest2 binding but i don’t understand how to install it. Until yesterday i was using the 1.0 nest binding with succes but i tried to use the one and i don’t understand how can i install the binding, for previous one i did it from paper UI but there i can only find the 1.0’s, is there a tutorial to install the new one?
i’m sure my Nest API ara running because with curl i can read messages from my thermostat.

Best
Davide

hi david

you need to be running OH 2.2, i think. There’s a file called org.openhab.binding.nest-2.2.0-SNAPSHOT.jar somewhere on github (I can’t find where at the moment) and the readme for it is here:-

If you can find the snapshot.jar you need to download it and put it in your addons folder, and then you should be able to add Nest things in PaperUI in the normal way.

https://openhab.ci.cloudbees.com/job/openHAB2-Bundles/lastSuccessfulBuild/org.openhab.binding$org.openhab.binding.nest/

thank you guys, this evening i will try the new (for me) binding

@DSTM @sihui thank you, i had some problem because i was running with OA2.1 but now with 2.2 my nest binding is ok

Out of curiosity, is there any chance anyone is working on getting the binding to work with Fahrenheit? It would be particularly useful for those of us in the States to be able to chose a scale and the V1.x binding used both.

@mladams922 I’ve considered working on adding Fahrenheit support to the binding even though I live in a Celsius world. However I would rather wait for the forthcoming Eclipse SmartHome unit conversion feature to land before adding it. All the off world scientists will then probably also be able to use their Kelvin unit with the binding. :wink:

See also this pull request:

Is there a way to work around this for the time being? Or should I just use the old binding untill this gets updated?

@mladams922 I’ve spent a few minutes to make a custom Fahrenheit build of the 2.2.0-SNAPSHOT Nest binding.

You can use it by first uninstalling the standard Nest binding and adding this org.openhab.binding.nest-2.2.0-fahrenheit.jar to the openHAB /addons directory.

That should make using Fahrenheits with Thermostats more easy until real Fahrenheit support is added to the OH2 Nest binding! :slight_smile:

The minimal changes are in this branch on GitHub:

That’s very nice of you! Thanks for that, I was looking into creating my own temporary branch of the binding until the official one was released. I appreciate this and I will put it to use.

Thanks again!

1 Like