Google Assistant Setup Issue - "Could not update the setting. Please check your connection"

Can you also post the main configuration for the light itself? Basically, have you assigned it a friendly_name? In my case, I found that this was the bit missing from my configuration, for google assistant to work.

here’s what it’s showing in States

max_mireds: 500
brightness: 254
friendly_name: Desk Lamp
effect_list: colorloop,random
google_assistant: true
aliases: James Robert
supported_features: 41
min_mireds: 154
google_assistant_name: Jim Bob

I got it to work!

After trying almost anything, I tried to add my test app to the other account that was configured on my phone.
When I went into the home app, the other account didn’t even have the “Home Control” option, because it is not associated with any smart devices (including Google Home), though it was at some point in the past.

But I went to the developer console and added permissions for that user anyway (as described in step 8 in https://home-assistant.io/components/google_assistant/).
After adding permissions, I went ahead and tried to link it to my main account, and it worked!

Might I add that I have a third google account on my phone, which was never associated with google assistant. I didn’t add that user to the app’s permissions, and it worked anyway.
Maybe it would be a good practice (though not as secure) to just add permissions for all of the users on your phone.

Oh, forgot to add that I also tried adding “expose_by_default: false” and exposing just one light before I tried the above, but it wasn’t enough on it’s own.

Hope this helps :slight_smile:

I think shlomki above has hit on something related to multiple Google accounts on the same device. I tried that solution and it didn’t work for me, but as others have done earlier in the thread I removed the Google accounts for all but the one associated with the Google test app on my tablet and it linked.

I wish it was working for me. I only have 1 google account on my phone and still get the connection error

Same issue

Buoyed by @shlomki’s success the other day, I wiped my entire HA config and tried all the steps again, but I was still getting the error.

I wiped my Docker image, pulled the latest, then started a new config completely from scratch with just one switch device added. I created a new Google Actions project with new IDs and tokens, and I removed my second Google (G Suite) account from my mobile. None of this helped - I was still getting the error.

As I access HA through a reverse proxy running on a Raspberry Pi, I ensured that all basic authorisation and IP filtering was turned off too.

I was going to make a huge post detailing my setup and steps I’d taken to set everything up, when I realised the only thing I’d not checked properly was the proxy configuration itself. I deleted my nginx config for my HA server, then copied the config from the nginx docs page, and this actually fixed my problem!

I’d been running a Docker image on a Linux server in case my issues were due to missing or broken packages on my Raspberry Pi. After getting Google Assistant working with my Docker image, I switched back to my original configuration on my Raspberry Pi, with all my devices and groups etc, and again it just worked perfectly.

Obviously I was kicking myself for not checking this earlier - I’ve had a Google Home Mini since release day and it’s been no more use than a voice-activated Chromecast, but now it works exactly as intended with the test app.

I am not sure exactly which part of the nginx config I’d messed up, but I think it was only a couple of lines.

For reference, I’m running Raspbian “Jessie” on a Raspberry Pi 2 with Home Assistant (0.59.1) in a Python virtual environment. I run Nginx on another Raspberry Pi which listens on port 443. A Let’s Encrypt certificate is installed on that server. I access HA from the outside world at https://home.example.com. The reverse proxy passes traffic to my HA Pi (192.168.0.13) listening on the standard port 8123.

Hope this helps someone!

Chris

After struggling with this for a few days, what worked for me was adding the following line to my Nginx reverse proxy config, inside the location block.

proxy_set_header Authorization $http_authorization;

Like below:

location / {
    proxy_pass http://localhost:8123
    # other directives, ssl, etc...
    proxy_set_header Authorization $http_authorization;
}

It took me way to long to try this, but I did a curl request (like this post) to both my duckdns reverse proxied domain name, and then did the same request via local ip address and direct HASS port. The direct port returned a 200 (with switch/light info), the reverse proxied domain name returned a 401 Not Authorized. Nginx was stripping off the Authorization header with the access_token before it reached HASS.

So I just took one more crack at this (4th or 5th time). Made sure I followed the directions to the T. And FINALLY it is working!!! (/me does the happy dance)

I was running into this issue and fixed it by removing the following invalid entry from my scripts.yaml file:

‘1513304066048’:
alias: ‘’
sequence: []

If you’re getting this error, I suggest doing the following:

  1. Save a backup of your scripts.yaml file.
  2. Remove everything inside of your scripts.yaml file.
  3. Click Configuration and then RELOAD SCRIPTS.
  4. Try linking your account again.

If this solves the problem, you can do the following to figure out what script is broken:

  1. Copy an entry from your backed up scripts.yaml file to your empty scripts.yaml file.
  2. Click Configuration and then RELOAD SCRIPTS.
  3. Run the google_assistant.request_sync script.

If your script it invalid, you’ll see something like the following in your home-assistant.log file:

2017-12-14 21:43:31 ERROR (MainThread) [homeassistant.components.google_assistant] request_sync request failed: 400 b’{\n “error”: {\n “code”: 400,\n “message”: “Request contains an invalid argument.”,\n “status”: “INVALID_ARGUMENT”\n }\n}\n

I repeated the setup multiple times with different accounts and even languages - it stops at the last step using the app and adding the new smart home device with the error : “Could not update the setting. Please check your connection”.

HA is running behind an nginx proxy behind a DDNS. HA is perfecty accessible from outside my network with SSL and valid certificates.

I’ve already tried everything mentionned in this thread :
• change nginx configuration
• delete all except the main google account
• change the expose behavior

Is there any way to debug this with command line or logs ?
Or something to verify/validate my configuration ?

I experienced this error repeatedly as well. I deleted and rebuilt it numerous times. I finally went back through it following every step exactly as posted in the instructions and it worked. I’m not sure what I did wrong the first 1000 times I did it, but making sure each and every step was followed exactly got it working.

I’ve tried most of the advice here except for starting again as I think maybe for me it’s because I’m using a UK Sky fibre router which doesn’t allow me to map 443 to 8123.

You don’t need to. I don’t use port 443 externally, and it works just fine.

Tinkerer what port do you have your HA running on? I couldn’t get Google to show the authorise web page at first, but then I added :8123 to my duckdns address in the google url box and it worked but stuck at the unable to update in the google home app now. My next step is to change my Hass.io port to 443 and see if that works.

Call it 8123 (it’s not, but it doesn’t matter).

This means that I’ve got the port specified in the URLs where required.

I got it to work by adding my Hass port to the project.json!

1 Like

I finally got this to work after fighting with this issue for too long.
For the record, in my case the issue was that Firefox (which is my default browser on android, and is used for the webview) was logged into the wrong google account.
I opened Firefox, went to google.com, signed out, and signed in with the same google account I used to set up the action on Google. After that it linked correctly.

3 Likes

I spent FOREVER working on this, and this solved it. I was logged into the wrong account in Firefox on Android, which was my default browser.

1 Like

i got also an auth error

i cant figure out where my problem is