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

Anyone know if you can run this on android using Dory - node.js / javascript?

Trying to install it and getting the same issue as above can not find module google-assistant.

Any help would be greatly appreciated.

Wont work. It needs to be Windows or Unix based platforms

Dang… had an old phone i wanted to use as a relay / smarthome controller

@ghesp, I have some update.

I just ran the command forever start server/app.js and looks like the server is running but got the below message.
warn: --minUptime not set. Defaulting to: 1000ms
warn: --spinSleepTime not set. Your script will exit if it does not stay up for at least 1000ms
info: Forever processing file: server/app.js

When I access my local host I’m getting the message “Dude, chill, it’s quiet time!”

I did change the time values to start as 25 and end as 25 didn’t work then tried 0 and 0 didn’t help
“muteStartup”: true,
“quietHours”: {
“start”: 25,
“end”: 25
},

chiiltime

If I make changes to the quietHours then how do I publish the changes? It looks like it is not taking it.

My assistant relay is working now.

I had to get rid of the quiet hours logic by commending out the code from app.js.

// if (global.config.quietHours !== undefined && (global.config.quietHours.start <= now || global.config.quietHours.end >= now)) {
// console.log('Got a command during quiet hours (start: ’ + global.config.quietHours.start + ', end: ’ + global.config.quietHours.end + ’ now: ’ + now + ‘). Ignoring.’);
// res.status(420).send(“Dude, chill, it’s quiet time!”);
// return;
// }

The syncing is supposed to be fixed in later releases of Google Assistant.
As for sending broadcasts from SHM, there’s no way to do that natively but you can use a Virtual switch and “alert with lights” to turn on that switch. You can then respond to that virtual switch from something like webCoRE.

I recently setup Google Assistant Relay v2 and was also wondering how this would interact with SmartThings and have built a smartapp to handle POSTing the JSON to the Google Assistant Relay server to get notifications in the event of any of my devices changing state.

Google Assistant Relay Notifications SmartApp
https://github.com/braytonstafford/google-assistant-relay

I’d love to get @ghesp’s feedback on this as well

3 Likes

Is anyone currently having problems with Assistant Relay? Before I go tearing apart my end, it would be nice to clarify it’s not Google’s end. It seemed to stop a few days ago (~20 November?).

I’m posting the attached template within Postman and these are the results -

Hi, In short, Thanks for all the details, which helped me in setting this up, my Curl commands work perfectly fine, but my test piston isn’t. I am having the exact issue mentioned in [Release] Google Assistant Relay V2.0 - Google Home Audio Notifications!

Not sure what was done to fix it, per post [Release] Google Assistant Relay V2.0 - Google Home Audio Notifications!

But I am unable to make it work. Any help appreciated. Thx.

Having no issues here.

Have you guys downloaded the actual release and not just cloned the repository? There is code in the repo thats still a WIP

Greg,

Below are my Piston and logs, still unable to figure out the issue. Curl works fine, Postman also does work fine, where my GH announces the command.

11/23/2018, 10:20:56 AM +795ms
+0ms ╔Received event [Home].time = 1542990055706 with a delay of 1088ms
+407ms ║RunTime Analysis CS > 230ms > PS > 166ms > PE > 12ms > CE
+410ms ║Runtime (37277 bytes) successfully initialized in 166ms (v0.3.108.20180906) (409ms)
+412ms ║╔Execution stage started
+423ms ║╚Execution stage complete. (12ms)
+425ms ╚Event processed successfully (425ms)
11/23/2018, 10:20:35 AM +575ms
+0ms ╔Received event [Home].test = 1542990035574 with a delay of 0ms
+83ms ║RunTime Analysis CS > 23ms > PS > 47ms > PE > 14ms > CE
+86ms ║Runtime (37262 bytes) successfully initialized in 47ms (v0.3.108.20180906) (85ms)
+87ms ║╔Execution stage started
+94ms ║║Cancelling statement #1’s schedules…
+120ms ║║Sending internal web request to: 10.0.0.19:9000/assistant
+128ms ║║Executed virtual command httpRequest (22ms)
+130ms ║║Requesting a wake up for Fri, Nov 23 2018 @ 10:20:55 AM CST (in 20.0s)
+148ms ║╚Execution stage complete. (61ms)
+157ms ║Setting up scheduled job for Fri, Nov 23 2018 @ 10:20:55 AM CST (in 19.975s)
+167ms ╚Event processed successfully (167ms)

Strangely, lack of response from Assistant Relay ‘self-fixed’ after a couple of days without my intervention.

I have a mechanism that is polling the Assistant Relay with a command every 30 seconds. I’m beginning to wonder whether Google ‘kicks-off’ accounts for over-use, or has some other limit prescribed.

Everything seems fine there.
If you see the logs in Assistant Relay saying it’s triggered X, then there’s nothing wrong on this side, the issue is likely either with your account configuration or Google

Greg, Thanks for checking. I have been trying, but still not working. When I test the piston, I do not see the request even coming to the Relay Assistant API, as it prints nothing in the nodejs API log. But when I try a curl command from the Windows DOS prompt, it works fine. ANy settings I am missing on the Webcore/Smartthigs side?

Update: Ok finally figured the issue. I had to use a different IP address, and then setup a port Forwarding on my Router, to route any request coming to the above mentioned IP address and the 9000 port, to be routed to my Laptop IP and port where the API is running. Is there no way that I can achieve without doing this? Thanks.

Does anyone have the Device Handler code for smartthings? I’m not able to locate it now and had uninstalled it trying to TS some issues I was having.

@joetlawson for webCore?

@icuc The device handler was for Smartthings but allowed the relay to show up in webCore as a device.I was using it with the version 1 relay. Had the DH installed until just the other day and now I’m not able to find it.

The Google Assistant API has a limit of 500 calls/day. You can apply to increase this limit subject to appropriate justification.

My home automation system was using the assistant relay for a polling mechanism every 30 seconds. That’s 2880 calls/day. It was failing regularly until I pulled some logs and discovered the limit.

Anyone aware of where I can find the code for the device handler?