[Release] Google Home Assistant Relay Driver (v1 and v2)- text to speech on Google Home devices

Perfect!

@halfrican.ak OK, I have uploaded a new version of this driver which supports custom commands. Simply add the "[CC]" prefix to any Speak or Notification command and the driver will strip off the [CC] and POST to the "/custom?command=" address instead of the "/customBroadcast?text=" address. Give it a try and let me know if it works for you.

@SmartHomePrimer - When issuing a "[CC]set volume to 50" command, the assistant-relay happily accepts the command and executes it...for itself. It does not change the volume of the other devices in your home. I am new to the Google Home world. Do you know a way to issue a command on one Google Home device to tell it to change the volume on another one? Let me know if you figure this out, please.

1 Like

Worked perfectly! Thanks!

1 Like

I’m even newer to Google Home. I’m not certain this works on anything other than devices you are casting to, but will investigate.

1 Like

@ogiewon Another Request "Feature Recommendation" would be to add one more thing to the custom command option.

Google Assistant Relay has the option of using a "converse" parameter which causes the "Homes" to speak their response to the command out loud. Could this be added as the default or perhaps as an option using [CCC] instead of [CC]?

The reason I say it would be good to offer it as an option as opposed to default would be someone may or may not want to hear the response to command out loud.

Example from ST thread describing the syntax

http://<ip_address>:<port>/custom?command=<custom command>&user=<config file user name>&converse=true

I'm not sure if the "user=" parameter is necessary, I believe the relay only supports one user so it will always default to the one setup in config file.

Thanks in advance!

Not working for me. Doesn't speak it, but doesn't change the volume. I tried [CC]set volume to 50 and [CC]set volume to 50%, but neither working. Tried in a rule and in the driver settings. I'm doing something wrong, but can't figure out what it is.

Refer to my original findings above. Is that what you mean? Or is the assistant-relay server not handling the command? I was watching the console output of the assistant-relay server on my Raspberry Pi. That is where I saw it "happily accepts the command and executes it...for itself."

Not sure I follow. Shouldn't I be able to set the volume of the Mini I have receiving relayed messages? That is what is not working for me. If I enter [cc]set volume to 50 it will speak "cc set volume to 50", but if I enter [CC]set volume to 50, it does not speak anything, but also does not change the volume level of the mini.

Isn't this what you what you meant that I should be able to do now?

This is the console output I get...

Received command set volume to 30

No user specified, using smart home primer

Google Assistant: Okay

Google Assistant: Sure

Refer to my "feature request" a couple posts up. Issuing a "custom command" to the relay will not result in a response from the google homes unless the "converse=true" parameter is set in the command. However, in your use case I believe what @ogiewon is saying is that the command may not be reaching the home itself due to an API limitation?

In my use case, I am arming my Nest Guard System with the relay which works perfectly, however, my google home's don't announce anything like they would if I issued the command verbally because the driver doesn't have this parameter set.

I took this to mean it would set the volume on at least the Google Home device that was currently receiving announcements from Assistant Relay, but would not change the volume on other Google Home devices. I misunderstood?

That part I'm absolutely clear on. I understand from Dan's explanation and looking at his driver code that it should not speak the command, but should execute it. I don't the command execution though. I unfortunately don't have the cool alarm system you have to test with. :slightly_frowning_face:

Maybe this is my issue?

Are you both getting this message as well, or is it just something I've botched in my setup?

I believe this is the normal console response if no user is specified. Which is not required as the relay doesn't support multiple users at this point.

@SmartHomePrimer. I believe what is happening is that the “assistant-relay” is acting as a google home device. Therefore, it has its own volume level. It is NOT changing the volume on any real physical google home/mini devices. It does accept commands to change its own volume, but not another physical device.

I was hoping that we could issue a command like [CC]set volume to 50 on office mini

But that has no effect on my google mini named “office mini”.

On my phone, if I use the Google Assistant App, and issue that same command via the text input interface, it works.

So, it seems to be a limitation of assistant-relay.

@halfrican.ak. I’ll add the [CCC] option shortly.

Rats! I only have one Google Mini, so I can’t play to see what's supported. I'm running the assistant app on iOS, so I didn't see an effect. Surprised I wouldn't be able to start/stop one Google Home device from another or set the volume level like Alexa Voice Services can.

To the best of my knowledge, there isn't a way to adjust the volume of multiple google home devices using a voice command (I have five of them). So since the API doesn't support specifying a target device I'm pretty sure this is why this is happening.

Sweet! Thanks

Very odd. Just tried "set kitchen speaker volume to 20%" from Google Assistant on my phone and it adjusted the volume on my mini. But console for Assistant Relay responds with
" Google Assistant: Okay
Sorry, something went wrong. When you're ready, give it another try."

This is something that maybe can be fixed I hope. Will reach out to @ghesp

I have added the "&converse=true" when using the [CCC] prefix. Give it a try and let me know if it works as you expect.

Looks like we're all learning about Google Home and the assistant-relay together. Based on the ST thread, I am just glad mine is still working at all!

1 Like

Just tried it when setting my Nest Guard alarm, didn't get a verbal response. Probably for the same reason @SmartHomePrimer isn't getting the results he's looking for. Since the command isn't being sent to a specific home or the all of my homes it's only replying in the console? Or perhaps this is one of the commands that doesn't support converse=true as mentioned by @ghsep from ST forum. I will tinker with it more and let you know if it works for other commands.

I just tried "What is the time" response announced correctly using [CCC] so it looks like I need to tinker with what commands allow it.

Also tried "what is the weather" response announced "looks nice outside" so this is one of the commands that obviously won't work.