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

Thank you for the reply. What devices are you talking of that habitat does not support.
I too would do it. I have one sonos but when the power is out which happens often here, I did a special command in smartthings that changes mode and notifies ME on google assistant but it has not been reliable. So instead I change certain lights to help identify the modes.

Well, although the hub supports a lot of devices, there are some that do not have public APIs and no one has, or they are not popular enough that anyone wants to try reverse engineering their API.

For me, one example is my Delta Voice IQ faucet. I don't want to say "Alexa, Ask Delta to dispense 1 cup of water" or some quantity like that. So I use Assistant Relay to allow me to do what I want. I setup Alexa routines with what I want to say. That in turn will activate a virtual switch on HE and that virtual switch turning on, and gives the Voice IQ module's cloud instance the exact phrasing it wants to hear, but it does it all silently and I get the result I want.

I used to also use it to control the color of an IKEA Trådfri bulb for a specific reason, but now I'm able to do that with an Alexa routine instead.

It comes in handy for stuff that doesn't have a local integration and is only controllable via cloud.

1 Like

TTS on GAR broadcasts to all of the speakers linked to your google account . I use it for this but live on my own so isn't an issue for me but would imagine it wouldn't work well in a multi person household.
An advantage it does have is that it doesn't stop an music/media you may have playing unlike the chromecast integration.

If the power is out at your house, how are you keeping all of these devices powered up? Also, when the power is out, I assume it impacts a somewhat large area surrounding your home, not just your house, correct? If so, do you lose your internet connection at the same time? Or are you using a cellular data internet connection?

The Google Assistant Relay relies on the Google Cloud servers being reachable in order for it to work.

The Hubitat built-in TTS support relies on Amazon Web Services one time for each new TTS phrase to be spoken. Once AWS returns the TTS as an audio file, Hubitat caches that file locally. From then on, for any TTS phrase that it already has an audio file for, it will NOT connect to AWS. Instead, it simply uses the cached file and sends it to the Sonos speaker directly. Thus, this 'should' still work even with an internet outage. Just be sure to not include constantly changing text in your TTS phrases (like the date/time.)

2 Likes

I have an inverter that power all lights but minimal appliances, namely my servers modems and two google homes for this exact purpose.
The lights would turn blue while PC and TVs and sonos would then shut down to maximise inverter usage as sonos drivers are bigger than a mini
But sometimes you oblivious to the lights in day time so I need a good tts back up like google. It worked twice and really helped but now I'm not sure if I should attempt it again. GAR was a mission to get working on smartthings even though the pi side was easy .
Let's see.

Regarding habitat caching.. That's amazing.
How much memory does it have. I found little info on habitats actual specs and internals

The Hubitat C3, C4, and C5 hubs all share very similar specs of a Quad-Core ARM CPU, with 1GB of RAM and 8GB of Flash storage, if I recall correctly. I believe the TTS cache is limited in size via the platform software to make sure it does not consume all of the flash storage. I do not know what the size limit is for the TTS cache.

Update: Found an old post from Mike Maxwell that states the TTS cache is limited to 5MB of storage.

2 Likes

NVM...I found what I was looking for, folks mentioning using V3 w/the v2 driver. :slight_smile:

I am pretty sure my V2 Driver will work with the GAR V3.

I haven’t tried it, but I believe others have.

1 Like

Confirming it works w/GAR 3.x - I installed your driver, created the virtual device, and my pistons are speaking like parrots. :wink:

1 Like

Very helpful discussion, I am new to Hubitat and have the Asistant relay working and commands from Hubitat working in Virtual Devices, not sure if I am missing the obvious but I cant seem to save the text commands in the virtual device. I select save preferences and save the device go back in and no device notification or speak command is saved. Is this only for testing ? do you have to use rule manager to send saved action and commands to GAR ? Any help would be appreciated
Hubitat Version 2.2.3.119

Yes, you would use Rule Machine, Hubitat Notifications, or any other App that is capable of calling the commands with the GAR Device Driver.

The commands that you’re executing directly with the device details page is simply for testing purposes.

I appreciate the quick response thanks for clearing it up

1 Like

guys, I am using this google assistant relay driver V3 and I prefer it above other solutions only because if I have music and there is a voice notification the music will resume after the notif but there are some cons such as there is an annoying voice saying "broadcast from user" followed by the notification itself and the notifications are just sent to ALL the google devices I have with out the option to select an specific device to broadcast to and it could be as well because when using the broadcasting function triggered by my voice to spread a message it works the same only able to send to all devices at the same time together. The good news are that today I found that I am able to broadcast messages to an specific device, so when I say with my voice "broadcast x message to kitchen speaker" it will actually do it to that specific speaker only. I am wondering if with the google assistant relay driver this is now as well possible, if anyone know I will appreciate

Have you tried doing exactly what you mentioned above via this driver? See below for tips...

it worked one time but with the same command it did not work the following ones, I will continue trying, thanks

1 Like

I'm running into a couple issues with GAR (v3, driver v2), and hoped someone may have already figured these out.

  1. I can get broadcasts to work (same gripe at Google about lead in announcement), I can get [P] commands to work. However, if I try [CC] or [CCC] commands, they come out as broadcasts of the commands, but no responses (I'll be honest I'm not sure which one is supposed to be the silent one because they always just broadcast). I did try testing using Greg Hesp's sandbox on the server, and even with the json that gets sent, I still get the same results. I did find that if I use the very generic "tell me a joke", then I do actually get the joke stated (or on the popup message if using the converse=false). However if I switch to something like "what's the weather" then it just broadcasts the command (this is a question I have no trouble getting a response accurately when I say it to an actual Google Home). On the popup on the sandbox it says there's no text result. I can't tell if this is a nodejs issue, a driver issue, or maybe it's a Windows issue?

  2. My only option right now for hosting nodejs is on a Windows 10 computer that stays on all the time. I think I got a service setup to run it even when not logged in, but it seems to stop working if someone else logs in that doesn't have administrator rights. Does anyone know the OS well enough about why that may be?

First, just to be clear, I have not used GAR in quite some time. So, I am replying based on my experience quite some time ago... You may want ask Greg Hesp directly by posting an ISSUE in his GitHub repository for the latest, up to date answers.

[CC] = custom command, there should be no broadcast if this is properly used as a prefix. For example, “[CC]turn on hallway lamp” - this would turn on a light named “hallway lamp” that is connected to Google Home.

[CCC] = custom command with conversation. “[CCC]tell me a joke” would hopefully result in a response from a google home device. However, this is very, very limited in functionality. Most things result in no response whatsoever. This is normal and has nothing to do with your setup.

@ogiewon
Thank you for the clarification. I don't yet have devices installed that could be voice controlled by Google as I'm just starting out, so that will be something I need to try. Also, due to my novice situation, I don't know much about GitHub, but I'll gladly ask Greg. From your answer it sounds as if the limitation is Google's. I mean really...make the joke work, but not the weather? :rofl:

I am having a problem and I just can't figure it out. It seems like I may have a Google issue but not sure. I am walking through the instructions and going step-by-step but I just cannot get past the OAuth consent screen. I created the project, enabled the API, go to create the OAuth but it insists I edit the consent screen first.

Throw my email in the user support email and the developer contact information email addresses, App name is already filled in for me, Authorized domains is already filled in for me, leaving everything else. Click SAVE AND CONTINUE and it shows “An error saving your app has occurred” and nothing more. Anybody else seen or dealt with this? I just cannot get past this at all.

Is it possible to play rain sounds with googles 'sound machine' feature ?