[SOLVED] Nest Cam binding not working

Hi Guys,

Having little trouble setting up my nest binding.
The smoke detectors are working, but i am having trouble to get data from the Nest Cam.

Checked the api and i am 100% sure i got the correct name.
Here the log:

2016-01-06 22:57:56.501 [ERROR] [.o.b.nest.internal.NestBinding] - Unable to get state from data model
java.lang.NoSuchMethodException: Unknown property 'cameras'+ on bean class 'class org.openhab.binding.nest.internal.messages.DataModelResponse'
at org.apache.commons.beanutils.PropertyUtilsBean.getMappedProperty(PropertyUtilsBean.java:632) ~[commons-beanutils-1.8.3.jar:1.8.3]
at org.apache.commons.beanutils.PropertyUtilsBean.getMappedProperty(PropertyUtilsBean.java:578) ~[commons-beanutils-1.8.3.jar:1.8.3]
at org.apache.commons.beanutils.PropertyUtilsBean.getNestedProperty(PropertyUtilsBean.java:748) ~[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:302) ~[bundlefile:na]
at org.openhab.binding.nest.internal.NestBinding.getState(NestBinding.java:204) [bundlefile:na]
at org.openhab.binding.nest.internal.NestBinding.readNest(NestBinding.java:173) [bundlefile:na]
at org.openhab.binding.nest.internal.NestBinding.execute(NestBinding.java:141) [bundlefile:na]
at org.openhab.core.binding.AbstractActiveBinding$BindingActiveService.execute(AbstractActiveBinding.java:156) [org.openhab.core_1.8.0.201512130239.jar:na]
at org.openhab.core.service.AbstractActiveService$RefreshThread.run(AbstractActiveService.java:173) [org.openhab.core_1.8.0.201512130239.jar:na]
2016-01-06 22:57:56.501 [TRACE] [.o.b.nest.internal.NestBinding] - Updating itemName 'NestCamSWVersion' with newState 'Uninitialized'
2016-01-06 22:57:56.501 [TRACE] [.o.b.nest.internal.NestBinding] - Added event (item='NestCamSWVersion', newState='Uninitialized') to the ignore event list
2016-01-06 22:57:56.501 [TRACE] [.o.b.nest.internal.NestBinding] - Updating itemName 'NestHome_name' with newState 'Thuis'
2016-01-06 22:57:56.501 [TRACE] [.o.b.nest.internal.NestBinding] - Added event (item='NestHome_name', newState='Thuis') to the ignore event list

Tried setting different names…accessed the api directly in the browser (with the url from the logs) and got the cam url (that is working).

I hope somebody can help.

Bas

— EDIT —

Using the latest 1.8.0 SNAPSHOT from the Nest Binding solved the issue.

Do you have a very recent 1.8.0-SNAPSHOT version of the binding JAR in place? If not, get it from this ZIP file and remove the current Nest binding JAR from addons, and put the 1.8.0-SNAPHOT version of the JAR in the addons folder.

Thank you for the fast reply! (Love the notification in the action center on osx from this forum :grinning:)

Will try to swap them out…

As i followed the links from the api url, i noticed the video urls are redirecting to a flash player on the nest website itself. Any way to integrate this into openhab?

Will get back to you after i installed the 1.8 snapshot

A Flash player? In this day and age? Oy.

Even though I added the Nest Cam support to the binding, I don’t have the hardware or subscription to test against. Also, I don’t know of a way to feed a String item’s state into a dynamic URL that is referenced by a sitemap. This is a deficiency in the sitemap model and stock UIs, IMHO. There are creative ways to work around the issue, but if the URL only redirects you to a Flash player, that’s disappointing!

But what I do know is that all of the information and function available in the Nest API for Nest Cams is present in the binding. How it’s used is hopefully valuable. :smile:

Another possible problem accessing the Nest Cam information could be that when you created your “product” at the nest.com developer site, you didn’t enable the full set of permissions needed to read and write the camera information. So review your setup there. If you change it, you will have to generate a new PIN and update openHAB configuration with it.

Got it to work! Thank you so much…

Next step will be getting the stream within OH to work.
Just tried to run the website in fullscreen on a VM, and then capture it with ffmpeg to stream it again in a “normal” format. Maybe it works after plugging in a graphic card into the server, but now it isn’t even loading the flash stream ( Not enough resources i guess).

Any other suggestions how to get this to work?

I don’t have anything to offer on that unfortunately, but if you get something to work, please share what you had to do to get there!

Well, tried to find some alternative ways to get the stream to work within OpenHab.

I do mis one part from the api. Nest offers a subscription (100 euro p/year), users using this subscription should be able to get an GIF image from the last event.

I ended up with 2 options i still have to try:

  1. Try to get a virtual machine up and running (with decent resources) on my server, capture the desktop with the video in full screen and stream again over LAN.

  2. Use the Nest Cam deep link with return url. (only working on iOS) More info on this page Nest Api iOS 8 backlinks.

Im hoping nest will change their stream/api so we can integrate this with OH. Their forums are loaded with people complaining about the flash player (while its unsafe etc. etc.).

I’ll start a new topic on this one, maybe others have some ideas.

Yes, if you pay for the subscription, you ought to be able to bind {nest="<[cameras(Your Camera).last_event.animated_image_url]"}, but that’s not the live stream of course. Thanks for your research tracking down the best option – others will certainly benefit.

Can anyone point me in the right direction of how to display a nest cam stream? I have everything working properly in the bindings, but when it comes to display by way of the URL, there aren’t any relevant sitemap examples…