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

I believe the Google Assistant will not work with the Pi Zero as it doesn’t use ARM V7 architecture.

Damn, OK well I guess I have to get the pi 3 I guess. Thanks

Afraid not. Clearly the RPi is sending data to my Google Account, but I can’t tell if it’s just missing something in that request (to cause Goggle to fail to include my Home device in the activity) or whether there’s something wrong in my Google Home account itself.
Just wondering now, since the RPi is acting as a Google Home device then do you think we need to add it to the home as a device on the “home network” so it shows up in the Home App? Not sure how to do this though…

I think it’s something in the Google Account. I’m using a windows server OS and have the same behavior as you (@dicksmithonline) have on RPi…

Any updates on IPv6 support yet?

getting errors on npm install, any idea what would cause this?

pi@raspi:~/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-v67-linux-arm-glibc.tar.gz
node-pre-gyp ERR! Pre-built binaries not found for grpc@1.8.0 and node@11.9.0 (node-v67 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-v67-linux-arm-glibc.tar.gz
node-pre-gyp ERR! Pre-built binaries not found for grpc@1.8.0 and node@11.9.0 (node-v67 ABI, glibc) (falling back to source compile with node-gyp)
make: Entering directory ‘/home/pi/assistant-relay/node_modules/grpc/build’
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/surface/init.o
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’
CXX(target) Release/obj.target/grpc/deps/grpc/src/core/lib/backoff/backoff.o
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:197:13)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:254:12)
gyp ERR! System Linux 4.14.79-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-v67-linux-arm-glibc/grpc_node.node” “–module_name=grpc_node” “–module_path=/home/pi/assistant-relay/node_modules/grpc/src/node/extension_binary/node-v67-linux-arm-glibc”
gyp ERR! cwd /home/pi/assistant-relay/node_modules/grpc
gyp ERR! node -v v11.9.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-v67-linux-arm-glibc/grpc_node.node --module_name=grpc_node --module_path=/home/pi/assistant-relay/node_modules/grpc/src/node/extension_binary/node-v67-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:197:13)
node-pre-gyp ERR! stack at maybeClose (internal/child_process.js:978:16)
node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:265:5)
node-pre-gyp ERR! System Linux 4.14.79-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 v11.9.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-v67-linux-arm-glibc/grpc_node.node --module_name=grpc_node --module_path=/home/pi/assistant-relay/node_modules/grpc/src/node/extension_binary/node-v67-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
In file included from …/deps/grpc/src/core/lib/channel/channel_stack.cc:19:0:
…/deps/grpc/src/core/lib/channel/channel_stack.h:38:23: fatal error: grpc/grpc.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:197:13)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:254:12)
gyp ERR! System Linux 4.14.79-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-v67-linux-arm-glibc/grpc_node.node” “–module_name=grpc_node” “–module_path=/home/pi/assistant-relay/node_modules/grpc/src/node/extension_binary/node-v67-linux-arm-glibc”
gyp ERR! cwd /home/pi/assistant-relay/node_modules/grpc
gyp ERR! node -v v11.9.0
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok
npm WARN assistant-relay@2.1.1 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/2019-02-03T02_34_32_704Z-debug.log

1 Like

ty, that fixed that problem, I have now encountered a new one.

Assistant Relay is now setup and running for james

So testing it out as per the guide by ogiewon I encountered a new problem.

pi@raspi:~ curl -d '{"command":"hello world", "user":"james", "broadcast":"true"}' -H "Content-Type: application/json" -X POST http://192.168.0.163:3001/assistant curl: (7) Failed to connect to 192.168.0.163 port 3001: Connection refused pi@raspi:~

Update changed ports and got that working, but when testing using the broadcasting string for hello world, it goes through fine. but none of my google homes pick up the broadcast. I tested using google app typing hello world for broadcast and that works. No idea what is up with rasp pi

IIRC, the curl command in my guide doesn’t work. Try having ST send a speak command instead.

I just got this working… well I got it to work once with
curl -d ‘{“command”:“hello world”, "user”:”adam”, “broadcast”:“true”}’ -H “Content-Type: application/json” -X POST http://192.168.1.109:3001/assistant

I just tried it again and I am getting
curl: (7) Failed to connect to 192.168.1.109 port 3001: Connection refused

I have tried to change the port a couple off times in the config file but no joy… any ideas?

I just ran a quick test to see if the curl command from my guide works correctly or not… It works fine for me, with my config file. Remember that much of that curl command is very user specific. The IP Address of the RPi, the Port that the Assistant-Relay NodeJS server is listening on, the User, etc…

curl -d '{"command":"hello world", "user":"ogiewon", "broadcast":"true"}' -H "Content-Type: application/json" -X POST http://192.168.1.139:3001/assistant

I think I have that all correct as it worked the first time round… it just won’t work again no matter which port I set the config file to.

You should not need to change the curl command once you have it working. I can run that same command over and over again and it always works.

The port is found in the config.json file. I had to choose 3001 because I already had another app listening on 3000.

Are you sure the assistant-relay NodeJS server is still running? Did you use my guide for installing it? If you issue a “pm2 list” command, do you see it running or stopped?

well… you know… that would help. I screwed up the pm2 setup the first time round.
Now I’m not getting the curl: (7) Failed to connect to 192.168.1.109 port 3001: Connection refused but now I’m getting this instead.

ant

<!DOCTYPE html>

<html lang=“en”>

<head>

<meta charset=“utf-8”>

<title>Error</title>

</head>

<body>

<pre>SyntaxError: Unexpected token b in JSON at position 42<br> &nbsp; &nbsp;at JSON.parse (&lt;anonymous&gt;)<br> &nbsp; &nbsp;at parse (/home/pi/assistant-relay/node_modules/body-parser/lib/types/json.js:89:19)<br> &nbsp; &nbsp;at /home/pi/assistant-relay/node_modules/body-parser/lib/read.js:121:18<br> &nbsp; &nbsp;at invokeCallback (/home/pi/assistant-relay/node_modules/raw-body/index.js:224:16)<br> &nbsp; &nbsp;at done (/home/pi/assistant-relay/node_modules/raw-body/index.js:213:7)<br> &nbsp; &nbsp;at IncomingMessage.onEnd (/home/pi/assistant-relay/node_modules/raw-body/index.js:273:7)<br> &nbsp; &nbsp;at emitNone (events.js:106:13)<br> &nbsp; &nbsp;at IncomingMessage.emit (events.js:208:7)<br> &nbsp; &nbsp;at endReadableNT (_stream_readable.js:1056:12)<br> &nbsp; &nbsp;at args.(anonymous function) (/usr/local/lib/node_modules/pm2/node_modules/event-loop-inspector/index.js:138:29)</pre>

</body>

</html>

well, I can’t get this to work anymore from a terminal… but I can get it to work from my ISY994… which was my end goal… so success!

1 Like

Any possibility of getting this to work on a server hosted inside of GCP? I don’t have a local device to run this on and was hoping to put it in the cloud.

Does anyone already have a workaround to not broadcast the “Broadcast from (name)”?

1 Like

We are patiently waiting for that from google. :confused:

1 Like

I had this setup and working for several months, and it suddenly quit working a few weeks ago. The log from the assistant relay shows the broadcast command coming in and being processed without error, and in my google activity, I can see broadcast command is occuring. However, it does not announce anything over my google home speakers.

A broadcast command from my phone using google assistant works just fine.

Any idea what might be wrong?