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

The possible values are named differently in the 2.2. binding. Most values are in caps now. The documentation list the possible values between round brackets. So this will probably work:

Switch item=dining_room_hvac_mode mappings=["HEAT"="Heat","COOL"="Cool","HEAT_COOL"="Auto","OFF"="Off"]
Switch item=dining_room_hvac_state mappings=["HEATING"="Heat","COOLING"="Cool","OFF"="Idle"]

I was missing them too and added them a few days ago with PR #3024 which should be part of the 2.3.0-SNAPSHOT builds. Since the official documentation did not yet get updated you can check the source code documentation instead. Probably you’ll need to delete and re-add the respective Things before you’ll be able to see and use these new channels.

Many thanks,

That solved everything, the new channels for Nest Protect Date/Time seem to be working also with the latest SNAPSHOT (I did have to delete and re-add the Things, but it was easy).

1 Like

Rather than having a separate Fahrenheit binding, would you consider simply adding another channel to the Nest Thermostat Thing for the Fahrenheit value? I believe we had the choice of both F and C with the v1 binding so it is disappointing to have to maintain a separate custom install now. Adding a channel has no downside that I can see, but perhaps I am missing something.

Regarding the Unit Converter, that would work but we would get different temperature values via the conversion than the thermostat reports via the API. I would prefer to have the values that Nest reports.

Happy to beta test! :grinning:

The new QuantityType is almost there and definitely the cleanest way to implement this. The Weather Underground binding will also be using it once it is merged. So this will probably all make it into OH 2.3.

When the binding updates channel states it can choose what unit is used (see WU implementation). So we can let the binding update state using the Fahrenheit values (or Celsius values) received by the API depending on the temperature_scale property of the Thermostat.

I super curious how this would work. Yes, you can convert C->F and F->C however:

In Fahrenheit control mode, Nest can be changed in 1 deg F increments only (0.55 deg C)
In Celsius control mode, Nest can be changed in 0.5 deg C increments only (0.9 deg F)

I don’t think you could simply take the input from a control in F, convert to C and send the command to the Nest. There would need to be built in logic to fix these differences. I’m curious how Quantity type handles that.

almost certainly just rounds to the nearest degree f or nearest .5 degree c.

“Almost certainly” is the key word here. Why do we have to assume what the functionality will be? The binding will have to do conversions to make sure the value that is being sent is valid; I don’t see how that is possibly cleaner when the API supports both F and C natively. I get that it is a good choice for something like the WU binding, but that is a read-only binding, and the fact that we need to both get and set temperatures makes a difference, in my opinion.

Then I suggest you find the issue where this is being discussed and implemented and raise your concerns. I believe @wborn provided a link.

Sorry, perhaps I missed it but I don’t see a link to a discussion specifically regarding using the QuantityType binding to convert C to F in the Nest binding. I only see links to the QuantityType PR and the WU example. I also searched open issues and PR on the oh2 addons repo.

I’m happy to comment on a PR or issue on GitHub if this forum is not the appropriate venue for this discussion.

It isn’t that this forum isn’t a good place, but to reach the people who are actively working on this code you have to go to where they are working.

Sorry, again, that doesn’t seem to be the right place. That appears to be the general discussion for the QuantityType binding and not the discussion about the specific point I raised regarding how the Nest binding will handle F and C values. Posting about the Nest binding on that PR seems off topic


It isn’t off topic because if the Nest binding will need to use that service, then the logic you are concerned about (i.e. converting between the two based on limited and incompatible precision) would have to be implemented there, unless @wborn provided the wrong link or I’m misunderstanding what he is proposing how this would be used to implement this.

I’m dusting off my OH install after a distracting 7 months, and can’t get the nest binding to work.

I started with a new Openhabian install, and moved my configurations over.
I requested new credentials for a nest app, and structures and everything appear in the things inbox.

However, I can’t get my items and sitemaps to display. I’ve renamed no items in the nest app.

Where could I be going wrong?

Have you accepted those Things out of the Inbox?

Have you linked your Items to the channels on those Things?

Yes, I’ve accepted the items. I can see all the channels underneath.

But what does ‘linking items to the channels’ actually involve?

Do I cut/paste something from a thing to my standard.items file? Why would my old entries not work?

Do I do something using paper UI? Should I be using a different tool?

When I do link an item with paper UI does it add an entry in standard.items? I see some weird entry in Visual Studio, which I am still unsure of where all these items are.

I know I am being somewhat obtuse with this, but this is really not very intuitive. I felt like I had a reasonable layman’s handle on it when I stopped maintaining my environment, but I feel like I really do not know where to begin since returning.

@alfista2600 I think you were previously using the old OH 1.x Nest Binding, if so you can either:

or

  • Uninstall the OH2.2 Nest Binding and install the legacy OH 1.x Nest Binding after enabling legacy bindings (Paper UI -> Configuration -> System -> Add-on Management -> Include Legacy 1.x Bindings)

As Wouter says, the Nest 2 binding is a completely different binding and works much differently.

https://docs.openhab.org/configuration/items.html#2x-binding-configuration

No, and as far as I know, you cannot link an Item to a Channel on Items defined in .items files.

Do you have Simple Mode turned on under Configuration-> Server? If so, a new Item will be automatically created for each Channel on each Thing and the name of the Item will be the name of the Channel. These Items are not stored in your .items files.

I highly recommend https://docs.openhab.org/tutorials/migration.html

New OpenHabian install - removed all old Nest refs,
Installed the Nest 2.2.0 binding via PaperUI (Official one therefore)

Followed: https://docs.openhab.org/addons/bindings/nest/readme.html

and winner winner chicken dinner - previously, I was suffering since moving from OH1 to OH2.

Top work guys!

Now only dumb q :slight_smile:
I can control temperatures, etc via the binding / switches etc just fine, but could someone tell me
 how do I fully disable one Nest’s built in control so permanently override it with my own OH code?

I am coding separate, individually zoned rooms - so literally want to use one of my Nests as an on/off switch (*while the other gets left to do its own thing)

I don’t think this can be done. You can empty out the schedule on the Nest and you certainly should turn off the learning. But as far as I know, it is impossible to turn the Nest into just a “dumb” thermostat.

I’ve kind of done this already - I keep meaning to get some time set aside to do a write-up!

I am essentially, however, setting the target temp to either 13 degress or 24 degrees based upon whether I want the heating on or off.