SmartThings Community

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

tts
requires_server
googleassistant
googlehome

(Pär) #327

I am amazed how complicated it is to set up the Google Assistant Relay…
I have spend a lot of hours, first to set up Assistant Relay in the Google account (it feels like the guide provided is not close how it works today with setting up the account, credentials, etc…). I managed to set up a similar solution with my previous Vera controller, but i’m not close with this…

Is there any detailed guides for really stupid useres? :slight_smile:


(Dan) #328

Did you try my guide yet? The Google Screenshots are a bit older, but everything on the Raspberry Pi is just a week old. I understand the frustration with trying to use old guides. That’s why I make notes for myself, in case I need to rebuild a system. Hope this helps.


#329

@ogiewon

I also followed your instructions and was finally able to get this working. Thanks!

I also wanted to note that you don’t actually need to log into your pi using the desktop or VNC to log into your google account as you can just copy and paste the link that is returned from npm run start command in any browser window on any computer to authenticate the assistant for your raspberry pi (which saved me a ton of work since I setup my raspberry pi headless and wasn’t sure how to actually open up a browser on my pi).

I also was hoping I could get google to use my arbitrary username that I picked to name my username.json file as the “broadcast from username” when broadcasting commands, but it looks like google uses your actual name and completely ignores the username. Oh well.


(Steven Cull) #330

at npm run start I get this
Cannot read property ‘client_id’ of undefined
at new Auth (/home/pi/assistant-relay/node_modules/google-assistant/components/auth.js:27:38)
at new GoogleAssistant (/home/pi/assistant-relay/node_modules/google-assistant/index.js:21:16)
at /home/pi/assistant-relay/server/assistant.js:35:39
at replenish (/home/pi/assistant-relay/node_modules/async/dist/async.js:1011:17)
at /home/pi/assistant-relay/node_modules/async/dist/async.js:1016:9
at Object.eachOfLimit (/home/pi/assistant-relay/node_modules/async/dist/async.js:1041:24)
at Promise (/home/pi/assistant-relay/server/assistant.js:32:13)
at new Promise ()
at setupAssistant (/home/pi/assistant-relay/server/assistant.js:30:12)
at configureUsers.then (/home/pi/assistant-relay/server/app.js:39:10)
events.js:183
throw er; // Unhandled ‘error’ event
^

Error: listen EADDRINUSE :::3000
at Server.setupListenHandle [as _listen2] (net.js:1360:14)
at listenInCluster (net.js:1401:12)
at Server.listen (net.js:1485:7)
at Function.listen (/home/pi/assistant-relay/node_modules/express/lib/application.js:618:24)
at configureUsers.then (/home/pi/assistant-relay/server/app.js:38:7)
at
at process._tickCallback (internal/process/next_tick.js:189:7)
at Function.Module.runMain (module.js:696:11)
at startup (bootstrap_node.js:204:16)
at bootstrap_node.js:625:3
npm ERR! code ELIFECYCLE
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-24T17_54_34_474Z-debug.log

Nevermind, I had the wrong .json


(Steven Cull) #331

ugh, I got everything working except that I now get a “connection refused”
How do I figure out which port to use?


(Emerson Vier) #332

Hi I have Version 1 on Windows 10, I need some direction how can I install/upgrade to Version 2.


#333

You should take a look a t this guide by @ogiewon. It is for a raspberry pi install but it might be helpful to you too


(Matt) #336

I can’t get past “npm install”. It’s becoming incredibly frustrating. Please help.

C:\Users<name>\Desktop\assistant-relay-2.1.1>npm install
npm WARN tar ENOENT: no such file or directory, open ‘C:\Users<name>\Desktop\assistant-relay-2.1.1\node_modules.staging\pseudomap-44c747d6\package.json’
npm WARN tar ENOENT: no such file or directory, open ‘C:\Users<name>\Desktop\assistant-relay-2.1.1\node_modules.staging\proxy-addr-2e051697\package.json’
npm WARN tar ENOENT: no such file or directory, open ‘C:\Users<name>\Desktop\assistant-relay-2.1.1\node_modules.staging\global-c02535f0\package.json’
npm WARN tar ENOENT: no such file or directory, open ‘C:\Users<name>\Desktop\assistant-relay-2.1.1\node_modules.staging\process-13f6ec38\package.json’
npm WARN tar ENOENT: no such file or directory, open ‘C:\Users<name>\Desktop\assistant-relay-2.1.1\node_modules.staging\pixelmatch-584dd667\package.json’
npm WARN tar ENOENT: no such file or directory, open ‘C:\Users<name>\Desktop\assistant-relay-2.1.1\node_modules.staging\pseudomap-44c747d6\README.md’
npm WARN tar ENOENT: no such file or directory, open ‘C:\Users<name>\Desktop\assistant-relay-2.1.1\node_modules.staging\proxy-addr-2e051697\HISTORY.md’
npm WARN tar ENOENT: no such file or directory, open ‘C:\Users<name>\Desktop\assistant-relay-2.1.1\node_modules.staging\global-c02535f0.npmignore’
npm WARN tar ENOENT: no such file or directory, open ‘C:\Users<name>\Desktop\assistant-relay-2.1.1\node_modules.staging\process-13f6ec38\README.md’
npm WARN tar ENOENT: no such file or directory, open ‘C:\Users<name>\Desktop\assistant-relay-2.1.1\node_modules.staging\pixelmatch-584dd667.npmignore’
npm WARN tar ENOENT: no such file or directory, open ‘C:\Users<name>\Desktop\assistant-relay-2.1.1\node_modules.staging\pseudomap-44c747d6\LICENSE’
npm WARN tar ENOENT: no such file or directory, open ‘C:\Users<name>\Desktop\assistant-relay-2.1.1\node_modules.staging\proxy-addr-2e051697\index.js’
npm WARN tar ENOENT: no such file or directory, open ‘C:\Users<name>\Desktop\assistant-relay-2.1.1\node_modules.staging\global-c02535f0\README.md’
npm WARN tar ENOENT: no such file or directory, open ‘C:\Users<name>\Desktop\assistant-relay-2.1.1\node_modules.staging\process-13f6ec38\LICENSE’
npm WARN tar ENOENT: no such file or directory, open ‘C:\Users<name>\Desktop\assistant-relay-2.1.1\node_modules.staging\pixelmatch-584dd667\README.md’
npm WARN tar ENOENT: no such file or directory, open ‘C:\Users<name>\Desktop\assistant-relay-2.1.1\node_modules.staging\iconv-lite-032eca75\encodings\dbcs-codec.js’
npm WARN tar ENOENT: no such file or directory, open ‘C:\Users<name>\Desktop\assistant-relay-2.1.1\node_modules.staging\pseudomap-44c747d6\map.js’
npm WARN tar ENOENT: no such file or directory, open ‘C:\Users<name>\Desktop\assistant-relay-2.1.1\node_modules.staging\ecdsa-sig-formatter-8202e50b\src\ecdsa-sig-formatter.js’
npm WARN tar ENOENT: no such file or directory, open ‘C:\Users<name>\Desktop\assistant-relay-2.1.1\node_modules.staging\colors-d0129f9d\screenshots\colors.png’
npm WARN tar ENOENT: no such file or directory, open ‘C:\Users<name>\Desktop\assistant-relay-2.1.1\node_modules.staging\proxy-addr-2e051697\LICENSE’
npm WARN tar ENOENT: no such file or directory, open ‘C:\Users<name>\Desktop\assistant-relay-2.1.1\node_modules.staging\global-c02535f0\LICENSE’
npm WARN tar ENOENT: no such file or directory, open ‘C:\Users<name>\Desktop\assistant-relay-2.1.1\node_modules.staging\process-13f6ec38\browser.js’
npm WARN tar ENOENT: no such file or directory, open ‘C:\Users<name>\Desktop\assistant-relay-2.1.1\node_modules.staging\pixelmatch-584dd667\LICENSE’
npm WARN tar ENOENT: no such file or directory, open ‘C:\Users<name>\Desktop\assistant-relay-2.1.1\node_modules.staging\pseudomap-44c747d6\pseudomap.js’
npm WARN tar ENOENT: no such file or directory, open ‘C:\Users<name>\Desktop\assistant-relay-2.1.1\node_modules.staging\ecdsa-sig-formatter-8202e50b\src\param-bytes-for-alg.js’
npm WARN tar ENOENT: no such file or directory, open ‘C:\Users<name>\Desktop\assistant-relay-2.1.1\node_modules.staging\readline-15d4bcc7\test\test_readline.js’
npm WARN tar ENOENT: no such file or directory, open ‘C:\Users<name>\Desktop\assistant-relay-2.1.1\node_modules.staging\read-accc62dc\lib\read.js’
npm WARN tar ENOENT: no such file or directory, open ‘C:\Users<name>\Desktop\assistant-relay-2.1.1\node_modules.staging\proxy-addr-2e051697\README.md’
npm WARN tar ENOENT: no such file or directory, open ‘C:\Users<name>\Desktop\assistant-relay-2.1.1\node_modules.staging\global-c02535f0\console.js’
npm WARN tar ENOENT: no such file or directory, open ‘C:\Users<name>\Desktop\assistant-relay-2.1.1\node_modules.staging\process-13f6ec38\index.js’
npm WARN tar ENOENT: no such file or directory, open ‘C:\Users<name>\Desktop\assistant-relay-2.1.1\node_modules.staging\pixelmatch-584dd667\index.js’
npm WARN tar ENOENT: no such file or directory, open ‘C:\Users<name>\Desktop\assistant-relay-2.1.1\node_modules.staging\iconv-lite-032eca75\encodings\dbcs-data.js’
npm WARN tar ENOENT: no such file or directory, open ‘C:\Users<name>\Desktop\assistant-relay-2.1.1\node_modules.staging\global-c02535f0\document.js’
npm WARN tar ENOENT: no such file or directory, open ‘C:\Users<name>\Desktop\assistant-relay-2.1.1\node_modules.staging\iconv-lite-032eca75\encodings\index.js’
npm WARN tar ENOENT: no such file or directory, open ‘C:\Users<name>\Desktop\assistant-relay-2.1.1\node_modules.staging\global-c02535f0\process.js’
npm WARN tar ENOENT: no such file or directory, open ‘C:\Users<name>\Desktop\assistant-relay-2.1.1\node_modules.staging\iconv-lite-032eca75\encodings\internal.js’
npm WARN tar ENOENT: no such file or directory, open ‘C:\Users<name>\Desktop\assistant-relay-2.1.1\node_modules.staging\utile-e625368a\test\helpers\macros.js’
npm WARN tar ENOENT: no such file or directory, open ‘C:\Users<name>\Desktop\assistant-relay-2.1.1\node_modules.staging\cli-color-ee347cec\test__playground\throbber.formatted.js’
npm WARN tar ENOENT: no such file or directory, open ‘C:\Users<name>\Desktop\assistant-relay-2.1.1\node_modules.staging\global-c02535f0\window.js’
npm WARN tar ENOENT: no such file or directory, open ‘C:\Users<name>\Desktop\assistant-relay-2.1.1\node_modules.staging\iconv-lite-032eca75\encodings\sbcs-codec.js’
npm WARN tar ENOENT: no such file or directory, open ‘C:\Users<name>\Desktop\assistant-relay-2.1.1\node_modules.staging\cli-color-ee347cec\test__playground\throbber.js’
npm WARN tar ENOENT: no such file or directory, open ‘C:\Users<name>\Desktop\assistant-relay-2.1.1\node_modules.staging\global-c02535f0.travis.yml’
npm WARN tar ENOENT: no such file or directory, open ‘C:\Users<name>\Desktop\assistant-relay-2.1.1\node_modules.staging\iconv-lite-032eca75\encodings\sbcs-data-generated.js’
npm WARN tar ENOENT: no such file or directory, open ‘C:\Users<name>\Desktop\assistant-relay-2.1.1\node_modules.staging\qs-e0c8e9f5\dist\qs.js’
npm WARN tar ENOENT: no such file or directory, open ‘C:\Users<name>\Desktop\assistant-relay-2.1.1\node_modules.staging\timers-ext-7bc15588\test\promise\sleep.js’
npm WARN tar ENOENT: no such file or directory, open ‘C:\Users<name>\Desktop\assistant-relay-2.1.1\node_modules.staging\grpc-c84c401e\deps\grpc\src\core\ext\filters\client_channel\lb_policy\grpclb\client_load_reporting_filter.cc’
npm WARN tar ENOENT: no such file or directory, open ‘C:\Users<name>\Desktop\assistant-relay-2.1.1\node_modules.staging\grpc-c84c401e\deps\grpc\src\core\ext\filters\client_channel\lb_policy\grpclb\client_load_reporting_filter.h’
npm WARN tar ENOENT: no such file or directory, open ‘C:\Users<name>\Desktop\assistant-relay-2.1.1\node_modules.staging\grpc-c84c401e\deps\grpc\src\core\ext\filters\client_channel\lb_policy\grpclb\grpclb_channel_secure.cc’
npm WARN tar ENOENT: no such file or directory, open ‘C:\Users<name>\Desktop\assistant-relay-2.1.1\node_modules.staging\grpc-c84c401e\deps\grpc\src\core\ext\filters\client_channel\lb_policy\grpclb\grpclb_channel.cc’
npm WARN tar ENOENT: no such file or directory, open ‘C:\Users<name>\Desktop\assistant-relay-2.1.1\node_modules.staging\grpc-c84c401e\deps\grpc\src\core\ext\filters\client_channel\lb_policy\grpclb\grpclb_channel.h’
npm WARN tar ENOENT: no such file or directory, open ‘C:\Users<name>\Desktop\assistant-relay-2.1.1\node_modules.staging\grpc-c84c401e\deps\grpc\src\core\ext\filters\client_channel\lb_policy\grpclb\grpclb_client_stats.cc’
npm WARN tar ENOENT: no such file or directory, open ‘C:\Users<name>\Desktop\assistant-relay-2.1.1\node_modules.staging\grpc-c84c401e\deps\grpc\src\core\ext\filters\client_channel\lb_policy\grpclb\grpclb_client_stats.h’
npm WARN tar ENOENT: no such file or directory, open ‘C:\Users<name>\Desktop\assistant-relay-2.1.1\node_modules.staging\grpc-c84c401e\deps\grpc\src\core\ext\filters\client_channel\lb_policy\grpclb\grpclb.cc’
npm WARN assistant-relay@2.1.1 No repository field.

npm ERR! code ENOGIT
npm ERR! Error while executing:
npm ERR! undefined ls-remote -h -t ssh://git@github.com/notmasteryet/jpgjs.git
npm ERR!
npm ERR! undefined
npm ERR! No git binary found in $PATH
npm ERR!
npm ERR! Failed using git.
npm ERR! Please check if you have git installed and in your PATH.

npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users<name>\AppData\Roaming\npm-cache_logs\2019-01-03T23_46_16_150Z-debug.log


(Matt) #338

Thanks I finally got it to work by also installing git.

Is there anyway to have google home just broadcast a message without having it say before the message: BEEP Incoming broadcast, it says -my message-

I would be great to have it: BEEP -my message-


(Matt) #339

also, is it possible to send google home commands, like to play music or a video on TV?


(Dan) #340

Nope…


(Robert Gifford) #341

ogiewon,
Really appreciate you sharing your notes. I spent way too much time trying to get this to work only to find out it was the creation of my oauth token that was the problem.

ghesp,
As many others have stated I too really appreciate the time and effort you put into coding this solution and in sharing it with the community.

Huge Thank you to both!


#342

Anyone have advice for getting this working after a router upgrade? It was working fine the other day, before I upgraded to another router. Broadcasting from phones works. I assume the router is blocking something, but not sure what to look for. It’s the same DD-WRT firmware as the old one, but different chipsets. Settings in the UI look the same as my old router. I remember enabling IPv6 would do this on my old router, but that isn’t enabled… Thanks for any suggestions!

Edit:
Got it going, sorry to waste your time. Cycled the power for everything at the breaker and a UPS. I think one of the network devices didn’t like me changing things around so much, but who knows.


(Ram) #343

Yes, I have my google home to announce the weather at 7 AM every weekday. I tried the calling feature to call my cell when there is motion during my work hours but didn’t work.


(Jd Stolz) #344

How or where do I find the Google Assistant relay port. I found the Google Assistant ip address on my google app, but don’t know where to find the google assistant relay port


(DJAC) #345

I would like to know how to edit port.
Check on your raspi. It’s normally 3000


(Jd Stolz) #346

I don’t have a raspberry pi so what hardware should I use ?


(Ram) #347

Is it possible to set the Google home volume to 60% before each announcement?


(Fullhack) #348

Would also like to know how to set the volume before a broadcast. Was playing around with a WebCoRE piston to set the volume to a specific level before an announcement but it doesn’t seem to work.

Testing with curl (in Windows) seems to send a ‘success’ back, but the volume does not change:

curl -d “{“command”:“max volume”, “user”:“myuser”}” -H “Content-Type: application/json” -X POST http://192.168.1.111:3000/assistant
{“response”:“Alright”,“volume”:“New Volume Percent is 100”,“success”:true}

Any thoughts?


(Bart Pues) #349

I have successfully installed Assistant Relay V2 on a Win server 2016.

When send a broadcast request (or any other request) it successfully response with;
{
“audio”: “http://http://your.ip.address:port/audio?v=19”,
“success”: true
}

In the nodejs console I see:
Received command broadcast are we ready to get moving
User specified was xxxx
Conversation Complete

In myactivity on google I see the broadcast activity popping up…

But my google home speaker sits quite on the counter. I have tried to change the config to muteStartup false, but the speaker remains quite even on startup of the relay…

Broadcasting from google home app on android phone works

I see in my google api manager that all request get a status error, were can I get to the actual error?

[

I Can’t find the underneath errors of the api calls (its really frustrating)?
Tried to temper with the IPv6 config of my internet provider router but it doesn’t help, so I’m wondering if the errors could point me in the good direction… I really don’t find any log about the actual api calls in my google projects (all other transactions I find in the log for example the creation of the credentials are audited…)

Sure it’s not related to the Node.js module itself because the call does happen on the api… To be honest I fear that it’s block because I’m living in Belgium (dutch speaking), if that be true they should clearly indicate this in some kind of error/warning I believe…

Somebody an idea?

Thank you very much
Bart