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

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

Thanks for the update seems to be working fine for me.

@rlkoshak I meant no disrespect in this post. I was in the middle of a snoopy style happy dance at finally overcoming an months long challenge. I am new to open source and hugely admire the entire open source community that is making all of this possible. The talent, energy and enthusiasm is a welcome change from my life in professional IT. I’ve read and learned from a number of posts from @watou that are first rate. I share your hope that this did not alienate a core member of this community.

3 Likes

With this binding values show correctly and i can change the mode of the thermostat but not the setpoint values and after selecting the values i hit the check mark button all is done under paper ui control.

2017-10-23 19:18:43.857 [vent.ItemStateChangedEvent] - LocalSun_Position_Elevation changed from -6.86 to -7.97
2017-10-23 19:18:45.530 [ome.event.ItemCommandEvent] - Item 'Thermostat_SetPoint' received command 80
2017-10-23 19:18:45.550 [vent.ItemStateChangedEvent] - Thermostat_SetPoint changed from 78.0 to 80
==> /var/log/openhab2/openhab.log <==
2017-10-23 19:18:46.305 [WARN ] [nding.nest.handler.NestBridgeHandler] - Nest API error: Temperature C value is too high: 80.0

Hello i am having a issue making changes to the temp, the log says cant set to 80 C when trying to do it in Fahrenheit.

Did you also uninstall the standard binding and copy the Fahrenheit binding JAR to your addons directory? See my previous comment.

is there any chance of adding a channel for the “true radiant” feature, please?

The wife doesn’t like the boiler waking her up at a random time via the early-on feature of true radiant, but I’d like to auto-enable it for the rest of the day if I can, which can’t be done in the app but could be by openhab if the binding had that channel.

It looks like it is currently not possible to change this setting using Nest REST API that is used by the binding. You could ofcourse ask if Nest wants to add it, e.g. at their support forums.

Another way could be to see what calls your browser makes using the non-public Nest API. E.g. change the setting at your Nest Home page and monitor the network traffic using the developer tools of your browser (F12). Then you can make the same HTTP requests with openHAB.

Thanks. I’ll look into those when I have a bit of time.

Hi,

I have managed to connect Nest Thermostat, nice to see values, thank you!

Questions:

  1. If you buy Nest Thermostat in Europe you get this two relay Heat Link, can you implement Boiler relay control / monitoring in this binding?

  2. Is there a way to monitor main heating relay is on/off? Then we could connect Nest to anything in Openhab. Because now if it is in Heating mode, you can’t say if its heating or not. When you have 0.5 C difference it does show Time to target as 0.

  3. In developers Authorization URL when I accept permissions there is a feature, for Nest Thermostat to know when you are at home, can this be implemented to show up in binding?

  1. Some Warn messages appear, does those needs to be fixed? Log below:
2017-10-29 18:09:34.361 [vent.ItemStateChangedEvent] - NestThermostat_SetPoint changed from 21.0 to 21.5
2017-10-29 18:12:31.062 [vent.ItemStateChangedEvent] - NestThermostat_SetPoint changed from 21.5 to 22.0
==> /var/log/openhab2/openhab.log <==
2017-10-29 18:12:31.068 [WARN ] [nternal.rest.NestStreamingRestClient] - An exception occurred while processing the inbound event
java.lang.NumberFormatException: For input string: ">120"
	at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65) ~[?:?]
	at java.lang.Integer.parseInt(Integer.java:580) ~[?:?]
	at java.lang.Integer.parseInt(Integer.java:615) ~[?:?]
	at org.openhab.binding.nest.internal.data.Thermostat.getTimeToTarget(Thermostat.java:193) ~[?:?]
	at org.openhab.binding.nest.handler.NestThermostatHandler.getChannelState(NestThermostatHandler.java:85) ~[?:?]
	at org.openhab.binding.nest.handler.NestThermostatHandler.getChannelState(NestThermostatHandler.java:1) ~[?:?]
	at org.openhab.binding.nest.handler.NestBaseHandler.lambda$0(NestBaseHandler.java:131) ~[?:?]
	at java.lang.Iterable.forEach(Iterable.java:75) ~[?:?]
	at org.openhab.binding.nest.handler.NestBaseHandler.updateChannels(NestBaseHandler.java:131) ~[?:?]
	at org.openhab.binding.nest.handler.NestThermostatHandler.onNewNestThermostatData(NestThermostatHandler.java:151) ~[?:?]
	at java.lang.Iterable.forEach(Iterable.java:75) ~[?:?]
	at org.openhab.binding.nest.handler.NestBridgeHandler.broadcastDevices(NestBridgeHandler.java:211) ~[?:?]
	at org.openhab.binding.nest.handler.NestBridgeHandler.lambda$0(NestBridgeHandler.java:206) ~[?:?]
	at java.util.concurrent.CopyOnWriteArrayList.forEach(CopyOnWriteArrayList.java:890) ~[?:?]
	at org.openhab.binding.nest.handler.NestBridgeHandler.broadcastDevices(NestBridgeHandler.java:206) ~[?:?]
	at org.openhab.binding.nest.handler.NestBridgeHandler.onNewTopLevelData(NestBridgeHandler.java:428) ~[?:?]
	at org.openhab.binding.nest.internal.rest.NestStreamingRestClient.lambda$4(NestStreamingRestClient.java:157) ~[?:?]
	at java.util.concurrent.CopyOnWriteArrayList.forEach(CopyOnWriteArrayList.java:890) ~[?:?]
	at org.openhab.binding.nest.internal.rest.NestStreamingRestClient.onEvent(NestStreamingRestClient.java:157) ~[?:?]
	at org.glassfish.jersey.media.sse.EventSource$EventProcessor.notify(EventSource.java:687) [161:org.glassfish.jersey.media.jersey-media-sse:2.22.2]
	at org.glassfish.jersey.media.sse.EventSource$EventProcessor.notify(EventSource.java:681) [161:org.glassfish.jersey.media.jersey-media-sse:2.22.2]
	at org.glassfish.jersey.media.sse.EventSource$EventProcessor.onEvent(EventSource.java:668) [161:org.glassfish.jersey.media.jersey-media-sse:2.22.2]
	at org.glassfish.jersey.media.sse.EventSource$EventProcessor.run(EventSource.java:614) [161:org.glassfish.jersey.media.jersey-media-sse:2.22.2]
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [?:?]
	at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:?]
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180) [?:?]
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293) [?:?]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [?:?]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [?:?]
	at java.lang.Thread.run(Thread.java:745) [?:?]
2017-10-29 18:13:27.984 [WARN ] [nternal.rest.NestStreamingRestClient] - An exception occurred while processing the inbound event
java.lang.NumberFormatException: For input string: ">120"
	at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65) ~[?:?]
	at java.lang.Integer.parseInt(Integer.java:580) ~[?:?]
	at java.lang.Integer.parseInt(Integer.java:615) ~[?:?]
	at org.openhab.binding.nest.internal.data.Thermostat.getTimeToTarget(Thermostat.java:193) ~[?:?]
	at org.openhab.binding.nest.handler.NestThermostatHandler.getChannelState(NestThermostatHandler.java:85) ~[?:?]
	at org.openhab.binding.nest.handler.NestThermostatHandler.getChannelState(NestThermostatHandler.java:1) ~[?:?]
	at org.openhab.binding.nest.handler.NestBaseHandler.lambda$0(NestBaseHandler.java:131) ~[?:?]
	at java.lang.Iterable.forEach(Iterable.java:75) ~[?:?]
	at org.openhab.binding.nest.handler.NestBaseHandler.updateChannels(NestBaseHandler.java:131) ~[?:?]
	at org.openhab.binding.nest.handler.NestThermostatHandler.onNewNestThermostatData(NestThermostatHandler.java:151) ~[?:?]
	at java.lang.Iterable.forEach(Iterable.java:75) ~[?:?]
	at org.openhab.binding.nest.handler.NestBridgeHandler.broadcastDevices(NestBridgeHandler.java:211) ~[?:?]
	at org.openhab.binding.nest.handler.NestBridgeHandler.lambda$0(NestBridgeHandler.java:206) ~[?:?]
	at java.util.concurrent.CopyOnWriteArrayList.forEach(CopyOnWriteArrayList.java:890) ~[?:?]
	at org.openhab.binding.nest.handler.NestBridgeHandler.broadcastDevices(NestBridgeHandler.java:206) ~[?:?]
	at org.openhab.binding.nest.handler.NestBridgeHandler.onNewTopLevelData(NestBridgeHandler.java:428) ~[?:?]
	at org.openhab.binding.nest.internal.rest.NestStreamingRestClient.lambda$4(NestStreamingRestClient.java:157) ~[?:?]
	at java.util.concurrent.CopyOnWriteArrayList.forEach(CopyOnWriteArrayList.java:890) ~[?:?]
	at org.openhab.binding.nest.internal.rest.NestStreamingRestClient.onEvent(NestStreamingRestClient.java:157) ~[?:?]
	at org.glassfish.jersey.media.sse.EventSource$EventProcessor.notify(EventSource.java:687) [161:org.glassfish.jersey.media.jersey-media-sse:2.22.2]
	at org.glassfish.jersey.media.sse.EventSource$EventProcessor.notify(EventSource.java:681) [161:org.glassfish.jersey.media.jersey-media-sse:2.22.2]
	at org.glassfish.jersey.media.sse.EventSource$EventProcessor.onEvent(EventSource.java:668) [161:org.glassfish.jersey.media.jersey-media-sse:2.22.2]
	at org.glassfish.jersey.media.sse.EventSource$EventProcessor.run(EventSource.java:614) [161:org.glassfish.jersey.media.jersey-media-sse:2.22.2]
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [?:?]
	at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:?]
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180) [?:?]
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293) [?:?]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [?:?]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [?:?]
	at java.lang.Thread.run(Thread.java:745) [?:?]
2017-10-29 18:13:29.453 [WARN ] [nternal.rest.NestStreamingRestClient] - An exception occurred while processing the inbound event
java.lang.NumberFormatException: For input string: ">120"
	at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65) ~[?:?]
	at java.lang.Integer.parseInt(Integer.java:580) ~[?:?]
	at java.lang.Integer.parseInt(Integer.java:615) ~[?:?]
	at org.openhab.binding.nest.internal.data.Thermostat.getTimeToTarget(Thermostat.java:193) ~[?:?]
	at org.openhab.binding.nest.handler.NestThermostatHandler.getChannelState(NestThermostatHandler.java:85) ~[?:?]
	at org.openhab.binding.nest.handler.NestThermostatHandler.getChannelState(NestThermostatHandler.java:1) ~[?:?]
	at org.openhab.binding.nest.handler.NestBaseHandler.lambda$0(NestBaseHandler.java:131) ~[?:?]
	at java.lang.Iterable.forEach(Iterable.java:75) ~[?:?]
	at org.openhab.binding.nest.handler.NestBaseHandler.updateChannels(NestBaseHandler.java:131) ~[?:?]
	at org.openhab.binding.nest.handler.NestThermostatHandler.onNewNestThermostatData(NestThermostatHandler.java:151) ~[?:?]
	at java.lang.Iterable.forEach(Iterable.java:75) ~[?:?]
	at org.openhab.binding.nest.handler.NestBridgeHandler.broadcastDevices(NestBridgeHandler.java:211) ~[?:?]
	at org.openhab.binding.nest.handler.NestBridgeHandler.lambda$0(NestBridgeHandler.java:206) ~[?:?]
	at java.util.concurrent.CopyOnWriteArrayList.forEach(CopyOnWriteArrayList.java:890) ~[?:?]
	at org.openhab.binding.nest.handler.NestBridgeHandler.broadcastDevices(NestBridgeHandler.java:206) ~[?:?]
	at org.openhab.binding.nest.handler.NestBridgeHandler.onNewTopLevelData(NestBridgeHandler.java:428) ~[?:?]
	at org.openhab.binding.nest.internal.rest.NestStreamingRestClient.lambda$4(NestStreamingRestClient.java:157) ~[?:?]
	at java.util.concurrent.CopyOnWriteArrayList.forEach(CopyOnWriteArrayList.java:890) ~[?:?]
	at org.openhab.binding.nest.internal.rest.NestStreamingRestClient.onEvent(NestStreamingRestClient.java:157) ~[?:?]
	at org.glassfish.jersey.media.sse.EventSource$EventProcessor.notify(EventSource.java:687) [161:org.glassfish.jersey.media.jersey-media-sse:2.22.2]
	at org.glassfish.jersey.media.sse.EventSource$EventProcessor.notify(EventSource.java:681) [161:org.glassfish.jersey.media.jersey-media-sse:2.22.2]
	at org.glassfish.jersey.media.sse.EventSource$EventProcessor.onEvent(EventSource.java:668) [161:org.glassfish.jersey.media.jersey-media-sse:2.22.2]
	at org.glassfish.jersey.media.sse.EventSource$EventProcessor.run(EventSource.java:614) [161:org.glassfish.jersey.media.jersey-media-sse:2.22.2]
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [?:?]
	at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:?]
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180) [?:?]
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293) [?:?]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [?:?]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [?:?]
	at java.lang.Thread.run(Thread.java:745) [?:?]

Yes I removed the original one and rebooted , so i will try again when i get home.

These properties are not in the current Nest REST API. Nest knows people like to use it and have put this request on their backlog.

See also these topics:

https://nestdevelopers.io/t/api-for-hot-water-control-3rd-gen-nest-thermostat/197?u=wborn

https://nestdevelopers.io/t/nest-hot-water-api/931?u=wborn

Not possible with the current API as far as I know. You could also check the values of the temperature and set_point channels. When they differ you would know that Nest is heating (or cooling). I think this is also the logic used by Nest to show an orange or blue color in their App when there is heating/cooling going on.

You can already read this information using the eta_begin channel on a Structure thing. The binding could be improved to also allow for updating it.

That looks like a bug indeed!