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

community_driver

#202

You're correct, it seems to work if I broadcast the command "bedtime" but no longer works if I use the derivatives like "it's time for bed". It used to work with other than the basic command, but it's an easy fix for my RM rules, thanks!


#203

I’ll look into adding support for the presets with a [P] prefix, or similar. Just not a high priority today... :wink:


#204

This is why Google Home no longer does my announcements. I use it to send silent commands to cloud only devices, and I use it to activate TTS Alexa routines. Works great.


#205

Bummer I worked through the Word doc then saw "this should be run from the rPi desktop" and I was like oh no. I'm running without the desktop. I was really hoping this was to the point where it was meant to be run on a headless server.

Still shocked there are no containers yet. I tried to make one a little while ago but ran into trouble when trying to create a container from scratch.

Someday...


TTS to a Echo dot or Google mini
#206

You can run it on the RPi desktop through VNC. Don't have to connect through HDMI.


#207

Love my VNC Viewer. Makes it soooo much easier!!


#208

Keith - It is not a requirement to use the RPi desktop environment. Everything can be accomplished from a terminal window. You will be given a URL that you can cut and paste into another browser on another system altogether. You then obtain the magic token via that browser session and paste it back into the Terminal window at the waiting prompt.


#209

Ok. So I did that last night but there was just an error message instead of something awaiting an input. I know that's not helpful without the error message. I hope I can do the last part that mentions running it as a service too.


#210

Hmmm... Even running the RPi Desktop, the Assistant-Relay threw an error saying it couldn't open the browser (even though the browser did pop up a few seconds later in my case.) Whether the browser window opens or not, the assistant-relay sits and waits for you to copy the code from the browser window into the terminal session. If assistant-relay crashed at that point, then I don't know what to tell you. I always install Raspian with Desktop as I prefer to use VNC to manage my Raspberry Pi systems. So I cannot state with any certainty whether or not assistant-relay actually works without it.


#211

Ok so I was able to paste the reply secret in and get it running. Now I've moved on to the automatic startup section of the document. When I run :
pm2 startup
I get:
-bash: pm2: command not found
Even though I did the step before, which installed PM2.
Some Googling mentioned things like running:
sudo env PATH=$PATH pm2 start index.js
but that didn't make a difference.

Thanks for any ideas.


#212

Why are you running pm2 startup?
It's npm run start.


#213

OK so installing pm2 like this has helped move me along:
sudo npm install pm2@latest -g


#214

Why? That's not the right command. Where did you see pm2 mentioned?


#215

It's in the end of the Word doc @ogiewon has prepared detailing how to run assistant-relay automatically on boot.


#216

Then obviously it is missing a few steps. I would use forever. npm install forever - g

Then forever start....

You can add a line to your rc.local or write a separate systemd service file to get it to start at boot, whichever node process manager you are using.


#217

Thank you @ogiewon.
Does this version show the behavior of prefix - 'Broadcast for ' for each TTS announcement?

I run Ubuntu on Rpi 2. I will update the driver and the relay code to V2 and report back.

Ajay


#218

No, the "incoming broadcast" prefix is a Google side implementation it has nothing to do with the assistant relay or @ogiewon Dan's driver.


#219

Yes. This change is a Google-side change. Nothing any of us can do about it at this time.


#220

I thought so its on Google side.
Thank you for all the contributions to the Hubitat community.


#221

Actually PM2 is a perfectly acceptable way of running the relay as described, especially if you're running it on a non RPI distro. I'm using it on my Ubuntu server.