Nest/Google SDM API break with 2020.12.1

I had all of my nest cameras working prior to the upgrade tonight. After the upgrade, all failed to connect. When I try to reinstall the Nest integration, it pulls in zero devices.

All configurations within GCP and APIs are un changed.

Thoughts?

@Liz any error messages in the logs?

None that I can see. Its like it cannot see any devices all the sudden. I added a nest camera and wanted to bring it in, so I reran integration and nothing.
Removed int. Then reinstalled and the same thing occurs.

Which log should I be looking at? I’m running I belrive a docker install via venter ova.

Here’s what interesting. My Device Access Console Project and the Pub/Sub Topic got changed for whatever reason and did not match. I had to delete the subscription completely and re-add it.

Now I have the:
Device Access Console:

  • Pub/Sub topic: projects/sdm-prod/topics/enterprise-xxxxxxxxxxxxxxxxxxx

Subscription Details:

  • Sub Name: projects/my-project-xxxxxxxxxxxxxxxxxx/subscriptions/
  • Topic Name: projects/sdm-prod/topics/enterprise-xxxxxxxxxxxxxxxxxxx

Not sure how all that got changed. This is correct though?
Config File:

nest:
client_id: xxxxxxxxx-xxxxxxxxxxxxxxxxxxxxxxxx.apps.googleusercontent.com
client_secret: xxxxxxxxxxxxxxxxxxx

“Project ID” in the Device Access Console

project_id:

Provide the full path exactly as shown under “Subscription name” in Google Cloud Console

subscriber_id: projects/my-project-xxxxxxxxxxxxxxxxxx/subscriptions/

I have the 7 cameras cameras pulled in, but they all look like:

What could I be missing on this since it was just working?

Any help would be greatly appreciated.

Regards,
Liz

Hi,
I see that on startup before the streams load but they fill in within a few seconds. Anything interesting in the error logs on startup?

I ended up just redoing the entire api structure within google which seemed to clear it up.

This same integration with sdm works with hubitat to trigger certain responses (if anyone uses this hub in parallel to ha.

Are these changes related to service accounts intended to address that?


@allenporter looks like you were working on this one?

FWIW I’m running

Home Assistant OS 5.10 and 2020.12.7

@johntdyer just to be clear, what problem are you referring to exactly? There was not a problem with the integration identified in this thread, just discussion of fixing configuration on the Google side.

For background:
2020.12.1 introduced more strict error checks for common misconfigurations seen in https://www.home-assistant.io/integrations/nest/#troubleshooting so if it worked before 2020.12 and then stopped working with 2020.12 then it is due to a misconfiguration that needs to be addressed by looking at the error log messages and comparing to the troubleshooting instructions.

Regarding service accounts: I was able to make home assistant synthesize a credential so that the pub/sub subscriber manages its own token refresh, rather than using service accounts. The problem that fixes is making logs quieter and known duplicate delivery issue. There are not any other known issues that fixes.

Sorry, I was referring to this issue

2021-01-03 15:58:31 INFO (Thread-869) [google.cloud.pubsub_v1.subscriber._protocol.streaming_pull_manager] Observed non-terminating stream error 500 Received RST_STREAM with error code 2
2021-01-03 15:58:31 INFO (Thread-869) [google.cloud.pubsub_v1.subscriber._protocol.streaming_pull_manager] Observed recoverable stream error 500 Received RST_STREAM with error code 2
2021-01-03 15:58:31 INFO (Thread-869) [google.api_core.bidi] Re-established stream
2021-01-03 15:58:31 INFO (Thread-ConsumeBidirectionalStream) [google.cloud.pubsub_v1.subscriber._protocol.streaming_pull_manager] Observed non-terminating stream error 500 Received RST_STREAM with error code 2
2021-01-03 15:58:31 INFO (Thread-ConsumeBidirectionalStream) [google.cloud.pubsub_v1.subscriber._protocol.streaming_pull_manager] Observed recoverable stream error 500 Received RST_STREAM with error code 2
2021-01-03 15:58:31 INFO (Thread-869) [google.cloud.pubsub_v1.subscriber._protocol.streaming_pull_manager] Observed non-terminating stream error 401 Request had invalid authentication credentials. Expected OAuth 2 access token, login cookie or other valid authentication credential. See https://developers.google.com/identity/sign-in/web/devconsole-project.
2021-01-03 15:58:31 INFO (Thread-869) [google.cloud.pubsub_v1.subscriber._protocol.streaming_pull_manager] Observed non-recoverable stream error 401 Request had invalid authentication credentials. Expected OAuth 2 access token, login cookie or other valid authentication credential. See https://developers.google.com/identity/sign-in/web/devconsole-project.
2021-01-03 15:58:31 INFO (Thread-869) [google.cloud.pubsub_v1.subscriber._protocol.streaming_pull_manager] RPC termination has signaled streaming pull manager shutdown.
2021-01-03 15:58:31 INFO (Thread-ConsumeBidirectionalStream) [google.cloud.pubsub_v1.subscriber._protocol.streaming_pull_manager] Observed non-terminating stream error 401 Request had invalid authentication credentials. Expected OAuth 2 access token, login cookie or other valid authentication credential. See https://developers.google.com/identity/sign-in/web/devconsole-project.
2021-01-03 15:58:31 INFO (Thread-ConsumeBidirectionalStream) [google.cloud.pubsub_v1.subscriber._protocol.streaming_pull_manager] Observed non-recoverable stream error 401 Request had invalid authentication credentials. Expected OAuth 2 access token, login cookie or other valid authentication credential. See https://developers.google.com/identity/sign-in/web/devconsole-project.
2021-01-03 15:58:31 INFO (Thread-ConsumeBidirectionalStream) [google.api_core.bidi] Thread-ConsumeBidirectionalStream exiting
2021-01-03 15:58:31 INFO (Thread-LeaseMaintainer) [google.cloud.pubsub_v1.subscriber._protocol.leaser] Thread-LeaseMaintainer exiting.
2021-01-03 15:58:31 INFO (Thread-Heartbeater) [google.cloud.pubsub_v1.subscriber._protocol.heartbeater] Thread-Heartbeater exiting.
2021-01-03 15:58:46 ERROR (MainThread) [homeassistant] Error doing job: Task exception was never retrieved

That is not a problem, just log noise I was referring to. Are you seeing symptoms of anything broken?

More detail: The service account issue you linked to ended with the suggestion to restart the subscriber every time credentials expire, so that is what it logs when it does that.

  1. 2021.01 release will quiet that noise
  2. 2021.02 release will switch to refresh the tokens using something that doesn’t involve a subscriber restart.

ok, thank you. I’ll just look for the update