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



My insignias are not responding to broadcast either.


Well, now I feel better that I'm not going completely bonkers (just a little bit).


I just got my Pi, and can't get this to work. I've gone through the instructions, and have "Assistant Relay in now setup....." in the SSH console, but nothing plays on the GHs. I gather it's supposed to announce that? Uncommenting the debugs in the driver, I get "java.lang.NullPointerException: Cannot get property 'isEmpty' on null object on line 75 (speak)" (seems $result is null). It doesn't show anything in the console, but last night it was telling me to shut up and be quiet. Using a direct weblink it says "cannot GET /customBroadcast".

I'm using 9.9.0 node, and v2 of assistant relay. I've disabled IPv6. I don't know enough to even know where to begin, though I've tried reinstalling pretty everything multiple times. Only thing I can think to do at this point, is wipe the RPi and start over (only other thing on it is OpenVpn).


The version 2 is problematic. I'm not certain anyone had been able to get it to work properly. But the v1 still works great. I use it daily.


Ask and you shall receive!!! I just finished creating a new Hubitat Driver for Google Assistant Relay v2! It supports all of the exact same functionality of my original driver, plus the ability to control debug logging (enabling it turns it on for 30 minutes.)


Argggh! I just reverted to v1! Lol.

@SmartHomePrimer I got the announcement over my GH's, but still nothing when using speak or Device Notification in the device. So, progress!


Check for port conflicts. I had to change mine to 4000.


:joy: Back to v2 @Roguetech ?

What benefits come from v2 versus v1? Is this worth the update?

[Edit] Ah OK, I see that I could point to an audio file after a response. That would come in handy.

JSON Responses

V2 now responds with a JSON object that includes information about your request

Audio Responses

If you use something like cast-api, Sonos or any other network connect speaker, you can now send your Google Assistant audio responses to specific devices. It’s not the same as a broadcast, so it will interrupt whatever is happening but its the best we have at the moment.

In the below example, I am making a request to Assistant to tell me about my day. Assistant Relay saves the audio file and sends a URL to listen to it back in the response.

What you can then do is tell a speaker to play that URL from the response, and it will play the Google Assistant response.


I do not see any benefit. I just knew that eventually more and more people would be migrating from ST with an exisiting v2 assistant relay already set up, and would probably prefer to not have to start over from scratch.

Both versions seem to work about the same. The current v2 NodeJS server has some issues with a new feature called "Quiet Time". I had to remove the Quiet Time settings from the config.json file as it always believed my home was in quiet time mode. Other ST users have reported the exact same thing. There appears to be a Pull Request to Greg Hesp's GitHub repo to address this issue, but I am waiting for Greg to accept it before doing any testing. For most Hubitat users, Quiet Time can be implemented via rules and restrictions, if needed.

I also added my personal MS Word documentation that I created to allow myself the ability to recreate these installations should need ever arise. There is now a MS Word document in each of the Driver GitHub folders. Hopefully this will help new users get up and running quickly. Much of this documentation is thanks to @Ryan780's work over in SmartThings.


Will try to get v1 working first, then try v2. Changing ports didn't help.


Currently, this v2 driver is completely ignoring any responses it receives from the v2 of assistant-relay.


I added MS Word documents to my GitHub with detailed step-by-step instructions to setting up either v1 or v2. Hopefully these might help.


Has to change in the config.json file and the setting in the driver. You changed both and restarted Assistant Relay?


Thanks, Dan. I was going to ask your opinion. I was just barely competent enough to get V1 going and feared any change would push me over the incompetent threshold. V1 mostly works for me, until it doesn't. But then it works again, until it doesn't.


@ogiewon Dan thanks for adding support for the assistant-relay v2! Any chance you can add support to the driver to support "preset" commands?

Preset Broadcasts

Google Assistant supports a number of preset broadcasts out of the box, that come with sound effects and other surprises that can be found here.

To make use of these presets, send a request with the following json-encoded body parameters

preset: <command>
user: <user in config>

Available Commands

  • wakeup
  • breakfast
  • lunch
  • dinner
  • timetoleave
  • arrivedhome
  • ontheway
  • movietime
  • tvtime
  • bedtime

I think we'd need another [CC] derivative, perhaps [CP]. In the v1 driver this was working with just a normal TTS but now if I send "wakeup" it just broadcasts "wakeup" instead of the preset.


Followed these instructions from the beginning, and it's working with v1 driver.


I think I read above there's a way to stop GH from saying the "from [user]" part...?


Unfortunately, there is no way to suppress that yet.


The presets still work as long as you enter one of the phrases as shown in the list from the following site.



What's the device "capability" to allow selecting it for alerts in custom apps?


Just look at the capabilities in the driver source code. :wink: It supports Speech Synthesis and Notification.