Jump to content

Google Nest SDM Plugin


Recommended Posts

Posted (edited)

A new plugin has been added to the Beta (Non-production) Plugin Store that supports Google Nest devices (thermostats, doorbells, and cameras).

The Beta version currently requires the user to create their own Google Cloud project and Device Access project on the Google Cloud platform (GCP). The process is quite involved, but I have endeavored to document it the best I can. The release notes (including a link to the GCP/Device Access project setup and configuration instructions) can be found here: https://goose66.github.io/nsdocs/nestsdm-pg3.html. I encourage you to read through them before endeavoring to try the plugin.

The hope is that (soon) a version can be released to the Production Plugin Store that will utilize UD's Google Cloud back-end and should be considerably easier to setup and use (as well as not require any per-user fees for Google). But I wanted to rollout a version for testers to test with IoX and PG3 and see what bugs and or enhancements we can identify as we move forward with the production version.

Edited by Goose66
  • Thanks 1
  • 2 weeks later...
Posted (edited)

Speaking to "test with IoX and PG3 and see what bugs ... we can identify" -- I am curious if there is a user error, or expectation of PG3 working but really need PG3x, somewhere in my setup process, or an actual bug.
 

Setting the stage:
I already had 3 separate projects (hitting the max limit) under "Google Device Access Console", so I reconfigured an existing one whenever steps for that were reached via your setup guide. :)
Device used: Polisy v5.7.1 with PG3 v3.1.23 (specifically not PG3x, just to see)
Plugin version first attempted:  0.1.3 [Beta]
Note that in the logs below, I tried to redact various of the parameter values to <label>.

Outcome:
First install to slot 15 seemed to fail:

[removed partial log for readability]

Installed a second time and it succeeded (did not have the 're-install to slot' wording, but rather acted like a fresh install from non-production store:

[removed partial log for readability]

After that successful install, I set up the parameters as indicated, used the Authenticate button and selected the Structure and Devices, and appeared to get a good response:

[removed partial log for readability]

However, I was not getting any Nodes showing up in the PG3 console, not even after refreshing the page. I hit the Restart button in PG3, and the plugin upon restart cannot authenticate:

[removed partial log for readability]

If I then try to use the Authenticate button again in PG3, I get directed to a website that says:
    Can’t link to Nest SDM Plugin
    Please contact Nest SDM Plugin if the issue persists

URL: https://nestservices.google.com/u/0/partnerconnections/<projectid>/auth?response_type=code&redirect_uri=https://my.isy.io/api/cloudlink/redirect&client_id=<clientid>-<oauthid>.apps.googleusercontent.com&state=662127ab639f575636ca88af&pli=1

I have since found, in GCP, under Privacy & Security, a new Cloud Data Processing Addendum which I reviewed and accepted. 
I also had a security alert on an Android device and I said "Yes this was me" on adding the SDM Plugin.
Still no change in the plugin or the authentication page from PG3.

Edited by residualimages
[removed partial logs for readability]
Posted (edited)
9 hours ago, residualimages said:

I am curious if there is a user error, or expectation of PG3 working but really need PG3x, somewhere in my setup process, or an actual bug.

On my eISY (v5.8.0) with PG3x (3.2.21), the same parameter values worked, though I didn't see any Nodes until I manually clicked 'Discover'. Perhaps I was not patient enough and needn't have done so?
I am reluctant to restart the Plugin for fear of the not-authenticated loop I got into on the Polisy (after initially seemingly getting good responses on that one).

Anyways, on PG3x / eISY, the Plugin populated 14 Nodes, though the default name/address of each Node may be either human readable (the device name as assigned in various Nest/Google apps), or it may be a hash of some sort, from what I see.

So far in testing, I see:

Nest Hello (designated as DOORBELL [Camera]s) each have a single Driver:

  • GV1 Driver (Camera Clip / URL Stream); in Admin Console they so far show as 0; in the UDMobile app, they show what presumably will be a video stream when notifications are received, but currently show "Stopped"

Nest Learning Thermostat (designated as THERMOSTAT) has each of the following Drivers:
Update: I am noticing that it does not seem to receive updates, and there is no Query button that I can see. I did try Discover again to see if the THERMOSTAT would update the Heat/Cool State, for instance, but no dice.

  • Fan Mode (CLIFS)
  • Heat/Cool State (CLIHCS)
  • Relative Humidity (CLIHUM)
  • Mode (CLIMD)
  • Cool Setpoint (CLISPC)
  • Heat Setpoint (CLISPH)
  • Online (GV0)
  • Fan Timer Timeout (GV1)
  • Eco Mode (GV2)
  • Ambient Temp (ST)

Other devices (designated / detected as CAMERAs) do not have any Drivers at present, it seems.

Edited by residualimages
Posted

The Nest SDM plugin uses the oAuth facility that was added to udi_interface 3.2.2. Not sure if that needs PG3x to run or if it's supposed to work in PG3 as well. I have sent a DM to Benoit asking about it.

Right now that sounds right on your nodes. The nodes require a Discover call to populate them. This is so you could delete or rename some and they wouldn't reappear every time you restart the plugin. The Thermostat nodes have a fully complement of drivers, but the Doorbell and Camera nodes don't really have any driver values (except the camera clip for doorbell which is being fleshed out - doesn't work in Admin Console (and probably never will) and only works sporadically in UD Mobile). The Doorbell and Camera nodes do have events:

Motion Detected (Doorbell, Camera)
Person Detected (Doorbell, Camera)
Doorbell Button (Doorbell)

But you won't get these if you're not getting events from Google Cloud (see next paragraph).

As far as the thermostats not updating, sounds like you are not getting events. I would like to get your log files (in package form please - not pasted here) to look for the event subscription calls. My bet is your getting 403 - Not Authorized errors. This is exactly what plagued us in trying to setup a Device Access Project in the UD Google Cloud account. What we did there, and it sounds like what you did, was tweak some existing things in the Cloud Project to get it working instead of following the procedure laid out in the instructions I posted verbatim. I think there is something having to do with permissions - specifically the permissions for subscribing to events - that doesn't get setup right if you don't do the steps of the project setup in the very specific order that I wrote in the Release Notes. I have setup two projects this way so far and they both work, but the third I setup (under the UD account) was setup in a convoluted fashion and we could never get it to work.

Sorry I can't be more specific with the issues in setting up the Device Access project out-of-order. If I could figure that out, I could probably get the UD account project working and things would get much easier. But the Google Device Access Support is no help and I don't have access to a Google Cloud Platform (GCP) expert. If it had been AWS, I would have been flush with external advice!

I'll update the documentation as to the events, and keep you informed on how work progresses on the UD account project.

  • Like 1
Posted (edited)

Working with @residualimages to step through some issues, and hopefully can correct some things with a new version soon, at least a new version of the Installation Instructions.

However, I will point out that because this Beta version depends on the end user's ability to setup the requisite Google Device Access and GCP projects correctly, and because the procedure is long and complicated and prone to errors, the only reliable way to install and test and make sure things are working as they should, as well as move the process forward towards a much simpler UD "hosted" backend, is to follow the instructions for setting up the projects as laid out in the Release Notes linked above. We have found that going off that path, e.g., performing the steps out of order or utilizing existing GCP projects, seems to create problems - the Google Cloud Platform is, IMHO, unnecessarily complex and seemingly very fragile.

I appreciate your patience.

Edited by Goose66
  • Thanks 1
Posted

There is a problem in the current version 0.1.3 that could affect the ability for a user to reauthenticate with the Google Nest Service (for whatever reason). It is a problem in the approach for updating OAuth configuration with Custom Configuration Parameters and a quirk of the asynchronous nature of the environment that may or may not affect a particular user. 

I am not sure if the fix will come in the form of an update to the plugin or a new version of the udi_interface module (or both), but just be aware that the problem exists if you are testing the Non-production (Beta) version of the plugin.

  • 3 months later...
Guest
This topic is now closed to further replies.

  • Recently Browsing

    • No registered users viewing this page.
  • Who's Online (See full list)

    • There are no registered users currently online
  • Forum Statistics

    • Total Topics
      37.1k
    • Total Posts
      371.5k
×
×
  • Create New...