Nest Developer access now live

@nutcracker versioning is on my TODO list, for sure. Any preference, on whether I version the unit (app + drivers) as a whole, or each piece individually?

1 Like

Definitely individually... but hey, not a major priority... given the other stuff your looking at...! :wink:

I'm seeing the same error. pubsub is enabled, and if I run that URI from event subscription in a browser I get:
{
"error": {
"code": 403,
"message": "The request is missing a valid API key.",
"status": "PERMISSION_DENIED"
}
}

Not sure what API key it is having issues with.

Running a couple manual tests -- I can reproduce the 403/missing API key in postman if the access-token in the request header is null. I would suggest trying to re-authenticate (Google OAuth, copy the code, and click Authorize in the HE app) -- but I think @royski already tried that?

If your access-token was null, I would also expect other commands to fail, such as device refresh and commands...

I did try that. Same issue. Very strange. Google is usually referencing a missing/bad service account in the JSON file, but that is all fine.

And it does authorize find the first time, with no errors on the refresh. It's just the event handler publish.

Is anyone following this more closely seeing anything around the Nest Protect devices getting included? Really, really (really) want that.

2 Likes

Where does this get set "state.accessToken"? Mine is populated, but I don't see it set anywhere in the app.

Not sure if it was pre-set in a previous commit?

this is generated by createAccessToken() -- a built-in method that is part of the HE OAuth2. On the whole, I should probably only run this if state.accessToken is null -- that way I don't overwrite a perfectly good value that might already be in use.

I pushed an update so we should actually parse the error response... Apparently HE propagated the behavior from SmartThings that you have to use different methods to parse 2xx vs 4/5xx... :angry:

@dkilgore90, Might be time to open your own release thread to keep everything related to your new app in one place where everyone will be able to find it. I am very excited about what you are doing here and will be a user. Thanks. :smile:

Missing bracket on line 414 mate I think?
if (resp.hasError())

yep -- good catch. That's what happens when you try to make quick fixes without testing :wink:

2 Likes

Also on my list -- but given the attention this has drawn, I bumped it to the top. Let's move specific discussion of my app/drivers across.

5 Likes

Hmmm.. disregard my previous missing token comment -- I realized that when I copied it out to run through a browser, all the JSON doesn't come with it, so that makes sense.

Running with the debug nets the same error.
[error] java.lang.Exception: No response data exists for async request on line 415 (putResponse)

Glad you called this out as I would have made that same mistake but I have not bothered signing up as yet until the Protect's come online.

1 Like

Nothing as of yet in the API -- I've seen rumors that they are starting to appear in the Google Home app, so that's progress towards integration, which will hopefully lead to API support

1 Like

Even just in GH that could be really useful...if a GH routine could turn an HE virtual switch on or off when the protect sets off an alarm.

1 Like

Amazing stuff, I've got it up and running nicely.

Only thing I had to do was go into the API Credentials settings and add https://www.google.com to the Authorized redirect URIs section because it was only in Javascript Origins after setting it up through the web browser.

I then downloaded the credential files again, and pasted the new content into the credentials.json field in the App Configuration, then it all sprang into life!

I'd also second the request for Nest Protect to be added once it becomes available!

With this can I access my nest camera feeds in Hubitat?

Not yet.