Google-Nest Offical Device Access Console Finally Released!

Hi all – had posted as a separate topic but this probably belongs here! Can’t fix the redirect_uri_mismatch error…

I’ve followed instructions at https://www.home-assistant.io/integrations/nest/ . and https://developers.google.com/nest/device-access/get-started . Successfully registered in the DAC, enabled events, linked to GC platform, created OAuth 2.0 credentials, created a project, linked and authorised my account, configured the pub/sub pull subscription, got access/refresh tokens, listed devices thru curl, and made sure both google.com and my nabu casa URL are listed in the OAuth authorised redirects, etc etc. I can see messages (events) from my devices in the google cloud console fine and it all seems set up.

Where I’m falling down is the HA setup. I’ve added the client ID, secret, project and subscriber IDs to my config.yaml. When I try to set up the Nest integration, it asks me to choose a Google account, lists my devices with the permissions I’d previously selected, then when I click OK it dumps me to the redirect_uri_mismatch error:

Error 400: redirect_uri_mismatch

The redirect URI in the request, https:/xxxxxxxx/auth/external/callback, does not match the ones authorized for the OAuth client. To update the authorized redirect URIs, visit: https://console.developers.google.com/apis/credentials/oauthclient/${your_client_id}?project=${your_project_number}

I am using nabu casa and have tried my nabu casa address with and without port number, and with and without the /auth/external/callback. I can’t find any approach that works. I am accessing my HA instance using the external nabu casa URL to try and config.

Any hints on how I go about addressing this? Pun sorta intended

^^^^^^^^^^^
Incorrect.

Correct.
vvvvvvvv

climate:

nest:
  client_id: !secret nest_client_id
  client_secret: !secret nest_client_secret
  project_id: !secret nest_project_id
  subscriber_id: !secret nest_subscriber_id

I notice the error message has a single “/” rather than “//” in “The redirect URI in the request, https:/xxxxxxxx/auth/external/callback” – Is that just from manually editing the url for including here?

You need to make sure the exact url in the redirect_uri_mismatch error is allowed in your oauth credentials that you created in the google console.

I have corrected this now, thank you!

I tried to refresh my Nest integration and the thermostat still did not appear. I removed the Nest integration and readded it and it still did not appear. Any suggestions?

camera:

climate:

nest:
  client_id: XXX
  client_secret: XXX
  project_id: XXX
  subscriber_id:  XXX

I would suggest troubleshooting by going through the Nest API examples that show how to list devices: https://developers.google.com/nest/device-access/use-the-api#list_structures_and_devices – is the thermostat returned there?

Thanks - this was just from editing out my nabu casa address.

I redid everything from scratch again, just in case I’d slipped up elsewhere, and I have no idea what I did differently but it now works - using the nabu casa address without port number and with the /auth/external/callback path appended

I tried multiple times and countless hours before I got it right!

@bazyr have you followed my instructions from above?

1 Like

See my new topic for my Nest thermostat card config…

My Nest Thermostat card config using thermostat-dark-card

I was able to set up Google nest successfully following these instructions https://maartendamen.com/ha-nest-sdm, I can recommend it to everyone. everything worked fine. now I’ve read that some of them have also added the Google nest hub max in the HA … can someone explain to me how this is done? because mine were not recognized … only the nest doorbell was recognized.

2 Likes

My Hub’s camera was automatically detected and added, but crashes HA if I try and view a stream. I can see a still picture when the camera is active but I’m leaving it untouched until things progress further.

Can you file an issue? Happy to take a closer look with more detailed information

I was finally able to get my thermostat setup after following some of the detailed responses in here, thank you!

One question that I haven’t been able to find the answer to anywhere else: are additional temperature sensors supported? I have one additional sensor connected to my thermostat but it does not show up in HA under the Nest entities.

No succes… tried several times. I will do all the steps all over again

No, additional temperature sensors are not supported by the Nest API, which only returns a single Temperature sensor.

1 Like

Thanks for the quick response! That’s unfortunate to hear though.

Still have issues with my Thermostat Card Updating. I can change it just fine, but the temp sensor doesnt seem to be changing. It only updates when I restart HA. Thoughts?

Try to follow this. Please let us know if you need more help.

https://maartendamen.com/ha-nest-sdm

Not receiving updates is most likely a problem with the subscriber_id. The integration instructions have been updated to make that more clear that it needs to be the full subscription name including the path.

Thx. I tried this one for 3-4 times… But let me do it all over again. I 'll let you now the outcome