Setting up Google Actions for Assistant

no square brackets, just a long random string (not url)

Thats odd… not sure what happened there. It doesn’t matter where you run gactions from. It can be a windows desktop. What command did you use?

Does anyone have some steps for debugging the “Couldn’t update the setting. Check your connection” issue?

Following up, of course I figured it out immediately after racking my brain for 2 days and finally asking for help.

I have multiple google accounts (due to gsuite, longer story), and the account which I use for assistant / created the actions app with was different then the account which is the default for my phone. I’m assuming that even though I had the correct account selected in the Google Home app and the app appeared, when it opens a browser to authenticate, it defaulted to my other google account.

I fixed it initially by adding my other account as a Project Editor as specified in the docs. I was also able to add my original account by completely signing out of Chrome and turning off sync on my phone, so that it forced me to sign after trying to add it.

Hope this helps someone. I wish there were more specific errors.

1 Like

I ran:
./gactions update --action_package project.json --project my-created-ga-project
I will try the yaml entry without the []. I used the random long string generated as instructed in putty from
cat /dev/urandom|fold -w 120|head -n 1|base64 -w 0|tr -dc ‘0-9A-Za-z’|cut -c -80

So I removed the [] and HA starts correctly now. It should have picked up the syntax error I would have thought…

I also discovered I had entered the wrong URL in the JSON file. Corrected that. Again - is it correct to show the URL here as:

  "url": "https://my-domain.duckdns.org:8123/api/google_assistant"

specifically, are the inverted commas " " needed and is it correct to specify the port number here???

I get this error when I go to the URL it spits out and I enter the authorisation code generated:

2017/10/27 14:40:57 Unable to cache OAuth token: open creds.data: permission denied

Finnaly it work’s. The problem was in device naming. One of my lights has “unnamed_device”. I think component should expose such events in logger.

I have multiple google accounts (due to gsuite, longer story), and the account which I use for assistant / created the actions app with was different then the account which is the default for my phone. I’m assuming that even though I had the correct account selected in the Google Home app and the app appeared, when it opens a browser to authenticate, it defaulted to my other google account.

I fixed it initially by adding my other account as a Project Editor as specified in the docs. I was also able to add my original account by completely signing out of Chrome and turning off sync on my phone, so that it forced me to sign after trying to add it.

Hope this helps someone. I wish there were more specific errors.

This ended up helping me. Thanks. Even after I added my primary gmail account as a Project Editor, I continued to get the “Couldn’t update the setting. Check your connection” error.

I had to go into my Chrome Sync Settings and unsync both my Gmail accounts, and only sync the gmail account that was the owner of my Google Actions project. It successfully connected after this. It took maybe 1-3 minutes after this before the new Device showed in the home app.

I’m having the same problem. If you manage to get it working, or anyone has any insights, please let me/us know!

I think this is my final hurdle. I can’t get any actions added to my project because this fails.

Oh! I got it to work!

My Home Assistant install is from the All-In-One installer, and I had gactions and project.json in /home/hass/.homeassistant/google/ and I had tried changing ownership of those files to root and hass.

I decided to move that google folder to my home directory and changed ownership to pi, then ran the
gactions update --action_package PACKAGE_NAME --project doctest-2d0b8
command, followed the link, copied and pasted the OAuth code, and got:

Your app for the Assistant for project [my-project] was successfully updated with your actions. Visit the Actions on Google console to finish registering your app and submit it for review at [my project overview url]

and I can now see it in my Home Control list! It works! This is awesome!

Is groups exposed by default?
In config I’ve specified only lights but in GA I see group_lights.
Can it be excluded?

How does authentication work? I have a nginx reverse proxy. What would I have to setup?

edit: Created an exception for /api/google_assistant. Is this the correct way to do it? Now that endpoint isn’t secured at all (no password)

haha!. I just used sudo in front of the gactions command and it worked right away. Moving on to next steps now…

I probably should have known to do this as I needed to use sudo to chmod. It’s a bit cryptic sometimes especially when you have limited understanding and are just following instructions by rote but at least learning.

1 Like

So it’s all working. Set rooms etc for my LimitlessLED lights. Turned off IFTTT for one of the lights and Google Home still talks to it.

But if I say Hey Google make spots blue, instead of making them change colour to blue, they turn off.

Also, in the console, should I see these as new devices?? Or is this only voice control?

Mine duckdns its not working, I mean i can get a trigger from hassio to ifttt work but not the other way around, which port exactly do I need to forward? Mine is a d-link there are private and public ports

so if you add or modify an entity, how do you get GA to recognize this.

I changed name of switch from switch.southdoor to switch.entrydoor.
GA still had it as switch.southdoor and I could not get this to change
ultimately I “unlink” my account then “link” my account again. This updated name.

what is correct way to do this?

Perhaps you just need to wait. GA is seeing the exposed domain so if you add/remove an entity from a domain it should refresh in the GA app but maybe it’s not instantly.

Color is not supported yet. The default action if it doesn’t support something is to turn it off.

Both these are in the works AFAIK.

This is the only way for now. There is a PR that will implement the request_sync as a HA service - hopefully should appear in the next release.

IMHO, Google should have implemented request sync as an option in Home Control rather than expect every provider to do that from their services.

Thanks, I have the same problem and a factory reset did the trick.

Just wanted to drop in and give a big thanks to @PhilK for this.

4 Likes

I have followed every step on https://home-assistant.io/components/google_assistant/ successfully but when I want to add my device on the Google Home app I always get an error “The setting could not be updated. Check your connection.”.
What could be the problem and solution?