Home Assistant Community

Google Home Text Broadcasting (with auto resume music)

#1

Hello, everyone!

So, I did a lot of tinkering and hacking today, and I’ve come up with a repository that creates a Docker image that can run on a Raspberry Pi and allow you to send a GET request to an endpoint to broadcast any text message to your Google Home devices.

The TTS functionality as it is currently will interrupt any music that is playing, and then it won’t resume.

However, this piece of code uses the Google Assistant SDK to send a broadcast message that temporarily lowers the volume of the music, and then it goes back to playing.

Here is the repo:

Please, if anyone with some hass.io experience with writing addons could help point me in the right direction for turning this into a standalone addon, I’d greatly appreciate it. :slightly_smiling_face:

Also, the container needs user input the first time it runs because it gives you a link to visit, and Google generates the OAuth 2 code. Does anyone have any insight into how to streamline this for use as a plugin, or if anyone can perhaps give some suggestions on how this can still work out as an addon? I’m kind of stuck at this point.

Thanks :slight_smile:

2 Likes

#2

Ah, I see that there is already a Google Assistant Hass.io addon, but it currently runs in speaker/mic mode.

My next project will be to fork that addon, and switch it instead to accept text input through a GET request like the repo above.

That way you could have a script that accepts the TTS parameter, and then make a GET request to the text input Google Assistant to have speech notifications without interruptions.

I’ll post a new post in the appropriate category when I get it all working.

1 Like

#3

I need this!!! Any update?

0 Likes

#4

I want resume music/radio after TTS messages too. Any way?

0 Likes

#5

Me too would love to have this on HASSIO.

0 Likes

#6
1 Like