SmartThings Community

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

(Dana ) #21

Just had an “aha” - I’m installing Ubuntu on my Chromebook and will run that as the primary OS on that device for now. Hopefully will work as a decent Ubuntu client.

EDIT: Or maybe not…Ubuntu is not working well on my Chromebook - display issues (when I type in a a search field in the browser text doesn’t fully display, when I go to this site in the default browser the site won’t display properly and I can’t log in, etc. b Chrome but the keyboar d and mouse are all wacky - not usable.

On the other hand, this means I “have to” order a Raspberry Pi. Arrives tomorrow… :smiley:


(Ben Dews) #22

@ghesp, Thanks for this, it’s absolutely awesome work and really opens the door for what can be achieved with the Google Home platform within SmartThings! Especially loving being able to replace my current WebCoRE TTS functions with the nicer Google Assistant voice.

Only issue I’ve found so far is the web server doesn’t seem to be returning a response from the POST requests, which causes some issues with connections being kept open until they time out etc.

Also, are you currently accepting pull requests (or will be in the future)?


(Greg) #23

Ahh, yes I was supposed to put that in before I pushed it out to the public repo but forgot. Will sort that now…


(Ben Dews) #24

Just another teensy thing, if you wanted to enable GitHub integration within the ST IDE you just need to change your device type and smartapp folder structure like so (if you weren’t already aware):


Can’t wait to see what is made possible with this, being able to send arbitrary commands straight to google home really opens up the possibilities :smiley:


(Greg) #25

Responses to the endpoints now added, and I’ve updated the folder structure so hopefully it works via the IDE.

I’m trying to figure out a way to get sound effects through the assistant. I know if you use the assistant on your phone and say “broadcast make some weird sound” it will broadcast the weird sound you made as it cannot do speech to text.

I’ve made a sound file that uses the assistant voice for the word broadcast followed by a doorbell sound, however I can’t figure out how to stream this as a buffer to the assistant. It uses Protobuf I believe, but I’m having some issues

EDIT: Also yes, pull requests are welcome


(Sebastien Couture) #26

Thank you, it works perfectly here too!


(Bill S.) #27

Just wanted to say great work so far on this. I installed it on an Ubuntu VM and I’m running it under pm2. Working flawlessly. I have 3 Homes and 3 Minis scattered about the house and to hear them all chime up with text is really cool. I haven’t tried the smart app yet. That’s next on my list.

Once you can get it to target indiviual devices (and/or groups), it will be exactly what I have been waiting for since the Home came out.


(Bill S.) #28

Just as an aside; I’ve NEVER had a good experience with Ubuntu on any of my CBs. You would have a much better experience with Arch, imho.

1 Like

(Greg) #29

Might be waiting a while on targeting groups and devices. I spoke with Google and they don’t support it in any way…typical

1 Like

(Bill S.) #30

I kinda figured as much. I am working on a similar project and ran into that limitation as well. I was hoping someone would be able to overcome it, but knowing Google, they’ll get us to within 1’ of the finish line and then leave us hanging. sigh

Also, I had to add “use strict” to index.js using Node 4.2.6 as I was getting the following:

let assistant = Object.keys(config.assistants)[0];

SyntaxError: Block-scoped declarations (let, const, function, class) not yet supported outside strict mode
at exports.runInThisContext (vm.js:53:16)
at Module._compile (module.js:374:25)
at Object.Module._extensions…js (module.js:417:10)
at Module.load (module.js:344:32)
at Function.Module._load (module.js:301:12)
at Function.Module.runMain (module.js:442:10)
at startup (node.js:136:18)
at node.js:966:3


(Dana ) #31

Thanks. Just for kicks I’m going to install Arch on my Chromebook while I wait for my Pi to arrive later today. I am going to be SO unproductive this afternoon /evening. :smiley:

1 Like

(Bill S.) #32

LOL, any day spent playing with tech is technically productive. :wink:


(Eddy) #33

Since i didnt have anything, i bought a kit from canakit
I know its a bit more expensive but i wanted something clean
Also bought it from amazon


(Eddy) #34

Hey not sure if you know but i just recently installed home assistant on my raspi and i was able to do the broadcast message thingy by targeting a specific google assistant.
I am not sure if its tts, but it sounded awefully like the opening of the “broadcast command”


(Greg) #35

The sound they make is very similar, but the TTS is the cast sound, not the notification sound

1 Like

(Dana ) #36

Thanks. I got a similar kit with a case, but no SD card as I had a micro 64GB card already.

Put Noob on the micro SD this AM, when the kit arrives I’ll attach the heat sinks, connect and insert card and get started.

I haven used Linux in years, used to have it on an old laptop primarily for doing cookie cutter Android builds for my old Droid phone. :slight_smile:


(Pedro Lemos) #37

The fact that all of Google home solutions require a middleman I’d so frustrating.

Smarthings should be able to send command directly to chrome cast able devices. Any app that shares audio this days can cast to chrome cast either from iOS or Android.

Certainly there will be a way… Pity nobody has find it yet.

But great work. Keep it up.


(Greg) #38

Not quite that simple.

It’s a bit like you trying to talk to someone in China without knowing Chinese and without them knowing English.
Unless you teach one of them how to interact, you always need a translator.

Sure, it might be simple enough to implement, but then there are over 6000 languages in the world and you don’t have the capacity to learn them all.

1 Like

(Pedro Lemos) #39


Didn’t say that would be easy.
My point was that this should not be rocket science. As you said someone needs to start understand the language and that build a framework (a Rosetta Stone) that allows other languages to be easily translated.

The main upsetting thing for me is that we are putting all our efforts in building a nice translator (that in our case means more investment in hours and equipment just to have two pieces working together) when ST should have provided support for bells and whistles tand notifications through a spekear from the start.
You don’t have a single universal technology that is supported. No DLNa/ Cast / airplay to allow sound through speakers that is such a core expectation for all of us.

The community is doing all the hefty lifting and getting no support from ST.
Certainly that they could have picked up one of node.js developed by the community and integrate on their cloud environment and officially provide cast support…

For example that is what openhab is doing that now has chrome cast integration, obviously does not work with every single cast device but is working


(Dana ) #40

But…the good news is that I’m setting up my Pi (just arrived) and it so so tiny I can’t believe it! I just didn’t realize how small it was going to be. I think I’ll finally have a bit of tech that my wife will say is cute. :smiley: