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

I had before v2 and it worked as I described but I have no idea how to do TTS notifications with with v3 with a virtual google relay device, I only managed TTS notifications when using v3 doing json http post..

I am confused... just add a virtual device to Hubitat using my v2 Assistant Relay Driver. Then, in its settings, point it at your new GARv3 server. You should be able to easily then use it for TTS, just the same as you were with the GARv2 server.

Edit - strike that!!! Thanks @codahq!

No, don't do that. I'm not sure how @PatrickD has it working if he has put "[port]/assistant" in his settings. Ogie's driver already appends "/assistant" to the end of the host:port because v2 already needed this.

This works just fine because...

"/assistant" is already added.

If you had to add it then you've messed something up with the GAR node server or modified the driver. GAR v2 and v3 are listening at http://[host][:port]/assistant and not http://[host][:port]/assistant/assistant.

However, you are correct that you should not install from source anymore. Just use Greg's release zips, unzip and then from inside the directory you unzipped type "npm i" and then "npm run start". The only time you need to bother pm2 directly is if you need to make changes to config, stop or upgrade GAR. Then you can pm2 kill (or if you have other things running on pm2 you can get the pid and do pm2 stop [pid]. For the most part you can upgrade in place by unzipping the new release into the existing directory and then re-running "npm i"

But again... do NOT add "/assistant" to the port. That just can't work unless there is some magical funky redirect going on.

1 Like

oops, yes sorry i'll go back and edit my previous post, works without having to include "/assistant"

sorry might have been covered in another threat or possibly earlier, but I'm trying to get the status of a nest lock, it appears i can ask for the status through google assistant relay, but i only get back a audio repsonse.

Do you know of any way to pass the status of a device (in my case a lock), to hubitat?

Apologize in advance as I am new to Raspberry Pi.

I managed to install assistant relay and got it running on my Pi. Can anyone give me instructions or point me at the right direction on how to get the service started automatically after reboot?

At the moment everything after a reboot, i open terminal and type
cd assistant-realy
npm start run

How do I have my pi run the above commands everytime on startup?

Hello.
I'm trying to re-install V2 of this.
In the instructions there is the following:

Unfortunately, there is no longer a "server" folder that is created by the git .
Does anybody (@ogiewon) know what to do?

Hi @ogiewon just wanted to say thank you for sharing this code!

I managed to setup assistant-relay using QNAP container station (similar to docker) using nikolaik/python-nodejs.

Now I can be notified whenever my kids wake up while I'm watching movie in the different room!

1 Like

I would follow the new instructions on the updated version and ignore the old instructions. Worked for me

I followed this method and all seems to work pretty well.

@bptworld You still using webcore even though HE has rule?. Why is that.

That post was from Jun 2018. I haven't used webcore in well over a year.

1 Like

In your opinion what do you guys prefer for those who have it. Sonos or google Relay?

What are you wanting to do? I don't use Google Assistant Relay for TTS, I use mine for controlling things that are Google Assistant compatible, but I cannot directly control them via the hub.

For TTS, I use Alexa, but the Sonos integration does sound really nice and works well. If I had a house full of Sonos, instead of a mixed bag of Echo, Google Home and Sonos, Sonos would be the way I would go for just TTS announcements. It does get more complicated than that in my home though.

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