Google Assistant Relay and cUrl commands


I'm currently running 8.11.1. Can you try with that version?


I would love to, if I had any idea how to change it LOL


You're running on an RPi? If so, I would recommend using this script.

You can install by running:

wget -O - | sudo bash

Then run sudo node-install -v 8

You will be prompted with what version of node you want to install. Fastest way I've found to swap version of Node on an RPi.




OK got node 8.11.1 installed, and rebooted, got the same error. I tried running NPM rebuild in the /usr/local/bin directory, and it didn't help


I have been starting the web-cast-api by double clicking on web-cast-api file and running it in a terminal window. I couldn't figure out any other way to start it


No, you can't start it that way. You have to start it with npm run start or forever (to keep it running). I recommend using forever because it runs in the background to keep the script going. Run npm install forever -g then in your cast web folder (in terminal) run sudo forever start castWebApi.js

As a side note, when trying to get the cast-web server to run at boot, you can also use sudo forever start castWebApi.js The trick is, you have to first change directory to the cast-web-api folder or specify in the forever command. So, sudo forever start /home/pi/cast-web-api/castWebApi.js


I got this error when I ran npm run start in the folder with cast-web-api

pi@raspi:/usr/local/bin $ npm run start
npm ERR! path /usr/local/bin/package.json
npm ERR! code ENOENT
npm ERR! errno -2
npm ERR! syscall open
npm ERR! enoent ENOENT: no such file or directory, open '/usr/local/bin/package.json'
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent

npm ERR! A complete log of this run can be found in:
npm ERR! /home/pi/.npm/_logs/2018-11-25T19_07_10_296Z-debug.log
pi@raspi:/usr/local/bin $


Okay....try node castWebApi.js or use the other method i painstakingly detailed in the previous post.

Just confirmed that node is the correct command. If either of those don't work, then I would recommend wiping clean and starting over from the beginning making sure to follow each step. Are you on an RPi3B? 3B+? Zero or ZeroW?


its a 3B not sure about the + or not. I was just getting ready to start all over on a clean Raspian install...for the 3rd time LOL


Well, I know that node is the right command. If you use that, it will keep the script open in your terminal window so you can see what is going on. Forever runs it in the background.
And as long as it's a 3...i was working with someone on the ST forum once for 4 days before I asked that question. The Assistant SDK requires at least ARM7. The zero is ARM6. DOH!!!


I verified the ARM7 before i installed the assistant-relay package, which didn't work at all.
At least I can make my devices talk cast-web if I leave the terminal window open.
Thanks again for the help :grinning:


And you should then be able to go in and do the Google Authentication. Or you can just launch this from any browser on your network:
But that is the same link that is launched from the app in HE too. Now that it is up and running, the configuration should work.
And if you want it to run in the background, you can add the line for forever to your rc.local file in /etc on your RPi.


Fresh install of NOOBS 3.0.0
node 8.11.1
Relay assistant... got a voice confirmation after the install
got cast-web api running,
The Cast web service manager recognized all of my installed Google Home devices (yea)and I have setup speakers in the device tab under cast-web-api, and get announcements using RM. but if I click the "Setup the Google Assistant with cast-web to broadcast messages" I get an error, but I keep getting announcements.
It look like the Google assistant setup may not be required to make the cast-web work??


Are you using Speak or are you using the broadcast feature? There are two ways to get announcements from your google home speakers. You should see one device called "Cast-Web-Api". That device is capable of issuing broadcasts using the Device Notification capability. Individual speakers synced with cast-web are capable of being used with the speak capability.

The difference is how the speaker responds when you are already playing something with it. Since the speak capability using the "cast" feature of the speaker, anything you are playing will stop and you will have to restart it. If you use the cast-web device and the broadcast capability whatever is playing will keep playing after the announcement.

I don't know what you're doing wrong but setting up my google account works correctly for me. Are you trying to set up cast web on the same server as Assistant Relay? That won't work. If you are trying to set it up on a server that is running anything else, the device network ID used will be in conflict if they both use the MAC address.


I thought i needed Assistant relay installed ??? for Cast-web to work??. I do not have assistant relay running, only cast web api. If I don't need Assistant relay installed, I will skip that the next time it redo the setup.
I set up a RM rule to announce when my patio door is opened. It gave me the option to choose which speakers and what what message to send, and I chose 2 of them for test purposes, this is pretty much what I was looking for.
I did a test and it when the patio door is opened, I get the message on the selected speakers, and if music is playing it doesn't restart, which I can live with..LOL.


No, you do not need both relay and cast-web. Only one or the other. That might have broken the registration though.

If you use broadcasts you can't choose what speakers, it does it to all in your home, but it will restart the music. up to you.

#38 time I redo the server I will not put relay on it.
One other thing I noticed when I redid the RPi, the Cast web api was in a completely different folder than the first time I installed it... it took me a while to figure out where it was.
Is there an easy way to remove programs from the Raspian OS, that a "noob' would understand?
I googled it but didn't see anything that looked like what i was looking for
THANKS again for the help...


OK made some progress. I had to copy a file into a folder and I'm in the Cast web setup google assistant, got to the download credentials .json file is the client ID and client secret in the client secret xxxx. json ?


What's your question? Did you foow the instructions?