Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nest Integration Not Working / Creating subscription failing #122856

Closed
remy opened this issue Jul 30, 2024 · 4 comments
Closed

Nest Integration Not Working / Creating subscription failing #122856

remy opened this issue Jul 30, 2024 · 4 comments
Assignees

Comments

@remy
Copy link

remy commented Jul 30, 2024

The problem

I've been trying to get Google Nest working. I've got everything set up (I've been through the delete credentials many times and recycled) and I'm finally at the point where I get past link account. However, once that happens, I get this error:

SCR-20240730-nfsc-2

(not sure if my project id should be hidden or not, but it's definitely the right project id).

I've seen a similar issue mentioned in this issue - where it's the creation of the subscription that's failing.

This is the logs after a fresh reboot:

2024-07-30 14:51:13.375 INFO (MainThread) [hass_nabucasa.google_report_state] Connected
2024-07-30 14:51:43.280 DEBUG (MainThread) [homeassistant.helpers.config_entry_oauth2_flow] Resumed OAuth configuration flow
2024-07-30 14:51:43.324 DEBUG (MainThread) [homeassistant.helpers.config_entry_oauth2_flow] Creating config entry from external data
2024-07-30 14:51:43.325 DEBUG (MainThread) [homeassistant.helpers.config_entry_oauth2_flow] Sending token request to https://www.googleapis.com/oauth2/v4/token
2024-07-30 14:51:43.521 INFO (MainThread) [homeassistant.components.nest.config_flow] Successfully authenticated
2024-07-30 14:51:43.522 DEBUG (MainThread) [homeassistant.components.nest.config_flow] Finishing post-oauth configuration
2024-07-30 14:51:43.523 DEBUG (MainThread) [homeassistant.components.nest.config_flow] Creating subscriber id 'projects/${MY_PROJECT_ID}/subscriptions/home-assistant-0CZsUA4sXh'
2024-07-30 14:51:43.982 DEBUG (SyncWorker_14) [google_nest_sdm.google_nest_subscriber] Existing subscription not found; Creating
2024-07-30 14:51:43.983 DEBUG (SyncWorker_14) [google_nest_sdm.google_nest_subscriber] Creating subscription: {'name': 'projects/${MY_PROJECT_ID}/subscriptions/home-assistant-0CZsUA4sXh', 'topic': 'projects/sdm-prod/topics/enterprise-4bd8fa4a-958e-47a0-a945-42d83888f55c', 'message_retention_duration': seconds: 900
}
2024-07-30 14:51:44.314 ERROR (MainThread) [homeassistant.components.nest.config_flow] Configuration error creating subscription: Failed to create subscriber 'projects/${MY_PROJECT_ID}/subscriptions/home-assistant-0CZsUA4sXh' (cloud project id incorrect?)

I'm seeing similar errors in google's logging, where the log errors referring to the topic that's mentioned in the log earlier:

Resource not found (resource=enterprise-4bd8fa4a-958e-47a0-a945-42d83888f55c)

I don't have an adblockers on my network (which the other thread mentions), but I'm not sure about ipv6 (I'm not sure how to check, though I'm fairly technical competent).

The final result is the entity isn't created.

What version of Home Assistant Core has the issue?

core-2024.7.3

What was the last working version of Home Assistant Core?

core-2024.7.3

What type of installation are you running?

Home Assistant OS

Integration causing the issue

Nest ?/ Google Nest

Link to integration documentation on our website

https://www.home-assistant.io/integrations/nest

Diagnostics information

(the entity isn't created, so I don't have this).

Example YAML snippet

No response

Anything in the logs that might be useful for us?

No response

Additional information

No response

@home-assistant
Copy link

Hey there @allenporter, mind taking a look at this issue as it has been labeled with an integration (nest) you are listed as a code owner for? Thanks!

Code owner commands

Code owners of nest can trigger bot actions by commenting:

  • @home-assistant close Closes the issue.
  • @home-assistant rename Awesome new title Renames the issue.
  • @home-assistant reopen Reopen the issue.
  • @home-assistant unassign nest Removes the current integration label and assignees on the issue, add the integration domain after the command.
  • @home-assistant add-label needs-more-information Add a label (needs-more-information, problem in dependency, problem in custom component) to the issue.
  • @home-assistant remove-label needs-more-information Remove a label (needs-more-information, problem in dependency, problem in custom component) on the issue.

(message by CodeOwnersMention)


nest documentation
nest source
(message by IssueLinks)

@allenporter
Copy link
Contributor

Thank you for the detail and explaining what you've tried already.

Do you have multiple google cloud project ids? The main reason I can think of is if there is a mismatch between the device access console and the google cloud console (e.g. device access console points to an old oauth client id)

@allenporter
Copy link
Contributor

I'm wondering if the google cloud console doesn't have access to update the topic in the device access console "'projects/sdm-prod/topics/enterprise-4bd8fa4a-958e-47a0-a945-42d83888f55c'" because there is a link between the device access console and the cloud oauth client id

Screenshot 2024-07-30 at 8 34 45 AM

Double check the pubsub topic is enabled and matches what is in the log

@remy
Copy link
Author

remy commented Jul 30, 2024

Oh wow, it's taken me weeks to get here, and yep - that was it. The pub/sub topic in the device access console was disabled. (I'd gone back and forth so many times that I had remove the old oauth client id and it must have removed that at the same time).

FWIW, I originally couldn't get past the oauth screen - turned out that "cleanURLs" extension was rewriting the "unsafe" homeassistant link (that's what took me weeks to solve).

Thank you, that's fixed my particular issue 🙏

@remy remy closed this as completed Jul 30, 2024
@github-actions github-actions bot locked and limited conversation to collaborators Aug 29, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants