[RELEASE] Google SDM API - Nest integration

Google is starting to inactivate Oauth clients that have been unused for 6 months. Is there some easy way to refresh these clients so they don't get deleted and your integrations quit working?

Do you have to rotate your client secret? I assume you would have to change that in hubitat then as well?

I believe that this integration should be safe from any such deactivation, as it uses the refresh token hourly to update the access token.

I don't think so mine say they will be deleted within 30 days and haven't had activity for over 6 months.

Mine refreshes hourly:
image

And I haven't gotten any emails. Are you using the integration into Google? Or is it just linked and idle?

Just realized I am only on version 1.08 not 1.2. So maybe refreshing was added later? I will update it and see if it changes. I do have camera feeds on my dashboard which are updating so I know it's being used.

The refresh has been there from day 1 (or close to it), otherwise API requests would be rejected after an hour.

Perhaps you have created multiple oAuth clients - and one is active, but others are not?

Did you get another email today on this? I never got one previously, but then received this one today mentioning they messed up sending the first email:

image

Ok, I see what you mean now. Clicking further, I see something similar for the Google Home Community OAuth in my portal.

Interesting... I got this email yesterday that indicated I was all good?
image

But I do see in my console that the "Last used date" is May 23, 2025... I'll dig in a bit more

Ok, I think I understand the insanity here. When the integration was creating in Hubitat, an OAuth token was created and shared with the Google portal to create the link. In the Google portal, another OAuth token was created, but was never used. That's the one that Google is flagging.

I deleted the one they ear marked for my Google Home Community integration, and it still just kept chugging fine.

Long story short, it seems you can just ignore their warning. They are removing dormant OAuth tokens that aren't being used.

Where are you seeing the last used date? I log to the project console on the developer site, and mine has a green dot by active. But, I am not seeing a refresh date.

Thanks at least I know I am not crazy lol. I got that 2nd email as well but my Oauth was still listed. I will just let it die and resurrect it if needed.

1 Like

I've been trying to control fan on/auto on a cooling thermostat. While it seems I can do it from the device page, I cannot get it to work in rule maker, any ideas and why this may be happening?

This has been working for me in Rule Machine.

Is this a Nest? 4th gen? I have been trying and it just doesn't seem to work for me

3rd Generation Nest Learning Thermostat.

What do debugging logs say when that action is run vs when the command is run on the device page?

Hmmm. odd.... mine runs fine through a custom app I did up. I normally turn on the vent fans in the bathrooms once per hour to exchange some air, but switch to just using my Nest Gen3 fan to stir the air if it's smokey outside. Haven't had an issue. Maybe a Rule Machine bug?

Unlikely, but not impossible, I guess. My HVAC fan is run by a RM rule that checks if one of various reasons is on and sets the fan to ON. When all reasons are off, the fan is turned off. All that and more through rules. Regardless of generation, RM would send a command to the integration / driver and it would be the integration / driver's job to do what's needed.

Whatever the cause of @mordy111's issue - rule, driver, integration - it would be helpful to see the debug logs. Also wondering if it could be a corrupted rule.

It seems that when the thermostat is completely off, RM won't send the fan on command ( I see it on the thermostat events page but doesn't actually turn the fan on) - I changed the rule to set mode to cool and fan on and that seems to work.

1 Like

That might just be a Google thing (off means everything is off). Never tried it with the thermostat off, but great find on how to make it work!