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

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.

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!

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

1 Like

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.

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...

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

1 Like

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

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.

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.

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.

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.

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

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

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

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

1 Like

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.

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

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

1 Like

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

1 Like