SmartThings Community

[Release] Google Assistant Relay V2.0 - Google Home Audio Notifications!


(Daniele Bonato) #286

Every time that i use the notification assistant now google tell everytime “Broadast From” username.
It’s horrible, we need disable this. :frowning:


How do we add a time stamp to the npm console? I have lots of google assistant-relay event that are working fine, but I can’t tell when they ran.


(Joe Lawson) #288

Agreed this just started the other day. Must be a change google made on there end. I hope there is away to disable it.

(Dana ) #289

Same - annoying (and is happening w/V1 which I still use) so must be affecting everyone. Hopefully they will provide a way to turn it off if you don’t want it…

(Eric) #290

Broadcast from Eric - It is driving me crazy as well. :wink:

(Joseph C Thomas) #291

Worked my way to this point, but need some help!

I successfully retrieved oauth code, but I am unable to get it to pause so that I can enter it. Thanks in advance!

pi@raspi:~/assistant-relay $ npm run start
assistant-relay@2.1.1 start /home/pi/assistant-relay
node server/app.js
Attempted to automatically open the URL, but if it failed, copy/paste this in your browser:
Paste your code: (node:720) UnhandledPromiseRejectionWarning: Error: Exited with code 3
at ChildProcess.cp.once.code (/home/pi/node_modules/opn/index.js:84:13)
at Object.onceWrapper (events.js:317:30)
at emitTwo (events.js:126:13)
at ChildProcess.emit (events.js:214:7)
at maybeClose (internal/child_process.js:915:16)
at (internal/child_process.js:336:11)
at emitOne (events.js:116:13)
at Socket.emit (events.js:211:7)
at Pipe._handle.close [as _onclose] (net.js:561:12)
(node:720) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:720) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

npm ERR! errno 255
npm ERR! assistant-relay@2.1.1 start: `node server/app.js`
npm ERR! Exit status 255
npm ERR!
npm ERR! Failed at the assistant-relay@2.1.1 start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm WARN Local package.json exists, but node_modules missing, did you mean to install?

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/pi/.npm/_logs/2018-12-10T00_16_22_436Z-debug.log
pi@raspi:~/assistant-relay $ node -v
pi@raspi:~/assistant-relay $

(Joe Lawson) #292

@jcthomas Did you follow this to place the file in the proper directory?

Note: When creating an Oauth Client ID, make sure you use the “Other” application type

Once you have downloaded your client secret file, rename the file to your chosen user name. For example: greg.json . Once renamed, copy your OAuth file to the folder server\configurations\secrets

When Assistant Relay is ran, it will automatically configure itself to according to the files in the secrets folder. These are also the usernames you can now pass with your queries. For example, the username for greg.json is greg

(Joseph C Thomas) #293

@joetlawson It took me a few tries, but I did follow the prescribed procedure and downloaded the ‘Other’ type client secret file, renamed it to ‘joseph.json’ and put the file in the ‘secrets’ directory. I was able to paste the supplied URL into a browser and retrieve the code. The app doesn’t pause to allow me to paste the retrieved code.

I believe that I did, but how can I confirm that I used the correct secrets file?

I changed the config.json to specify the IP address of the device ( “baseUrl”: “”,) and the key path:

“users”: {
“joseph”: {
“keyFilePath”: “/home/pi/assistant-relay/server/configurations/secrets/joseph.json”,
“savedTokensPath”: “/home/pi/assistant-relay/server/configurations/tokens/joseph-tokens.json”
“assistants”: {}

I presume the app create the ‘joseph-tokens.json’ file as I saw no instructions on creating this file.

(Tony B.) #294


Fixed by rolling back to v8

@ghesp You might want to put something in the instructions that say that you can only use v8, not the current version of 10.

I had to go traipsing back several months in this thread to get that info.

(Tony B.) #295

It has also been giving out crap with it.

“If you want me to set an alarm, let me know”

Edit: Setting “converse” to “true” doesn’t give the extra crap at the end

(Jacob Yoo) #296

if i set up all right, am i expected to see the relay in smartthings app as device? or google home app ?
i think i set up the relay all right, but i couldn’t get the sound notification. thanks

(Josh Moyer) #297

You won’t see in in smartthings unless you set up the device handler. You also will not see it in the Google home app.
The most common fix (that I’ve seen at least) for not receiving the sound notification is to disable ipv6 on your router, if everything is indeed set up correctly. Also check the config file to see if the start up sound is muted or not.


(Jacob Yoo) #298

thank you for the response. if hit the ip address at web browser, i could get “Cannot GET /” or “Dude, chill, quiet time” while quiet time mode, so i guess the server is working all right.
only thing bothering me is “No user specified, using jacob yoo
Assistant Relay is now setup and running for jacob yoo” message.

i have credential file name as
assistant-relay-master\server\configurations\secrets\jacob yoo.json

i have config file as
in the file i have right path and right name as ‘jacob yoo.json’ and ‘jacob yoo-token.json’

is this talking about my google home device name? or my google account username ? or email?

(Ram) #299

Look at the post since i had the same downtime message always and i had to comment out the time check.

(Jacob Yoo) #300

ok. but in my case, the server is not stuck into quiet mode. it sometimes returns “Cannot GET /” which is warning for requesting GET method from web browser.
anyway, i have tried your recommendation, but no luck.
i still think the problem is user setting.

(Ram) #301

I had the same message when i try to access it from the browser. Just use command line message using curl to test the notification.


The full request would be:

curl -d '{"command":"hello world", "user":"greg", "broadcast":"true"}' -H "Content-Type: application/json" -X POST http://<ip_address>:<port>/assistant

The Google Home device will now play an audio alert, and say Hello World

(Jacob Yoo) #302

i tried that this is the output

(DJAC) #303

Guys the same thing is happening to me.
Google announces ’ broadcast by… It says ’
Is there any way to disable this… Highly annoying!

(Joseph) #304

hello and ty for this. i am trying to get it setup and when i get to the point of npm run start i get errors, not locating google assistant

pi@raspberrypi:~/assistant-relay-master $ npm run start

assistant-relay@2.1.1 start /home/pi/assistant-relay-master
node server/app.js

throw err;

Error: Cannot find module ‘google-assistant’
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:603:15)
at Function.Module._load (internal/modules/cjs/loader.js:529:25)
at Module.require (internal/modules/cjs/loader.js:659:17)
at require (internal/modules/cjs/helpers.js:22:18)
at Object. (/home/pi/assistant-relay-master/server/app.js:1:87)
at Module._compile (internal/modules/cjs/loader.js:723:30)
at Object.Module._extensions…js (internal/modules/cjs/loader.js:734:10)
at Module.load (internal/modules/cjs/loader.js:620:32)
at tryModuleLoad (internal/modules/cjs/loader.js:560:12)
at Function.Module._load (internal/modules/cjs/loader.js:552:3)
npm ERR! errno 1
npm ERR! assistant-relay@2.1.1 start: node server/app.js
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the assistant-relay@2.1.1 start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR! /home/pi/.npm/_logs/2018-12-15T19_14_32_154Z-debug.log

(Joseph C Thomas) #305

@joetlawson (or anyone else that can help me!)

I tried regenerating the json OAuth file from here:

Here are the options I selected:

Select project from drop down at top left
Select Overview on left, click Create Credentials button
Under item 1 Find out what kind of credentials you need,
for Which API are you using, select: Google Assistant API
For Where will you be calling the API from, select: Other UI
For What data will you be accessing, select: User data
Click button: What credentials do I need?

This generated the json file I downloaded, renamed (joseph.json), and placed in: server\configurations\secrets

I tried the Application data option (For What data will you be accessing) and this generated a much larger file.txt file. Since this doesn’t have the json filename extension, this doesn’t seem like the correct file.

I’m stuck. What am I missing?