TTS Announcements, Google cast, Music - Issues and workaround

This is the solution I’ve had to implement because announcements stopping music I have playing through the house is a deal breaker.

Also a fix for google TTS going to a cast group working for a short while then failing (and the reason why)

I have Chromecast Audio (google music) playing music in most rooms in my house all day. It is in sync and sounds amazing. I use a chromecast audio, some bookshelf type speakers and a small digital amp from AliExpress which was about $100

I have a google home mini in every room.
If I don’t have a chromecast audio in a room, the music will play from the the google home mini.

I’ve set up a google cast audio group called “everything” which is where I send music. It is set up in the google home app, and it’s set up as the default audio device. So if I say “play some music” it comes out of all the speakers in the “everything” group. It is mostly chromecast Audio devices and one or two Google Home devices.

I’ve set up another group called “bullhorn” in home assistant, which is all the google home devices that are NOT part of the “everything” group. This is NOT a google cast group. I’ll explain why a cast group won’t work in a moment. If I want to announce something, I google TTS it via home assistant to the “bullhorn” group.

This way I get my music, and I get announcements (yeah announcements play a little out of sync but they don’t stop the music)

WHY YOU CAN’T USE a google cast audio GROUP to send TTS to.
It works … for about 20 min or so. Then it stops working until you reboot home assistant / disconnect reconnect the google integration… The reason is that when you make a google cast group, it doesn’t have a specific physical device. It’s a virtual device group. The devices in that group negotiate and nominate one of themselves as the “master” and the IP address of that device is remembered by the homeassistant / google integration. So when you send a TTS to the group it goes to that “master” and gets played around the group.
Problem is, that “master” can get demoted and another “master” nominated (wifi strength, response time, and other timey-wimey causes). Next time you do a TTS, it gets sent to the old “master”, that device ignores it because it’s not the “master” and you don’t hear anything. When you do a reboot it will discover who the new “master” is, and work until that one gets demoted.

I went nuts for three days working out why that kept screwing up. Arrrrg \o/

TTS works fine if you send it to a specific single google home, or a home assistant created group of media players. Just not a google cast group.

Remember: Make sure that NONE of the devices in your “bullhorn” (TTS) group are also in your music cast group. If there is any crossover between the groups, the music will stop when you do an announcement.

3 Likes

I’ve read this a couple times, and I’m just trying to get my head around this. Currently, I have a Audio Group that contains 4 Google Home Mini’s, this was set up in the Google Home app and the group is called Everything.

Now at the moment I have an audio file that gets played when my alarm gets triggered, this is played to media_player.everything which was automatically discovered after I created the audio group in the Google Home app, I’m assuming this is why my audio file does not play sometimes when I trip the alarm.

EDIT:
I have now created a group in Home Assistant that contains all my Google Homes, I have ran TSS and my audio file for my alarm, although they are a fraction of a second delayed between them all, I’m not having the issues that I was having previously as you had mentioned. If I’m playing music through the Audio Group directly through Spotify for instance, then trigger the HA Group to do something, it will still stop the music, which I’m not worried about at all!

1 Like

Oh cool, I was just about to reply now I’m at my computer. Great you got it working. :slight_smile:

To be 100% sure it’s working properly, wait an hour or two and trigger the alarm again. If you still hear it, you’re golden. :smiley:

1 Like

Yes, you are right. I ran into the same problem and discovered that using Home Assistant groups (created in configuration.yaml or groups.yaml) of those speakers will allow me to do TTS announcements. It still stops the currently playing music on the speakers though.

1 Like

I use google home for announcements such as door bell and home alarm. I have been so annoyed by music on my google home stopping and not returning after the announcement. I did quiet abit of research around 2019 and gave up, run out time etc.

I spent the last 2 hours today trying to find a solution. All I come across was that in node red the current way to send a message is to ‘cast’. However there is another term called ‘announce’ which supposedly google returns to what it was doing pry to the announcement.

There is a package which is no longer supported an now broken which used to do this.

I ended up just putting a few extra google mini devices through the house that do only the announcements, so that they don’t interfere with the other devices that play the music etc.
I made them a group called “Bellhorn” and just send all announcements to “Bellhorn” and it plays on all of them.

Ended up that spending another $100 on a bunch of google Nest mini devices was an annoying but better use of my time and money.

I like this as workaround so simple. Can pick up 2nd hand Google minis for around $25aud.

Although ideally it would be great to just use what we’ve got.

1 Like

I use GitHub - Apipa169/Assistant-Relay-for-Hassio: Send commands (including broadcasts) to the Google Assis to do a “broadcast” to google homes.

The plus side of doing a “broadcast” not text to speech is that anything that is playing on a google home resumes after the broadcast.
The downside is it always says “Broadcast from Chris” before any announcements

Hi @c_wolsey I’m trying to use it also but it isn’t working how do you configure it please?

The chromecast/google speakers I have will go to idle immediately after a TTS announcement.
I have a helper switch that will be on when I want music paying through the speakers.
I have an automation that when a google/chromecast goes to idle, and the music playing switch is on, it restarts the music.
Works flawlessly. Music usually starts back up around 10 seconds after the TTS.

1 Like

Can you tell me how you control / initiate music streaming to this group? Is it through HA?