only returns the metadata object and nothing related to my devices. So, as a result, I’m getting bunch of
2016-10-05 06:04:22 ERROR - Unable to get state from data model
org.apache.commons.beanutils.NestedNullException: Null property value for 'structures(Home).away' on bean class 'class org.openhab.binding.nest.internal.messages.DataModelResponse'
at org.apache.commons.beanutils.PropertyUtilsBean.getNestedProperty(PropertyUtilsBean.java:755) ~[commons-beanutils-1.8.3.jar:1.8.3]
at org.apache.commons.beanutils.PropertyUtilsBean.getProperty(PropertyUtilsBean.java:846) ~[commons-beanutils-1.8.3.jar:1.8.3]
at org.openhab.binding.nest.internal.messages.DataModel.getProperty(DataModel.java:339) ~[bundlefile:na]
at org.openhab.binding.nest.internal.NestBinding.getState(NestBinding.java:238) [bundlefile:na]
at org.openhab.binding.nest.internal.NestBinding.readNest(NestBinding.java:206) [bundlefile:na]
at org.openhab.binding.nest.internal.NestBinding.execute(NestBinding.java:168) [bundlefile:na]
at org.openhab.core.binding.AbstractActiveBinding$BindingActiveService.execute(AbstractActiveBinding.java:156) [org.openhab.core_1.8.3.jar:na]
at org.openhab.core.service.AbstractActiveService$RefreshThread.run(AbstractActiveService.java:173) [org.openhab.core_1.8.3.jar:na]
I have created and re-created nest applications and generated multiple pin codes all to end up at the same place
My suspicion is that the permissions in the Nest product you defined at the developer site are incomplete, particularly missing the ability to read structures. If this is correct, edit the product to have all the permissions you need, create a new PIN for your account and update openHAB.cfg, and restart the openHAB server.
I am not seeing where to set that permission. As of now, I have every available option enabled with read/write permission. The only options that are not enabled are: Product Data and Camera as they are grayed out.
The “Away” permission actually refers to the structure, so it looks like you are covered for permissions.
That’s odd that Camera would be unavailable, but perhaps you didn’t set a permission for it when you created/last edited the product. It shouldn’t be related to this issue though.
If you see the JSON payload response and it has nothing about your devices, then all I can think of is that you somehow authorized some other Nest account than the one that contains your devices and structures, or there is some problem at the Nest servers. There had been a report awhile back about bad data coming back from the Nest servers that was eventually made right.
If neither of those are possible, consider defining a totally new Product, update openhab.cfg with the new key, secret and PIN, and restart the openHAB server.
By “recycled,” do you mean you created a new Product attempting to resolve this issue? I don’t know if there is anything unexpected about the older Products.
I don’t know why, if you use the Authorization URL against the Nest account where your devices and structures are and produces a PIN you copy into openhab.cfg, that the binding would not have all of your devices and structures in the JSON payload. The only possibility I can think of is a problem on the Nest API side. Perhaps Nest Support should hear about it?
I chatted with tech support and they told me that I should call them up with my case id…
While I was doing that, I tried curling the whole thing (from getting the bearer token to calling the developer-api.nest.com endpoint) and, after being redirected to firebase, I’m not seeing anything other than the metadata segment.
I’ll call them up later today and will update with my findings.
After spending 40 minutes with Nest tech support, I was told that they cannot help me and referred me to their forum… After a LOT of searching for the developer portal, I ended up on the stack overflow with a nest-api tag. I’m still waiting for my question to be answered there. Once it’s answered, I’ll post another update here.
If you are interested, here’s the link to my OS question.
I know it would be very tedious to do, but if you created a new Nest account and associated one or more of your devices with it and authorised the app with it with a new PIN, would the devices show up via the API?
I’m currently in the middle of switching from a full blown PC to a Raspberry Pi and I’m gradually moving bindings over. As of now, I have Nest on both computers and, my original machine has nest binding that is performing as it should…
What are the odds of Nest prohibiting multiple “products” talking to the same structure and device?
The symptoms of this problem make no sense, as I understand them. You have a perfectly functioning Nest binding on a PC, but you’ve tried just about every possible change to make it work on a Raspberry Pi, and even completely outside of openHAB, you only get the “metadata” message in the JSON payload.
All I have left to suggest is to go back over your changes and check the “science” of your tests and observations to make sure you’re seeing what you believe you are. This is certainly a weird one…
It’s just such a strange situation that, unless there is some obscure detail we missed, the problem has to be on the Nest API side. So my comment was just a suggestion to step through everything you did as an additional check.
The Nest binding saves its tokens using the Java Preferences API. On Linux, this is kept by default under the ~/.java/.userPrefs directory, under further directories with irritatingly difficult directory names (I press TAB at a Linux command prompt to help expand the directory name). You could delete part or all of the .userPrefs directory tree and restart openHAB, just to see if some bit of configuration is stuck somehow (but I’ve tested this in the past and it wasn’t needed).
So that’s the sum total of my advice on sorting this out. I hope you have a Eureka! moment and get it working!
so, this is a hack and it’s working for me for the time being (but I don’t like it and I’m hoping I’ll get some answers from Nest as to what’s going on)…
I’ve basically copied the prefs.xml file from my working PC onto my Raspberry Pi and I’m able to get some data.
Thank you @watou for all your help with this! Much appreciated!