[RELEASE] Google SDM API - Nest integration

Hi All. So close to getting this configured. Only taken me about a week..

I managed to authorize everything, and that went through without issues.
Now, however, when I click on the Discover button, nothing comes up.
All authorized and ready to go; no devices.

Help?

UPDATE: Figured it out. Forgot to add the device drivers

New feature -- use Google Drive for image archive storage and display -- released tonight! This utilizes the existing image attribute, but provides a link to Google Drive for the image display, instead of caching the data locally on the hub -- enabling the capability to view the latest image in a Cloud Dashboard.

See the Google Drive README section for more details!

**Note if you are updating an existing install and enabling this feature, click the Done button on the App page, so that the updated method is called and the retention job is scheduled.

1 Like

Installed with package manager a few days ago. Updated Hubitat and google api today and still cannot get device to show up. I have one thermostat. It was listed during authorization and the slider was turned on the devices during authorize. Not sure what to do.

nevermind. checked the logs and found the problem

1 Like

Is anyone else using Alexa with the Nest thermostat? Within Hubitat things work perfectly, and even issuing a voice command through Alexa the device is responding, but Alexa thinks it failed “its looks like I can’t reach your thermostat right now. Maybe because of a manufacturer issue. We’ve let them know there is a problem.” I have tried the extended thermostat option in the alexa skill app, etc. the thermostat responds instantly to the request in spite of the message from Alexa.

I don't use Alexa, but I wonder if the delay is because the App waits for the event from Google before sending the event to the driver to actually update the setPoint reported by Hubitat. I wouldn't expect a ton of latency there, but given we have to go through "the cloud", it could take a second or two?

I'm not sure. It is actually performing the action requested (setting temperature) almost instantly, but the report/trigger acknowledging that the action was performed doesn't seem to be getting back to Alexa.

Hubitat noob here...I'm running into this error when I try to authenticate from Hubitat

Error 403: access_denied

The developer hasn’t given you access to this app. It’s currently being tested and it hasn’t been verified by Google. If you think you should have access, contact the developer(MyEmailAddress)

I quickly searched through the thread and couldn't find any matching issues, so I must be doing something wrong

Any advice?

Thanks!

Hmm -- sounds like a couple things may be off -- (A) your GCP Project may be in "Testing" mode instead of "Production", and (B) you might have selected a different Google account during authorization than was used to create the Project?

Yeah it turns out it was the Testing vs Production mode of the GCP project. Got that sorted and it works perfectly.

Thanks for all the help and documentation!

My Nest Thermostat's operational state keeps transitioning from COOLING/FAN to IDLE while the thermostat is running. If I hit refresh, it grabs the correct state and runs with it for awhile. I deleted/added my thermostat earlier today during troubleshooting so my history isn't that long, but since reset I've seen it clear to IDLE from within seconds to as much as 30 minutes later. Every time it actually transitions from IDLE to COOLING or FAN, it shows up correctly until it clears to IDLE.

Here's all operational events from the thermostat today. I put a border around the 4 separate times my thermostat has run today. Every time you see it going back to COOLING, it's me hitting the refresh button from the device configuration page. I created a formula in Excel to show how long it took to go from some state to IDLE. What's going on here?

Edit: Now that it's midnight, here's a screenshot of my thermostat history to corroborate the excel image. I've also updated the excel shot with 2 additional events. Fan mode is not shown on the history.

Can you turn on Debug logs for the App, to capture the events being received from Google? My suspicion at this time is that it may be getting temp updates without any state, which triggers the App to think it is idle. If we confirm the event content that is triggering the incorrect change, I can then look at how to handle this condition

I turned on debug logging and I'm not sure what's going on. I just took that screenshot at 10:25. The event log is only showing events after 5 minutes, you can see last event time is all over the place, and the refresh button is no longer working.

Edit: I've rebooted the hub and collecting events again, they are responsive again. Looking at the logs, there was another app that was spamming the event queue. It's quiet again. Here's the latest switch to IDLE. It coincides with a Temperature event. Some previous ones also coincided with a Humidity update, it's not just Temperature.

Here's the excerpt from my log showing the temp update event with only temperature information. I also show the refresh event which grabs all data.

Based on your comment about temp/humidity change, looking through the App code, and looking through the debug log to see how events come in from Google, I found what was going on.

My changes are highlighted below. I tested this by going in and out of fan ON mode while the thermostat was set to cool and the operating state stays in COOL mode. I also waited for a humidity event to come in while it was running and it stays in COOL mode. If you come up with another solution for this, I'm interested to see it. My boolean statement is getting a bit long there and the rest of your code looks much better. This is my quick-and-dirty change to get it functional

1 Like

Thanks for doing the legwork and finding a solution! That looks about right, based on your description I think I broke it with recent changes trying to handle the fan state better. I'll take a closer look and see if any other conditions need to be covered...

2 Likes

Is there a Google SDM blog or changelog to follow anywhere? Google search didn't turn up much other than their current API reference material. I went looking to add Nest Thermostat remote sensors to the mix and their interface seems to just cover the basics at this point. Do they have a roadmap or anything?

1 Like

No roadmap, blog, or changelog that I'm aware of. I check periodically in the API documentation and via Google search to see if anything new was released. Definitely multiple items on the wish list for a lot of folks... We're at the mercy of Google's willingness and timeline, unfortunately.

Something seems to have happened to my pub/sub, it was working fine until sometime yesterday. When I delete and re-subscribe to events, it appears to be successful. I still don't get any events, refreshing works fine. Has anyone seen this before?

What devices do you have? (From above comments I see you have a thermostat, but any cameras?)

At one point several of us had issues with our Thermostats not sending events, solution was to reset the "Works With Nest" connections on the thermostat itself. [Beta] Google SDM API - Nest integration - #533 by dkilgore90

P.s. re-organized the logic you proposed in the release of app:0.6.1 -- consolidated to a single db call in a separate function to avoid the long if statement, but the end logic is the same

Thermostat, cameras, and a doorbell. They all stopped receiving events at the same time. I rebooted my hub and they all successfully pulled a refresh, but no events. I have my doorbell presence tied to my front porch light and I noticed it didn't turn on when I got home last night.

I recently (2 days ago) added the Google Home Community app, which requires creating an Actions on Google project. Does anyone run both projects at the same time? Not sure if creating another project somehow affected pub/sub, the other app doesn't require it.

Problem started after creation, Google Home Community added around 7-05-2021 22:20. Last event from thermostat is 7-06-2021 11:39

Edit: Starting to play around in the Cloud Platform services to try and find some errors. I've found this ack rate chart that shows the events stopping. I can't find any meaningful errors or indicators about what's going on...