Nest integration problem with URI

Hi All,

I just found out about the new Nest intehration and have gone through all the steps, created account, migrated, created project ID, etc… etc…

I am betting error message as follows:

Error 400: invalid_request

device_id and device_name are required for private IP: http://192.168.X.XXX:XXXX/auth/external/callback

I do not see where I am to enter a local IP. Has anyone else dealt with this issue?

Pretty sure I am just not entering the correct link, I use Nabu Casa, have tried the remote link and have tried my DuckDNS domain. Must be the format of the link?

Did you find the problem yet, cause I have the same problem :roll_eyes:

Hi, see the Troubleshooting guide for the Nest Integration https://www.home-assistant.io/integrations/nest/#troubleshooting (updated in the last few weeks)

If you still have questions, feel free to reply here.

sorry for the long delay in replying and no I have not

I thank you for taking the time to reply and I apologize for not being able to reply sooner. I have tried your revised instructions, and for this user it is still out of my skill depth.

You need to be able to access your home assistant from a public domain name like duckdns.org, or use nabu casa, etc. A local IP is not allowed by Google.

(You don’t need to expose it on the internet but that does make it easier)

Like @allenporter said. That solved my problem, Tried it again from my Nabu Casa link and worked like a charm

1 Like

I did try to edit the previous install but it did not work, will delete it all and try again, thank you for your time

Hi Allen,

I went through all the steps again and still not working. I tried my Nabua Casa link, I tried my Duckdns link. Still getting that 400 error message. Little concerned over instruction that says : start the flow all over again" do I have to do another step aside from saving the new authorized rediredt uri?

If you’re getting the invalid redirect_uri from Google then it means you need to 1) add the url in the error message to the authorized uri list and 2) add the integration in home assistant again.

Yes this is the error, when I try to add the link from the error message it does not accept as it is not a top-level domain, cant save it.

Lol, its going to be something to simple…

these are my URIs now, xxx for secrecy
https://xxxxxxxxxxxx.duckdns.org
http://192.168.x.x:xxxx/auth/external/callback ( this is the one in error message not be accepted)
((and I have even tried adding nabucasa))
https://xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.ui.nabu.casa/lovelace/0/auth/external/callback

You need to access home assistant from the hostname instead of the up address. (Because Google doesn’t allow redirect back to the IP)

still no joy with…
http://homeassistant.local:8123/auth/external/callback

ok, I got further and have a new error, I accessed the interface from the Nabu Casa url and had used that same url as the redirect…new error is now 403

Request Details

Got it by adding my gmail acct as a test user, thanks for your help! Appreciate the time and effort !

Hello,

I also have a 400 error when trying to connect.
When I want to add an URI, I cannot add the complete URI because it cannot contain access path (so something after the slash).
So I tried to add the domain with and without the port but always with https with the same result.

How can I add a complete URI when the Google console displays a message specifying I cannot type a complete URI?

EEDIT: finally I was able to bypass the displayed error and to add the complete URI.
It looks like this message can simply be ignored.
And now, it works.
Sorry for the noise :confused:

1 Like

Trying to follow along but getting the same error:

Error 400: invalid_request

device_id and device_name are required for private IP: http://192.168.1.XXX:8123/auth/external/callback

I have the Nabu Casa information as the Authorized redirect URIs on the google API site for the Credentials and can access the server from outside my network via the address:

https://xxxxxxxxxxxxxxxxxxxxxxxxx.ui.nabu.casa/auth/external/callback

Make sure you are accessing home assistant from the public name. (The url you use to access home assistant is the on ether shows up in the redirect url that Google can see.)

Thank you, for some reason, I was reading this in a frustrating session last night and didn’t click until this morning. All working now … again thank you!

for the laymen reading this … after you set up all your google API rights and before you set up the Nest integration within home assistant, log into your home assist via the external address ( Nabu Casa link in my case ), and then from there run your Nest integration.

2 Likes

I had this problem today, and I realized it was because I had opened the website with local IP address rather than the external hostname. I ended up solving this using Nabu Casa, but I think it would have also worked if I had just used the external hostname itself.