Component to send commands to Google Assistant

I would also be interested in using this with Nabu Casa cloud. Any idea how to set it up properly?

Tried to setup it according to instructions and example, but get following error by using the test broadcast:

POST /assistant 400 18.847 ms - 44

No, but what I have used to get around this is Google Duo – you can voice call from one google mini to another, even from google duo on your android to a physical specific home or mini. It’s like a replacement for the landline when a broadcast wont do.

Cons: someone needs to pick up the phone by tapping the side physically
Pro: you dont have to keep “Ok, Google reply” to keep a convo going back and fourth.

Hope this helps a little bit.

Method two is splitting all of them out to seperate accounts which I find tedious and wont do but its possible.

–Sorry if this has already been mentioned–

how this can be done ??? I can turn on my lights etc. but if I try to play spotify on chromecast or broadcast I get just voice that says it is not possible yet…

3 Likes

@Luckster I installed this for the same reason, it doesn’t support media commands for me either. :frowning:

In this thread the developer confirms that the Assistant SDK doesn’t support all commands: https://github.com/Apipa169/Assistant-Relay-for-Hassio/issues/13

I have this setup and working. It always says "broadcast from " before every announcement/response which is a bit annoying. I believe this is just how the google home’s work and isn’t related to the Assistant Relay. (does this whether I select broadcast or not)

When testing using the sandbox I get a response popup that includes the response text and a link? to the audio response. Neither of these have the "broadcast from " at the start!

Is there any way that home assistant can access these responses so for example we can send that audio to a specific speaker or use the text for TTS in an automation?

An example use is to request a joke and play it when my kids come home (along with other greetings) and its a bit weird having the 'broadcast from " in the middle of the greetings.

1 Like

Have to admit I was feeling a bit dense trying to get this installed. On step 2 (Adding client secrets) of the hass.io plugin config where it says “Users name” and “select file” it wasn’t obvious to me what it was asking for.

Thankfully I see @LKent mentioned a secrets json file, so went digging deeper and found that after doing step 5 (and/or 6), you do have to go through with the device registration. I guess it doesn’t really matter what features and such are selected when you do the registration.

And I guess users name in the hass.io plugin really doesn’t matter?

1 Like

Sending a command to Google Assistant works a charm. Broadcasting doesn’t result in a voice message on my Google Home device though. What could be the problem for this?

—edit—
IPv6 apparently…

Hello guys,
I have been testing a lot of different ways (including Assistant Relay) to send commands to google home.
Assistant Relay works really good for sending commands like: turn on kitchen lights…
But sending commands like: "Play Family Guy on TV " does not work for me.
Today I found a way to send all commands that works on phones and Google speakers.
It is not the preferred way, but it works really good.
I took a old android phone I had laying around and installed Automate (https://llamalab.com/automate/).
Then I made a automation that keeps the phone always awake.
And then a automation that get trigger by sending a notification from home assistant to automate and then opening up google assistant and passing the given message (command ) from home assistant.

Example usage:
I made script that read all the available movies/tv shows on Netflix into a list, and than sends a command to google asking for playing one random movie/tv show from that list.
So now I have a button with the name “I’m Bored” that plays a random media from Nettflix on my tv.

hmm, trying this out also for first time
if i send command like “kitchen on/off” , that works
but i send command like “whats on the calendar” , then i just hear a broadcast, repeating my same question?

i use the assistant_converse rest command

what am i missing? i thought this addon was used for stuff like that :slight_smile:

Hey Guys, I haven’t tried it yet but it seems a workaround is that you might be able to set up different google accounts per device, and then broadcast to that group. Here’s a reference to the FAQ in Assistant Relay that made this suggestion:

It also looks like casting media is a work in progress:

This worked perfectly for me to turn on/turn off AC connected controlled by Tuya Smart Wifi Remote Control. The remote control itself can be controlled by Google Assistant, but not directly by HA (Tuya integration does not recognise the devices controlled by Smart Remote). Hence this integration solved my problem of controlling the AC from HA.

1 Like

Hello @oldeide, I am trying to get your solution working.
Right now I can send notifications from home assistant and Automate is receiving well, but could you please share the block for calling google assistant?
Thank you!!!

works very good, thanks @greghesp and @apipa169.

does anybody know anyway google can confirm something before executing?

for example,

hey google ask me if i want to turn off the lights.
GH: do you want to turn off the lights?
yes.
-> executing.

@Apipa169 any chance to get an updated build of the add-on?
3.3b seems to support casting media, which would be ace :grinning:

1 Like

It is available in the beta of the addon. But I’m not sure if I will support this functionality in a normal release as HA also has this functionality.

Why do you want to use this feature?

1 Like

Interesting thanks for the info.
Maybe I misunderstood, but it seems like the casting via assistant relay is more flexible (supports websites etc).
I’m not sure if this is possible natively with HA?

Thanks for this @Apipa169 and @greghesp!

One thing I can’t change is the name that it gives when broadcasting. I’ve tried changing the username for the account in the hass.io addon but it doesn’t make a difference. Am I right in thinking that Google is pulling the name from the linked Google account? If so, I’ll setup a new Google account, with the first name ‘Home Assistant’, just for this and that will solve the problem.

For anyone else coming to set this up, you’d be better to following the instructions here, under configuring credentials and stop when you read the heading for setting up assistant relay. As @mrand says, you have to complete the device registration once you’ve configured everything else, and on step two of the setup, when it asks for a user name and client secret, any username will do (you’ll need it to enter in your config.yaml and/or Node Red flows) and the client secret is the file you downloaded after setting up your client creds.

I’ve tried (and failed miserably) to figure out how to suggest a change (or even a PR) for the install page. :frowning:

How did your set up work out. Did you have to make a new account just so the broadcasts didn’t sound weird? Your second paragraph is a little confusing. Is there extra steps from Apipa169 's instructions https://github.com/Apipa169/Assistant-Relay-for-Hassio? I’m just sort of trying to figure out what I should go with as there seems a few options for doing these similar things. One of my current greetings plays a local mp3 so I’m not sure how that would work into the mix?

1 Like

Yeah, I setup a new account with the first name Home Assistant and used that for the Assistant Relay user and it now broadcasts with a message from Home Assistant.

I found that the instructions for setting everything up were missing a step around device registration, which without it won’t work. The original instructions I linked too just worked better for me.

Can’t help with the MP3, I’m afraid.