[RELEASE] Google SDM API - Nest integration

No worries, I was coming to the conclusion it was time to start again...

OK, I seem to be getting events now, I'll report back on whether I see a thermostatOperatingState of fan only

OK, I did get an event when the fan switched on in the app, however thermostatOperatingState is still idle.

I can post the debug log output if it would be helpful? Do I need to hide any of the IDs in the log output?

Yes, please. IDs should be fine, I think - but you can DM me if you prefer

1 Like

OK, just sent you a DM with the log, just to be on the safe side...

Noticing an issue where image for the cameras only update when there is motion. Iā€™m not getting a continuous update anymore.

  • how Do I fix this?

Also how do I use the cameras has a motion sensor for only when it sees a person? Not with sound or other motion.

The API has never supported continuous image updates - only for motion, person, or sound events. The device preferences has toggles that allow you to select whether the image should be updated in Hubitat for each of these event types.

Each event type also triggers a different capability in Hubitat:

  • motion -> motion
  • person -> presence
  • sound -> sound

So if you want automations to trigger only on Person events, you would use the "presence sensor" of the device as the trigger.

1 Like

Looks like there was a recent update, can you comment on what was changed? Thanks!

sdm-api-app:0.5.1

  • Fix event processing logic to correctly update thermostatOperatingState for fan timer events
  • Add units to temperature and humidity attributes

For reference, notes on recent changes can always be found in the CHANGES.md file. I'll add a direct link in the top post of this thread.

1 Like

Just to report back that I've updated to 0.5.1 but am still seeing the same behavior when my thermostat is running in automatic fan-only mode, i.e. thermostatOperatingState is set to idle.

This is still expected for your use case -- using the fan "schedule" to run the fan for X minutes every hour. I haven't yet figured out the proper handling for this -- the above was a bug fix in the existing fan timer functionality -- e.g. sending a command to "run the fan for 30 minutes"

Ah I see, got it. Thank you, apologies for the confusion.

A further update here, I don't seem to be seeing themostatOperatingState change at all. Mt thermostat is cooling at present, but themostatOperatingState is idle.

The log reports: [app:700] 2021-04-23 04:34:03.678 pm [error] Login refresh failed -- Bad Request: [error:invalid_grant, error_description:Token has been expired or revoked.]

I switched publishing status to in production and reauthorized with Google. Now I'm getting the following:
app:700 2021-04-23 04:51:18.272 pm error Device-get response code: 404, body: app:700 2021-04-23 04:51:17.509 pm info Refresh device details for Living Room app:700 2021-04-23 04:51:04.076 pm error createEventSubscription returned status code 403 -- app:700 2021-04-23 04:51:03.289 pm info Creating Google pub/sub event subscription app:700 2021-04-23 04:51:02.612 pm info Getting access_token from Google app:700 2021-04-23 04:51:02.602 pm info successful redirect from google

EDIT - and now its working having changed nothing, guess it took a few minutes to propagate the changes...

Could you elaborate more on how to use the presence mode?

Like I want to use the camera for when it detects a person at night the lights will turn on. But I only see motion and sound within the simple automations app.

For this, it looks like you have to use Rule Machine - the trigger would be Presence, and select the device(s) you want to use.

When a person event is received, the sensor "arrives"/is present. After a period of inactivity (default 15 seconds), the sensor "departs"/is not present.

Hope this helps!

1 Like

It does! Thank you!

How often does the nest thermostat device in hubitat update to reflect the nest temp and thermostat status? Seems I have to manually refresh. I did make sure PUB/SUB is authorized in the GCP.

All device updates should be event-driven -- sounds like that isn't the case for you. Try using the Subscribe to Events debug button, then check your logs for errors.

Subscribe to Events worked. Thanks!!!

Thanks - this is awesome... pain to setup, but that's Google for you.

Hey there. Looking to get the Nest integration up and running. Following all the steps and all seems well, even getting the message:

Congratulations! Google SDM API has authenticated successfully Click here to return to the App main page.

However, I just can't get the device discovery button to show. I still am seeing only the Auth link.

Thoughts?