[Release] [Closed] Google Assistant Relay V1 - Google Home Audio Notifications!

I created a pull request to correct the config.json file back to the blank one. The one with your info in it was confusing people who ran the confbuilder.json script.

1 Like

Thanks Ryan for the help. Got everything set up. downloaded Postman and ran the POST request and it works great. But when I put it into webcore, nothing happens. all I did was:

Make a POST request to http://192.168.2.115:3000/customBroadcast?text=“Front Door is open” with type JSON

but when I activate the trigger (opened the door) nothing happens. I put a push notification in just to make sure the piston is working, I get the push notification, but no announcement.

Thanks.

I’m not sure how that file got back in there as it’s already been removed once.

Okay, I’m at my wits end. So I did some more playing around. sending the post request using postman, I get the response I am expecting and I see on the assistant relay a “receiving command broadcast hello world” message

I then tried curl -X POST http://192.168.2.115:8801/customBroadcast?text=hello, I get the response I, expecting and I see the assistant relay a “receiving command broadcast hello world” message

Now when I put the exact same post into Webcore, the logs says it was sent, but I don’t hear any sound. and when I look at relay assistant, I don’t see it "receiving commands.

What am I doing wrong.

I’m in the same boat. I got everything setup and running but when i send broadcast URL from webcore I get received command broadcast in terminal window on pi but do not hear anything on Google Home.

Hi,

I think I may be having a similar problem. I’m using a rPi 3 B+ running Raspbian. I followed the great instructions here and when I start the server I get the following:

2018-05-10-100501_655x390_scrot

Then, I have tried sending a POST request both from POSTMAN and from the command line using ‘curl -X http://192.168.86.237:3000/customBroadcast?text=hello&user=luis’ and I see the following on terminal:

’Received command broadcast hello
No user specified, using luis’

So it looks like I’m getting the request, but the GH doesn’t wake up or say anything. Any ideas? Thanks!

Hi all, I’m trying to get this up and running on a VirtualBox Ubuntu Server machine I have running for pihole…

I’ve reached an impass when I run the relay:

^Cadamrhoades@pihole:~/relay/assistant-relay-master$ npm run start

assistant-relay@1.0.1 start /home/adamrhoades/relay/assistant-relay-master
node index.js

Fired up the SSDP Server for network discovery…
Firing up the Web Server for communication on address 172.16.0.126:8002
Attempted to automatically open the URL, but if it failed, copy/paste this in your browser:
Sign in - Google Accounts**************************************************************
Paste your code: (node:21856) UnhandledPromiseRejectionWarning: Error: Exited with code 3
at ChildProcess.cp.once.code (/home/adamrhoades/relay/assistant-relay-master/node_modules/opn/index.js:84:13)
at Object.onceWrapper (events.js:317:30)
at emitTwo (events.js:126:13)
at ChildProcess.emit (events.js:214:7)
at maybeClose (internal/child_process.js:925:16)
at Socket.stream.socket.on (internal/child_process.js:346:11)
at emitOne (events.js:116:13)
at Socket.emit (events.js:211:7)
at Pipe._handle.close [as _onclose] (net.js:567:12)
(node:21856) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:21856) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

Can anyone offer me any guidance please?

Many thanks

Adam

What does your piston look like?


And here is the log. It says it sent it, but gh does not announce anything more does relay assistant show anything in the terminal window. Again, with postman and curl, everything works.

5/10/2018, 3:37:00 PM +398ms
+2ms ╔Received event [Contact Front Door].contact = closed with a delay of 1110ms
+101ms ║RunTime Analysis CS > 21ms > PS > 56ms > PE > 24ms > CE
+103ms ║Runtime (36828 bytes) successfully initialized in 56ms (v0.3.000.20180224) (101ms)
+104ms ║╔Execution stage started
+110ms ║║Comparison (enum) closed is (string) closed = true (1ms)
+111ms ║║Cancelling condition #4’s schedules…
+111ms ║║Condition #4 evaluated true (4ms)
+112ms ║║Cancelling condition #1’s schedules…
+113ms ║║Condition group #1 evaluated true (state changed) (6ms)
+114ms ║║Cancelling statement #5’s schedules…
+120ms ║║Sending internal web request to: 192.168.2.115:8801/customBroadcast?text=“Front%20Outside%20Door%20is%20Open”
+124ms ║║Executed virtual command httpRequest (5ms)
+124ms ║║Requesting a wake up for Thu, May 10 2018 @ 3:37:20 PM PDT (in 20.0s)
+128ms ║╚Execution stage complete. (25ms)
+129ms ║Setting up scheduled job for Thu, May 10 2018 @ 3:37:20 PM PDT (in 19.996s)
+136ms ╚Event processed successfully (136ms)

Hi,

Has anyone gotten the Nest cam to stop streaming? I can get it to start, and can get it to stop using voice commands, but not from the Relay. Any suggestions?

Thanks,
Luis

To stop a stream, send the following request:

http://<ip_address>:< port>/nestStream?stop=true&chromecast=<chromecast_name>

Hi Greg,

Thanks for the response! I’ve tried sending that command, I don’t get any audio response from the GH and no action from the Chromecast. Even when starting the stream – even though it starts – I get no audio response from the GH using the nestStream commands.

If I send custom commands instead like http://<ip_address>:/custom?command=show+office+on+TestTV&user=&converse=true, then the stream also starts AND I get a audio response from GH. However, sending a custom command to stop gets me a response of “Nothing is playing right now.”

Using voice commands to stop the stream works in both cases.

Yes you’ll need the converse parameter for the GH to speak.

To be honest, the Nest Stop implementation was a bit of a work around because the commands on the SDK are broken from Google’s side.

You are supposed to be able to stop it normally but it doesn’t work so I had to implement a workaround.

I’m away at the moment, but I’ll have a look when I get back

You do not have a user specified in your link. After the text you have to have “user=USERNAME” where USERNAME is the name you specified at the beginning of your JSON file.

Hey Ryan, thanks for the reply. Tried that too and it didn’t make a difference. I thought I had read in the previous threads that Greg said it shouldn’t matter if you have “user” or not as it would just use the default user.

Edit: Okay, it looks like WebCore might be the issue…I tried the same string on Tasker on my Android phone and it worked great…Anyone else using webCore having an issue?

I just used webcore to send the broadcast. And yes, you’re right, you don’t need to have the user specified. Try this. Set up a piston with no conditions, just the action of the broadcast. Something like this:


you can see the link in the pic below

Then click on the link on the top of the piston where it says “External url”. This will execute your piston. Make sure you have logging level at full. And make sure you have it set to POST and JSON.

What version of Node did you install? Are you sure you have the right version for your processor?

here are the results

{“result”:“OK”,“timestamp”:1526268169412}

but still nothing played on any of my google homes or home minis

v9.9.0 (from your tutorial…although I know there is a 10 version, but didn’t install it because wanted to ensure I followed the instructions.)

Can you show me your piston please? And the results from Live Logging? When you start the assistant relay, do you get an announcement saying "Assistant Relay is now running for "?