[Release] Google Home Assistant Relay Driver (v1 and v2)- text to speech on Google Home devices

First, thank you for sharing. Your solution seems about as elegant as most around here! :wink:

Second, I have a question about how your rule below is working... What integration are you using on Hubitat for the Google Home Mini? Are you simply using the built-in Chromecast Integration (Beta)? Or some other solution...as this thread's Assistant-Relay does not support playing mp3 files. So, I am curious what integration you're using. Thanks!

I thought when you originally said "play music" I thought you meant something like "Play Pandora" or "Play Spotify". I didn't realize you were trying to play something specific. Glad you came up with something though. Very nice.

Thanks for sharing
I am actually looking for something that when I press a button for example then it would be the same as I would have used my voice to tell my Google home "play music in spotify" . Then after press the button the music will just start playing in spotify. Anyone knows if possible?

As far as I know that is not possible.

That is correct. I used the built-in chromecast integration. I was also able to make it work with webcore (https://github.com/ajayjohn/webCoRE/tree/hubitat-patches/smartapps/ady624) on rasperry pi, but it was rather slow (no surprize).

Is there a reason you didn't just use Rule Machine? The Play Track action is available under "control music players" in Rule Machine 4.0. Would probably be a lot faster response time. Although it does take a while for the track to be streamed by the Mini.

I tried that, but it only let me use Samsung R1 speakers with a long delay. I couldn't use minis with it.

Attention!!! Anyone who's trying to install Assistant Relay currently from GitHub. There was a recent commit to the assistant relay github which broke authentication with the google assistant. Instead of using the the key file locations now, the latest version is using an OAUTH2 file method. If you are trying to install from @ogiewon's wonderful instructions, and clone from his fork of the Assistant Relay repo for installing version 1.0, you should not run into any problems and can follow the instructions exactly as written.

If you clone from the original fork to install AR v2.0, you have to modify the Google Assistant version from 0.6.0 to 0.2.0, otherwise, the rest of the program will not work correctly as there was no update for the Oauth2 method in the rest of assistant relay. So, in the instructions on page 15, after the git clone command, there is one thing that you have to do. You have to modify the package.json file. So, use a command like:

cd assistant-relay
nano package.json

Then you have to change this line:

"google-assistant": "^0.6.0",


"google-assistant": "^0.2.0",

Then hit cntl-x and then save the changes. You should be all set after that. Just follow the rest of the instructions to finish installing.