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

tts
requires_server
googleassistant
googlehome

(Greg) #42

That seems like you have an old build since Speaker is still there

Can you try downloading the latest build from here:

and try again?


(Steve) #43

Still getting errors with the install, this is exactly what I did:
(THANK YOU!!!)

pi@raspberrypi:~ $ wget https://github.com/greghesp/assistant-relay/archive/v2.0.tar.gz
–2018-09-18 11:17:25-- https://github.com/greghesp/assistant-relay/archive/v2.0.tar.gz
Resolving github.com (github.com)… 192.30.255.112, 192.30.255.113
Connecting to github.com (github.com)|192.30.255.112|:443… connected.
HTTP request sent, awaiting response… 302 Found
Location: https://codeload.github.com/greghesp/assistant-relay/tar.gz/v2.0 [following]
–2018-09-18 11:17:26-- https://codeload.github.com/greghesp/assistant-relay/tar.gz/v2.0
Resolving codeload.github.com (codeload.github.com)… 192.30.255.120, 192.30.255.121
Connecting to codeload.github.com (codeload.github.com)|192.30.255.120|:443… connected.
HTTP request sent, awaiting response… 200 OK
Length: unspecified [application/x-gzip]
Saving to: ‘v2.0.tar.gz’

v2.0.tar.gz [ <=> ] 282.33K 1.23MB/s in 0.2s

2018-09-18 11:17:26 (1.23 MB/s) - ‘v2.0.tar.gz’ saved [289106]

pi@raspberrypi:~ $ tar -xzf v2.0.tar.gz
pi@raspberrypi:~ $ cd assistant-relay-2.0
pi@raspberrypi:~/assistant-relay-2.0 $ npm install

speaker@0.4.1 install /home/pi/assistant-relay-2.0/node_modules/speaker
node-gyp rebuild

make: Entering directory ‘/home/pi/assistant-relay-2.0/node_modules/speaker/build’
CC(target) Release/obj.target/output/deps/mpg123/src/output/alsa.o
…/deps/mpg123/src/output/alsa.c:19:28: fatal error: alsa/asoundlib.h: No such file or directory
#include <alsa/asoundlib.h>
^
compilation terminated.
deps/mpg123/output.target.mk:108: recipe for target ‘Release/obj.target/output/deps/mpg123/src/output/alsa.o’ failed
make: *** [Release/obj.target/output/deps/mpg123/src/output/alsa.o] Error 1
make: Leaving directory ‘/home/pi/assistant-relay-2.0/node_modules/speaker/build’
gyp ERR! build error
gyp ERR! stack Error: make failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/opt/nodejs/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:285:23)
gyp ERR! stack at emitTwo (events.js:125:13)
gyp ERR! stack at ChildProcess.emit (events.js:213:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:197:12)
gyp ERR! System Linux 4.14.7-v7+
gyp ERR! command “/opt/nodejs/bin/node” “/opt/nodejs/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js” “rebuild”
gyp ERR! cwd /home/pi/assistant-relay-2.0/node_modules/speaker
gyp ERR! node -v v8.0.0
gyp ERR! node-gyp -v v3.6.1
gyp ERR! not ok

grpc@1.8.0 install /home/pi/assistant-relay-2.0/node_modules/grpc
node-pre-gyp install --fallback-to-build --library=static_library

[grpc] Success: “/home/pi/assistant-relay-2.0/node_modules/grpc/src/node/extension_binary/node-v57-linux-arm-glibc/grpc_node.node” is installed via remote
npm WARN assistant-relay@2.0.0 No repository field.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: speaker@0.4.1 (node_modules/speaker):
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: speaker@0.4.1 install: node-gyp rebuild
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Exit status 1

added 390 packages in 94.136s


#44

You’re still not getting the right package. Where is this speaker coming from. Try this:

git clone https://github.com/greghesp/assistant-relay

Then cd assistant-relay

Then npm install

That’s the steps that I use I don’t see any of these errors.


(Steve) #45

Interestingly, I did NPM run start and it spit out the browser url, I logged in, pasted the code it gave me and it says it is up and running… though I’m not yet sure it’s running without error.


(Steve) #46

Ryan that’s what I did the first time… I will try again. Thanks!


(Aesgarth) #47

I’ve just tried to install this and am getting the following:

pi@raspberrypi:~/assistant-relay $ npm install

grpc@1.8.0 install /home/pi/assistant-relay/node_modules/grpc
node-pre-gyp install --fallback-to-build --library=static_library

node-pre-gyp ERR! Tried to download(403): https://storage.googleapis.com/grpc-precompiled-binaries/node/grpc/v1.8.0/node-v64-linux-arm-glibc.tar.gz
node-pre-gyp ERR! Pre-built binaries not found for grpc@1.8.0 and node@10.10.0 (node-v64 ABI, glibc) (falling back to source compile with node-gyp)
node-pre-gyp ERR! Tried to download(undefined): https://storage.googleapis.com/grpc-precompiled-binaries/node/grpc/v1.8.0/node-v64-linux-arm-glibc.tar.gz
node-pre-gyp ERR! Pre-built binaries not found for grpc@1.8.0 and node@10.10.0 (node-v64 ABI, glibc) (falling back to source compile with node-gyp)
make: Entering directory ‘/home/pi/assistant-relay/node_modules/grpc/build’
CXX(target) Release/obj.target/grpc/deps/grpc/src/core/lib/surface/init.o
make: Entering directory ‘/home/pi/assistant-relay/node_modules/grpc/build’
CXX(target) Release/obj.target/grpc/deps/grpc/src/core/lib/surface/init.o
CXX(target) Release/obj.target/grpc/deps/grpc/src/core/lib/backoff/backoff.o
sed: can’t read ./Release/.deps/Release/obj.target/grpc/deps/grpc/src/core/lib/surface/init.o.d.raw: No such file or directory
rm: cannot remove ‘./Release/.deps/Release/obj.target/grpc/deps/grpc/src/core/lib/surface/init.o.d.raw’: No such file or directory
grpc.target.mk:390: recipe for target ‘Release/obj.target/grpc/deps/grpc/src/core/lib/surface/init.o’ failed
make: *** [Release/obj.target/grpc/deps/grpc/src/core/lib/surface/init.o] Error 1
make: Leaving directory ‘/home/pi/assistant-relay/node_modules/grpc/build’
gyp ERR! build error
gyp ERR! stack Error: make failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/usr/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:262:23)
gyp ERR! stack at ChildProcess.emit (events.js:182:13)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:240:12)
gyp ERR! System Linux 4.14.52-v7+
gyp ERR! command “/usr/bin/node” “/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js” “build” “–fallback-to-build” “–library=static_library” “–module=/home/pi/assistant-relay/node_modules/grpc/src/node/extension_binary/node-v64-linux-arm-glibc/grpc_node.node” “–module_name=grpc_node” “–module_path=/home/pi/assistant-relay/node_modules/grpc/src/node/extension_binary/node-v64-linux-arm-glibc”
gyp ERR! cwd /home/pi/assistant-relay/node_modules/grpc
gyp ERR! node -v v10.10.0
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok
node-pre-gyp ERR! build error
node-pre-gyp ERR! stack Error: Failed to execute ‘/usr/bin/node /usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --library=static_library --module=/home/pi/assistant-relay/node_modules/grpc/src/node/extension_binary/node-v64-linux-arm-glibc/grpc_node.node --module_name=grpc_node --module_path=/home/pi/assistant-relay/node_modules/grpc/src/node/extension_binary/node-v64-linux-arm-glibc’ (1)
node-pre-gyp ERR! stack at ChildProcess. (/home/pi/assistant-relay/node_modules/grpc/node_modules/node-pre-gyp/lib/util/compile.js:83:29)
node-pre-gyp ERR! stack at ChildProcess.emit (events.js:182:13)
node-pre-gyp ERR! stack at maybeClose (internal/child_process.js:962:16)
node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:251:5)
node-pre-gyp ERR! System Linux 4.14.52-v7+
node-pre-gyp ERR! command “/usr/bin/node” “/home/pi/assistant-relay/node_modules/grpc/node_modules/.bin/node-pre-gyp” “install” “–fallback-to-build” “–library=static_library”
node-pre-gyp ERR! cwd /home/pi/assistant-relay/node_modules/grpc
node-pre-gyp ERR! node -v v10.10.0
node-pre-gyp ERR! node-pre-gyp -v v0.6.39
node-pre-gyp ERR! not ok
Failed to execute ‘/usr/bin/node /usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --library=static_library --module=/home/pi/assistant-relay/node_modules/grpc/src/node/extension_binary/node-v64-linux-arm-glibc/grpc_node.node --module_name=grpc_node --module_path=/home/pi/assistant-relay/node_modules/grpc/src/node/extension_binary/node-v64-linux-arm-glibc’ (1)
CXX(target) Release/obj.target/grpc/deps/grpc/src/core/lib/channel/channel_args.o
CXX(target) Release/obj.target/grpc/deps/grpc/src/core/lib/channel/channel_stack.o
…/deps/grpc/src/core/lib/channel/channel_stack.cc:19:48: fatal error: src/core/lib/channel/channel_stack.h: No such file or directory
compilation terminated.
grpc.target.mk:390: recipe for target ‘Release/obj.target/grpc/deps/grpc/src/core/lib/channel/channel_stack.o’ failed
make: *** [Release/obj.target/grpc/deps/grpc/src/core/lib/channel/channel_stack.o] Error 1
make: Leaving directory ‘/home/pi/assistant-relay/node_modules/grpc/build’
gyp ERR! build error
gyp ERR! stack Error: make failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/usr/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:262:23)
gyp ERR! stack at ChildProcess.emit (events.js:182:13)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:240:12)
gyp ERR! System Linux 4.14.52-v7+
gyp ERR! command “/usr/bin/node” “/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js” “build” “–fallback-to-build” “–library=static_library” “–module=/home/pi/assistant-relay/node_modules/grpc/src/node/extension_binary/node-v64-linux-arm-glibc/grpc_node.node” “–module_name=grpc_node” “–module_path=/home/pi/assistant-relay/node_modules/grpc/src/node/extension_binary/node-v64-linux-arm-glibc”
gyp ERR! cwd /home/pi/assistant-relay/node_modules/grpc
gyp ERR! node -v v10.10.0
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok
npm WARN assistant-relay@2.0.0 No repository field.

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! grpc@1.8.0 install: node-pre-gyp install --fallback-to-build --library=static_library
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the grpc@1.8.0 install 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-09-18T19_08_00_643Z-debug.log

Anything obvious i’ve done wrong?


(Steve) #48

Ryan I did that as you can see, and this is the result. Thanks!!!

pi@raspberrypi:~ $ git clone https://github.com/greghesp/assistant-relay
Cloning into ‘assistant-relay’…
remote: Counting objects: 437, done.
remote: Compressing objects: 100% (100/100), done.
remote: Total 437 (delta 75), reused 99 (delta 36), pack-reused 293
Receiving objects: 100% (437/437), 2.47 MiB | 2.12 MiB/s, done.
Resolving deltas: 100% (206/206), done.
pi@raspberrypi:~ $ cd assistant-relay
pi@raspberrypi:~/assistant-relay $ npm install

speaker@0.4.1 install /home/pi/assistant-relay/node_modules/speaker
node-gyp rebuild

make: Entering directory ‘/home/pi/assistant-relay/node_modules/speaker/build’
CC(target) Release/obj.target/output/deps/mpg123/src/output/alsa.o
…/deps/mpg123/src/output/alsa.c:19:28: fatal error: alsa/asoundlib.h: No such file or directory
#include <alsa/asoundlib.h>
^
compilation terminated.
deps/mpg123/output.target.mk:108: recipe for target ‘Release/obj.target/output/deps/mpg123/src/output/alsa.o’ failed
make: *** [Release/obj.target/output/deps/mpg123/src/output/alsa.o] Error 1
make: Leaving directory ‘/home/pi/assistant-relay/node_modules/speaker/build’
gyp ERR! build error
gyp ERR! stack Error: make failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/opt/nodejs/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:285:23)
gyp ERR! stack at emitTwo (events.js:125:13)
gyp ERR! stack at ChildProcess.emit (events.js:213:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:197:12)
gyp ERR! System Linux 4.14.7-v7+
gyp ERR! command “/opt/nodejs/bin/node” “/opt/nodejs/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js” “rebuild”
gyp ERR! cwd /home/pi/assistant-relay/node_modules/speaker
gyp ERR! node -v v8.0.0
gyp ERR! node-gyp -v v3.6.1
gyp ERR! not ok

grpc@1.8.0 install /home/pi/assistant-relay/node_modules/grpc
node-pre-gyp install --fallback-to-build --library=static_library

[grpc] Success: “/home/pi/assistant-relay/node_modules/grpc/src/node/extension_binary/node-v57-linux-arm-glibc/grpc_node.node” is installed via remote
npm WARN assistant-relay@2.0.0 No repository field.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: speaker@0.4.1 (node_modules/speaker):
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: speaker@0.4.1 install: node-gyp rebuild
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Exit status 1

added 390 packages in 96.194s


#49

I would try with a clean install of Raspbian.


#50

The version of node you have won’t work I don’t think. Try v 8.8 or 8.9. 10.10 is definitely too new.


(Steve) #51

Oh god no, lol!! I hope I don’t have to go there. The only other thing I have installed is docker, running harmony-api. That was not too easy for me to set up when I did it months ago.


#52

You’re seeing the same error no matter what we do, so that’s all i got for you. Sorry.


(Aesgarth) #53

Thanks. That did it. Now to try to get it to make a noise… It says it’s running…


(Aesgarth) #54

I’m now getting the following:

Received command broadcast hello world 

User not found, using Alex 

Conversation Complete 

But no sound coming out of any speakers. I also don’t have the relay as a device in my google home app, if that makes any difference…

Edit: resolved the user not found issue…


#55

I had to install Git, then no errors. Weird as i didnt have to install that for V1. Now have everything up and running


#56

Ok relay is running, but i am stuck on having webcore announce as i did with V1. I looked at a couple of examples and thought i had it setup correctly.


(Eric) #57

It looks like you need to add a command string.(user,broadcast,command)


#58

Thats it…thank you very much! dumb mistake :frowning:


(Aesgarth) #59

I have no idea what i’m doing wrong. I have the server running, and I can get webcore to talk to it, but I can’t get a sound out of my google home(s)… This is the output from the server…

Assistant Relay is now setup and running for Alex 

You can now visit 192.168.0.26:3000 in a browser, or send POST requests to it
Conversation Complete 

Received command broadcast hello world 

User not found, using Alex 

Conversation Complete 

Received command broadcast WebCore test broadcast 

User not found, using Alex 

Conversation Complete 

Received command broadcast WebCore test broadcast 

User not found, using Alex 

Conversation Complete 

(Can’t remember how I fixed the user not found issue previously, I’m using the correct username for both the webcore and hello world tests…)

edit: the upper case A was the issue… I was using it at both ends but it’s being passed as an a… still no sound


(Aesgarth) #60

looks like I’ve dome something wrong at the google end…

|API|Requests|Errors|Error ratio|Latency, median|Latency, 98%||
| --- | --- | --- | --- | --- | --- | --- |
|[Google Assistant API](https://console.developers.google.com/apis/api/embeddedassistant.googleapis.com/overview?project=xxxxxxxxxx)|25|25|100%|1,407 ms|2,070 ms|Disable|

(Greg) #61

Can you see anything in your My Activity page?
Usually this is a case of not having the correct oauth file with the projects connected to the assistant api