SmartThings Community

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

tts
requires_server
googleassistant
googlehome

(Henrik Roksvaag) #372

nvm i figured it out, i needed to use web-cast api and specify an url to play the answer/track


(DJAC) #373

I think this broadcast message that Google is now imposing is a true deal breaker .
Why not just use a sonos?
It’s interesting that no one has a problem with this. Tried getting hold of Google but have not had luck.
Is cast- web similar to Sonos in that it stops music play back?


(dick smith) #374

Hi, I’m having exatctly the same issue as Bart, and wonder if there’s a solution?

I have tried setting up a new google account, which I have linked just fine to my Google Home, and then establishing a new project/api/oauth under that new account. I then got the new json secret for that account, and restarted Assistant-Relay v2. It started up just fine (no errors reported) but no sound from the speaker.

The terminal command I used returns “{“audio”:“http://http://10.0.0.180:3000/audio?v=48”,“success”:true}” and Assistant-Relay returns:
Received command broadcast hello world
User specified was dickus
Conversation Complete

In my Google Home / My Activity I see exactly the same as Bart. Just the record that there was “Broadcast” that used Assistant and Google Assistant SDK. There is no Google Home or Smart Display listed in the details.

This is from a completely clean install on my Raspberry Pi (including Raspian).

In case it helps, I can’t access Assistant-Relay from a browser. I get a Cannot GET / error.

Fingers crossed we can sort this out!!


(Henrik Roksvaag) #375

one more question, im trying to play the latest news when i press a virtual switch.

i make the post request with “play the latest news”, and broadcast false. Then i pickup the message and play it on my google home, but when i try to play i get “news is not supported on this device yet” its the same device i speak to, the device was added with web-cast, so maybe thats why?

Anyoen know of a fix to listen to news when u press a virtual switch


(Oscar) #376

I have been unable to install the Google Assistant Relay.

I am using Raspberry Pi 3 with Arch-Linux

I installed nodejs and npm
(pacman -Sy nodejs npm)

Then cloned the project and tried to ran npm install.

And got the following errors:

[root@ArchGate assistant-relay]# npm install

grpc@1.8.0 install /root/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-arm64-glibc.tar.gz
node-pre-gyp ERR! Pre-built binaries not found for grpc@1.8.0 and node@11.6.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-arm64-glibc.tar.gz
node-pre-gyp ERR! Pre-built binaries not found for grpc@1.8.0 and node@11.6.0 (node-v67 ABI, glibc) (falling back to source compile with node-gyp)
make: Entering directory ‘/root/assistant-relay/node_modules/grpc/build’
make: Entering directory ‘/root/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
make: *** [grpc.target.mk:388: Release/obj.target/grpc/deps/grpc/src/core/lib/surface/init.o] Error 1
make: Leaving directory ‘/root/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/node-gyp/lib/build.js:262:23)
gyp ERR! stack at ChildProcess.emit (events.js:188:13)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:254:12)
gyp ERR! System Linux 4.20.2-1-ARCH
gyp ERR! command “/usr/bin/node” “/usr/lib/node_modules/node-gyp/bin/node-gyp.js” “build” “–fallback-to-build” “–library=static_library” “–module=/root/assistant-relay/node_modules/grpc/src/node/extension_binary/node-v67-linux-arm64-glibc/grpc_node.node” “–module_name=grpc_node” “–module_path=/root/assistant-relay/node_modules/grpc/src/node/extension_binary/node-v67-linux-arm64-glibc”
gyp ERR! cwd /root/assistant-relay/node_modules/grpc
gyp ERR! node -v v11.6.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/node-gyp/bin/node-gyp.js build --fallback-to-build --library=static_library --module=/root/assistant-relay/node_modules/grpc/src/node/extension_binary/node-v67-linux-arm64-glibc/grpc_node.node --module_name=grpc_node --module_path=/root/assistant-relay/node_modules/grpc/src/node/extension_binary/node-v67-linux-arm64-glibc’ (1)
node-pre-gyp ERR! stack at ChildProcess. (/root/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:188: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.20.2-1-ARCH
node-pre-gyp ERR! command “/usr/bin/node” “/root/assistant-relay/node_modules/grpc/node_modules/.bin/node-pre-gyp” “install” “–fallback-to-build” “–library=static_library”
node-pre-gyp ERR! cwd /root/assistant-relay/node_modules/grpc
node-pre-gyp ERR! node -v v11.6.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/node-gyp/bin/node-gyp.js build --fallback-to-build --library=static_library --module=/root/assistant-relay/node_modules/grpc/src/node/extension_binary/node-v67-linux-arm64-glibc/grpc_node.node --module_name=grpc_node --module_path=/root/assistant-relay/node_modules/grpc/src/node/extension_binary/node-v67-linux-arm64-glibc’ (1)
CXX(target) Release/obj.target/grpc/deps/grpc/src/core/lib/channel/channel_args.onstall script
make: *** No rule to make target ‘…/deps/grpc/src/core/lib/channel/channel_stack.cc’, needed by ‘Release/obj.target/grpc/deps/grpc/src/core/lib/channel/channel_stack.o’. Stop.
make: Leaving directory ‘/root/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/node-gyp/lib/build.js:262:23)
gyp ERR! stack at ChildProcess.emit (events.js:188:13)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:254:12)
gyp ERR! System Linux 4.20.2-1-ARCH
gyp ERR! command “/usr/bin/node” “/usr/lib/node_modules/node-gyp/bin/node-gyp.js” “build” “–fallback-to-build” “–library=static_library” “–module=/root/assistant-relay/node_modules/grpc/src/node/extension_binary/node-v67-linux-arm64-glibc/grpc_node.node” “–module_name=grpc_node” “–module_path=/root/assistant-relay/node_modules/grpc/src/node/extension_binary/node-v67-linux-arm64-glibc”
gyp ERR! cwd /root/assistant-relay/node_modules/grpc
gyp ERR! node -v v11.6.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! /root/.npm/_logs/2019-01-16T17_54_06_116Z-debug.log


(Ram) #377

My google home notifications stopped working since last night and all other webcore pistons are working fine. I had to reboot the Pi and notifications are back in business.

Is there a way I can schedule my Raspberry Pi to restart at 4 AM daily?


(Matt) #378

How can I trigger commands like this using WebCore?


(Ram) #379

Create a piston and define with what do you want. Here is an example for one of mine.


(Matt) #380

But how can I issue commands to google assistant, like: “play music” , “tell me a joke”, or “what’s the weather like today?”


(Ram) #381

Here is my weather piston.


#382

Does anyone know if we can use any version of node.js with this package?
Or, does it have to be version 8?


#383

I tried using 10 but had to revert. That said, I’m a linux novice and was not going to go down the rabbit hole of upgrades/downgrades/installs/uninstalls.


(Matt) #384

This worked, thank you. Just curious. Is there a list of other commands that are compatible with Assistant Relay?


(Ram) #385

This is only one worked for me but many didn’t work like… calling my call if there is a motion or set few other things.


(Ram) #386

I had to ask this again since I didn’t get any reply.

Is there a way I can schedule my Raspberry Pi to restart at 4 AM daily? I have tried the Cron table but didn’t work.

crontab -e

0 4 * * * /sbin/shutdown -r now


#387

Your guide really helped with the Google Assistant API credentials steps. Thank you!


(Will) #388

Trying to install this on a Raspberry Pi Zero W and I get to the last step and it fails to start, I have this working on my windows machine running Ubuntu (whichever one is from the microsoft store) so I know i have all the steps correct.

Do you know if this can run on a RPZw or do I need to get an RP3?

Thanks!


(Bart Pues) #389

I’m still unable to find a solution? Did you solve this @dicksmithonline?


(Joel Rybacki) #390

If you are still having issues, try rolling back to version 8.x of nodejs

sudo npm cache clean -f
sudo npm install -g n
sudo n 8


(Joel Rybacki) #391

I will also note, it seems that users with a period in their usernames, such as ‘firstname.lastname’ seems to add an additional node to the config.json file that causes a run-time error when starting the process as it does not find the KeyFilePath node where it is expected. Since this portion of the file is created dynamically at run-time, there is no way that I can find to work around it.

Adding:
Sorry, I worked through my issues above but still have a hang-up. Not sure it is this or the generic media renderer. Trying to send text speech through my Hitachi speakers, if they have not had anything sent through them from WebCORE in the past, they are silent. If they have had messages sent to them previously, such as a weather announcement, it will simply replay the weather announcement. Weird…