UPDATE:
This thread is mainly for V1 that I am no longer supporting. Please use Version 2 and use this thread here: [Deprecated] Google Assistant Relay V2.0 - Google Home Audio Notifications!
ASSISTANT RELAY
I’ve wanted to get audio notifications on my Google Home for a long time as have a number of people. There are quite a few implementations of this, however they all use the cast feature to cast TTS audio to your speaker.
Back in Autumn/Fall last year, Google announced their broadcast feature for Google Home which lets you send audio notifications to all Google Home devices.
Until recently, there hasn’t been a way to do this, until one of the Node modules I follow was updated to use the new text input feature of the Google Assistant Service API
What is this?
- This isn’t an extension of your Google Home
- This isn’t some fancy local API that connects directly to your Google Home
- This is a Node.js server that uses the Assistant SDK
- This is basically another Google Home device, but without a microphone and speaker
What can I do with this?
Assistant Relay is a Node.js server that will accept requests, and then process them. These might be broadcast requests, predefined statuses or routines. It accepts text entry and then does something with it.
As an example, open up Google Assistant on your phone and then type broadcast hello world
. Your Google Home devices will now announce “hello world”.
By sending a request to Assistant Relay like /customBroadcast?text=hello+world
you will get the same outcome. There are lots of things you can do such as:
- Send broadcasts, useful if you want to announce that the back door has been opened
- Trigger routines through Google Home, useful if you don’t want to setup your Google Home routines again in SmartThings, WebCore, IFTTT or whatever other platform you might use
You can also hook this up to anything you want, it doesn’t have to be SmartThings:
- Send broadcasts from your phone to Google Home if your phone rings using Tasker
- Send a predefined movie announcement using WebHooks from Plex
Supported Systems
Assistant Relay relies on the Google Assistant SDK, therefore it only currently supports x64_64 or ARMv7 processors. It should work on the latest Raspberry Pi’s with an ARMv7 chip. Check the below pages for more information
Installation
What you need
- A device capable of being always on
- Node.js running on this device
- A copy of Assistant Relay (Click the green button and hit download zip)
I’m not going to run you through how to get Node.js running on your device as there are hundreds of guides out there on how to do this. Beginner's Guide to Installing Node.js on a Raspberry Pi | thisDaveJ
You then need to configure your Assistant Relay so that it works with your Google Account. I’ve put the configuration guide on my Github Repo. Follow that and run the relay. If the relay is running successfully, your Google Home should make an announcement to tell you its running
How To Use
You can now make a call from WebCore, Tasker, IFTTT or anything else. I’ll share some of my Postman examples below:
Postman
If you want to test this out in Postman, import the below collection to see and test some examples:
https://www.getpostman.com/collections/42fe420662d38f74a45e
WebCore
Simply use the DO ACTION and then “Add Task”
Upgrading
To upgrade, simply download the files from github and copy them over to your existing Assistant Relay folder, overwriting any existing files.
If you have already used the npm run build-config
command to build a config file, do not copy of the default configuration file, otherwise you will have to run the above command again.
Once the files are copied over, run npm install
and then start the relay as per above
Bugs and Requests
Could you use the Github repo to add any bugs or feature requests please. It’s too difficult to track them here:
Updates
-
3rd April
– More bug fixes
– Change so that default user is always used when no user parameter is passed -
30th March
– Lots of bug fixes
– Build Configuration tool includes
– Added converse parameter to have your Google Home speak a text response back -
19th Jan
– Nest Cam Integration