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

Got this up and running quite easily running the "relay" on my ubuntu server. Thanks for this driver, Google Homes are now even more useful than before!

1 Like

This new way to push speech to Google home works very well with webCoRE. This way is much easier to remember HOW to do it! lol Thanks

For those interested, here are two ways to make Google home speak once the Home Assistant is installed using webCoRE.

1 Like

Almost forgot...you can have random text too! Great for keeping everyone on their toes.

After choosing 'Speak' change the 'Message' field to 'Expression' and add in the '{Random...' stuff.

Sorry, This isn't clear to me. I need a "OAuth2 JSON file from Google" and I'm getting that how?
As I start to walk through the Google Developer Project and account settings, they're asking questions that I don't see explained in Greg's repo.

I'm lost.

Try following Ryan's instructions in his WiKi. They are much more detailed.

Also, new users seem to be having issue with the latest version of 'node' and have had to revert back to 'LTS'. My Pi was already up and running and so I didn't experience any issues. Look near the bottom of the ST thread.

1 Like

Very cool!

These instructions helped immensely

Thank you!
Getting that HE issue where it announces twice, but I'm announcing the washer or dryer has finished, so I don't mind a double notification. Is there any way to disable the tone before the voice notification? Also, how do I use "Device Notification" in HE?

I have never, ever had that happen using assistant-relay. You may have something in your Hubitat hub misconfigured.

I'll take a look. Meantime, I broke Homebridge trying to get assistant relay running :slightly_frowning_face: Need to figure that one out now.

Not that I know of.

So, within Rule Machine, for example, one of your actions can be to send a Notification. You can also click on Speak as well. Only do one of these two, or else you'll get them both. Maybe that's what you did?

Found what I did. I had previously selected "On this speech device", and it should only be "Send notification to device". Is that what you were describing?

If anyone is running an older version of node.js like I was, this instruction helped me get the right version for the Google Assistant Relay node module (8.11.3)

And when I broke homebridge, this instruction helped me fix it.

$ sudo npm -g uninstall homebridge
$ sudo npm -g install homebridge@0.4.39 --unsafe-perm

NOTE: It was not necessary to reinstall any Homebridge, but the one thing I did need to due was fix a port conflict in the config.js file for Homebridge. The Google Assistant Relay node module uses port 3000 by default, and I am running the Insteonlocal plug-in which was also using the same port, Be sure to change the Google Assistant Relay port via the node configBuilder.js script (option 2 in the script).

[Edit] `Restored my Homebridge and successfully installed Google Assistant Relay. Both seem to now be running fine together with node 6.10.2
I also changed the Google Assistant Relay port to 4000 this time, instead of changing the Insteonlocal plug-in port number.

1 Like

Yes, exactly. You can use either the Notification functionality OR the Speak functionality, but not both at the same time to the same device.

With the device driver, they both do the exact same thing.

1 Like

Anyway to set the default volume? If the Google Home device is turned down, I would love a way to have notifications always be at a specific volume.

Not that I know of. The ST thread has loads of information that may be helpful.

Thanks. Could only find that it IS possible. Posted a request for more info as to how.

You would probably need to use the custom-commands capability of assistant-relay. I did not build in support for that in my driver. But it could easily be added.

1 Like

@ogiewon Would it be possible to tweak this driver to be able to use the custom commands function of the "assistant-relay". My goal would be able to send a command to arm my Nest Secure system "home and guarding" when my hubitat enters "sleep" mode and arm "away and guarding" when it enters "away" mode.

According to the documentation for assistant-relay this is possible using the following syntax:

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

I'm assuming we could use a custom command in RM to define the actiion but I'm not sure if it would require anything additional to send it as a "POST" command to the relay?

I was thinking about this yesterday. I think the simplest method would be to add a prefix to the string that is sent to the driver. If the prefix exists, it will be stripped off and the call will be made to

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

instead of the normal custom broadcast call.

So, something like "[CC]set volume to 5" would not be spoken like a broadcast, but instead would perform the same action as if you were talking to the Google Home device.

Sound good? This way, no custom commands are necessary in RM.

1 Like

That sounds like it would work. The command I'd like to send for the nest secure is:

"Set Nest Secure to Home and Guarding" or "Set Nest Secure to Away and Guarding". These work using Google Assistant directly, so according to what I'm reading the "assistant-relay" thread at ST Forum it should work.

Perfect!