[RELEASE] Google SDM API - Nest integration

This log doesn't indicate much -- the App schedules the hourly login refresh on install/update, and this is failing since you haven't yet completed the initial authorization.

I added a quick troubleshooting section for the initial auth link not displaying in the README -- check it out, and don't hesitate to post back here (or DM me) if things still aren't working out!

@ dkilgore90 does the API expose Away/Home mode? So I can set the modes on Nest based on my Hubitat presence?

I don’t see it in the device traits.

https://developers.google.com/nest/device-access/api/thermostat

I am curious though, eco mode is exposed, what is the difference between being in eco and having presence away?

2 Likes

Anyone run into hub slow down issues with this app/driver? I’ve been running it on my dev hub with no issue, I’m thinking it’s ready to move to production.

I would love to see that as well. I want to trigger the light in front of the house if it detects a person. Thanks for your good work!!!

If you have Nest cams, you can tell it to only send alerts if you are Away.

I wonder how homebridge nest does it homebridge-nest - npm

From what I've read, the api exposes "manual eco" - which disables all schedules permanently until it is turned off. This is different from the "away" behavior that switches the setpoints to your eco temps temporarily.

That is a bummer.

Thanks! I figured it out -- there was a couple of things I was missing. I'll list them below in case anyone else has a similar issue;

  • step 2 of Google's quick start guide is "Activate a supported device". There's nothing to do here but on second glance I read this note: A supported device must be activated with a Google account. Legacy Nest accounts are **not** supported for Device Access. I forgot that you have to migrate your Nest account to Google -- something I never did in the Nest App
  • in the "SDM Api App" step I totally missed the "OAUTH" step. I think I confused it with enabling Oauth on the Google Console..

I am seeing the Auth Link button but pressing it I just get referred to a google page that says something went wrong. HE shows no error in the log

If I force a token refresh or select done on the app I get the following:

app:7142020-10-11 01:36:10.009 pm errorLogin failed -- Bad Request: [error:invalid_request, error_description:Missing required parameter: refresh_token]

1 Like

Hmm - double-check the contents of credentials.json that you pasted into the App settings? The app needs to be able to parse a valid web.client_id from this JSON.

My other suggestion would be to try a different browser/device, or incognito mode/private browsing... Maybe something is cached in your browser that is causing a problem

Well I ended up deleting my Google project and opened a new one and got things working. Very strange. There was nothing done any differently with the one that I deleted except the new project worked. Go figure,

I am not seeing a way to set my Nest thermostats to away mode in the user interface. Did I miss it somewhere? I am not seeing it in rule machine either.

@Otto_Mation See about 10 replies above yours, apparently the API doesn't let you edit home or away, only Toggle manual Eco mode on the thermostat.

1 Like

First off - thank you for making such a full featured driver for this!! Setup was complicated (due to Google) but easily worth it to get HE integration.

I'm curious if you've tried to apply for commercial status so others could integrate their devices without having to do all of the Google setup work to create a project, etc.

Also, super minor request.. I noticed the logs show the expanded ('pretty') JSON format which makes them take up several lines. Is it possible to only show the compact format? I'm guessing maybe Google is sending the compact version but the driver is using 'pretty print' option when logging?

app:2052020-10-12 09:10:34.594 am debug{name=enterprises/<SNIP>/devices/<SNIP>-<SNIP>-3Cucbx8nNELWrYw, traits={sdm.devices.traits.Temperature={ambientTemperatureCelsius=24.15999}}}
app:2052020-10-12 09:10:34.593 am debugNest (1st floor)
app:2052020-10-12 09:10:34.568 am debug{
  "eventId": "9b403d16-f8d5-4154-9f68-5ad5008f6949",
  "timestamp": "2020-10-12T13:10:32.498Z",
  "resourceUpdate": {
    "name": "enterprises/<SNIP>/devices/AVPHwEsucCo2cP92v243Kdqnq4_YxP5ZEpel-<SNIP>-3Cucbx8nNELWrYw",
    "traits": {
      "sdm.devices.traits.Temperature": {
        "ambientTemperatureCelsius": 24.15999
      }
    }
  },
  "userId": "<SNIP>-<SNIP>"
}
app:2052020-10-12 09:10:34.566 am debugevent received

Most other logs use compact JSON like this one:

dev:3252020-10-12 09:27:36.068 am debugparsed: {"type":"connect.stateDigest?notify","data":{"sleepTimerId":-1,"runningZoneList":[],"contentVersion":78,"activityId":"36725446","syncStatus":0,"updates":{"97":"4.13.100"},"stateVersion":202,"tzOffset":"-14400","mode":3,"time":1597521202,"hubSwVersion":"4.15.280","deviceSetupState":[],"tzoffset":"-14400","isSetupComplete":true,"sequence":false,"discoveryServer":"https:\/\/svcs.myharmony.com\/Discovery\/Discovery.svc","discoveryServerCF":"https:\/\/cf-svcs.myharmony.com\/Discovery\/Discovery.svc","activitySetupState":false,"activityStatus":1,"wifiStatus":1,"tz":"EST5EDT,M3.2.0,M11.1.0","runningActivityList":"","IPIRConversionDate":"","hubUpdate":false,"configVersion":175,"accountId":"<SNIP>"}}

again - super minor and not a big deal.. just something as a developer I noticed

thanks
joe

This is a big ask since they charge annually for this.

ahh.. I didn't know that.. thanks!

What are the chances of having this integrated with Package manager? It sure makes it easy to keep things updated? I searched Package Manager and nothing came up in this thread.

1 Like

Would it be possible to have a logging toggle added so I can turn off the log spam?

1 Like

Available in tonight's update (app:0.2.5)

Has been requested by a few folks - will try to get it in soon.

5 Likes