[RELEASE] Google SDM API - Nest integration

Any thoughts on why I see this in the logs? I authenticate and it starts working and after a week or so, this appears in the logs.

Once I re-authenticate on the Google SDM API app everything goes back to normal.

@patrick.layton7 not sure exactly what curl command or Google logo coding you're referring to - a snippet and/or screenshots would be helpful for troubleshooting

@anjozmail the best explanation I've come up with in searching Google is that either you manually revoked access for Hubitat in your Google account security settings (I figure you would know you did this, but included for completeness), or if you change/reset your Google password, it may automatically revoke existing tokens.

If one of these cases does not match your situation, let me know and I can do some more digging. Would be good to know if this was a one-off or if it is happening on a regular cadence - not clear from your original post

I figured it out. It was my fault. Code error. Thanks for reaching out though.

I went through manual succesfully. Ive also enabled pub/sub for it. Ive added my thermostat into devices and Im able to controlit from there (including updates from device). But I dont know how to add my thermostat to dashboard. It is not visible in device list there. Any ideas?

Forget it. My mistake, device authorization on dashboard settings

None matches my situation. It is just does that by itself. But, I will watch for it to see if there is a pattern or regular cadence like you said and report back.

Did anything change with Thermostat connectivity? My Nest thermostat stopped reporting changes a few days ago. I tried re-authorizing the app, making sure all of the Google API checkboxes were on. No joy. Then I deleted the Thermostat and did Discovery again. It was not found. Then I tried deleting all Nest devices and re-discovering, and my 3 Nest cameras were found again, but not the Thermostat. The 3 Nest cams are working fine and reporting updates. But the Thermostat is MIA. I don't seem to see any debug info either. Thoughts on how to troubleshoot?

I just got this working for my thermostat and I was just wondering if anybody can help me with one thing. Is there a way to put the thermostat into Eco mode using the dashboard or RM. Thanks for any help

Quick question, yesterday I was seeing some *hit rate limit warnings.
Would that mean my own app is hitting the rate limit, or is there an overall limit for this app itself across all of us users?

See:
image

If I'm not mistaken you can do this:

  1. Go to your device and see if you have
    "Set Eco Mode". Manually switch it and see if the command works.
    image

If selecting Off and whatever option you have (e.g. MANUAL_ECO) and clicking the button "Set Eco Mode" works for you, go to step 2.

  1. Set up a rule like this:

Basically a "Custom Action", "Run Custom Action" then pick "Thermostat", then pick "setEcoMode" then pick "string", then type in the exact string you want. For me it's "OFF" or "MANUAL_ECO".

I haven't tested this rule, but it should lead you down the right path.

It's per user and they do that so a bunch of users don't saturate their network with unregulated calls. Sometimes big cloud integration platforms fork over a bunch of money to get around these types of limitations on a per company basis but it's not very common.

1 Like

Hmm, that's odd. You could turn debug logs on and re-run Discovery, the raw response from the "device list" call will be logged -- inspect to see if the thermostat is being returned but not parsed/created correctly -- but I would expect an exception logged if we had a problem. If it's not being returned in the API call, then I would start digging to confirm if it is still linked to the account. I think there is also something on the Device Access Project to allow access to certain devices?

1 Like

Thanks for the tips. I'll keep playing with it. I have logging on and even added a debug line
log.info("Device: ${device.id} ${device.type} ${device.label}")
in your handleDeviceList() function. Only the 3 Nest Cameras are being returned. So it's something with Google not reporting the Thermostat.

I did check and re-run the Auth and I do have the Thermostat set to report from the Google side, so I have some more troubleshooting to do.

I just wanted to check to see if it was something happening to others but it sounds like not so I'll keep troubleshooting. Thanks again for the pointers and for this awesome app!

Thank you for the help. I used this and was able to create a button on the dashboard that turns eco mode on and off

1 Like

So I followed the readme and did something wrong. When it asked for a Google Device Access - Project ID. I couldnt find that any where. I googled elsewhere and paid $5.00 and was able to enroll a device. and get a project ID, but when I go click on the auth link I get an error "Can't link to ProjectName" Thoughts?

Ok got it all working. Took the client iD and entered it in the project id and that worked. So next question is away mode available with the thermostat? I would like to set it so when it goes to away in he, the nest flips to away as well.

Ok got it to switch to ecomode too. So the last thing I noticed is the tile doesn't update, is there a refresh setting we can set for once an hour, or when the dashboard is brought up?

I'm having this same problem. I have three thermostats, but only two are being discovered. Using the auth token, I did a manual device list and there are only the two thermostats being returned, even though I selected all three during the initial auth setup.

Anyone have ideas?

I tried the same: did a direct curl call to the API and the return JSON had the same missing device, so it's definitely something on the Google config side that I haven't figured out yet. I also went the API support route which takes you to StackOverflow to ask a question and I created one here. No response yet.

So I just got mine to work. It wasn't ideal, but I had to remove my nest thermostat from my account via the app. Once I did that, from the thermostat itself I reset the connection (not the complete factory reset), and after it rebooted I re-added it via the nest app.

Then I had to check the permissions via the PCM (and enable access since it's a "new" thermostat), and it's now appearing in my manual API calls and the HE app discovery as well.

Hope this helps!

2 Likes