I’ve had the same problem for some time. But even sticking a volume-set command in front of each say-something command doesn’t work. Setting the volume once per day (like with a Google routine) is not adequate. I’ve taken to setting it hourly with a Node Red function.
Oh that’s a good idea with the node red function. I do that too.
The volume set works about 90% of the time so hopefully the node red will make it 95% effective.
It is really annoying. One of the things I use it for is my doorbell. And when it goes to 45% I can’t hear it in most rooms of the house.
Setting the volume regularly doesn’t always help. It’s the Google component itself that sets the volume to 45% at random at the start of its output, so it may do that even though you set the volume higher just seconds earlier. There doesn’t seem to be any way to stop it - it’s a built-in bug.
I might have found another solution because you’re right about the Google component randomly doing it to piss you off just seconds before you use the talk function… Even with the node red routine it’s still getting me with this 45% BS
Try this.
I set the night mode that adjusts the speaker Volume down at night. (turning it off/ disable night mode doesn’t fix it)
So I set it to turn the speaker down to 70% for night mode between 11:55pm and 12:05am
Then it is set at 88% for the rest of the time.
I haven’t had it randomly set to 45% so far, but it’s only been a day, and that’s a small sample size for a “random” bug… Let’s see how it goes…
I’ve found a workaround, clumsy but confirmed that it works after several days of testing.
You know how when you make an announcement on Google Home with play_media, it first makes a bleep sound? Unless it comes immediately after a previous announcement while the GH speaker is still active, in which case it doesn’t do the bleep, it just plays the audio.
I noticed that when I am playing my chiming clock sounds, the sequence is: bleep - seems to be at 70% volume, as set
first chime - at 45% (volume has dropped!)
all remaining chimes and final time announcement - at 45%
From that I got the idea that whatever is setting the volume to 45% is happening during that initial connection that produces the bleep.
I therefore altered my sequence to:
Set GH volume to 10% (attempt to produce a very quiet bleep, if any)
play silent clip of 0.2 sec to activate the speaker
set GH volume to 70%
play my chiming sequence (speaker should already be active)
(Not showing the delays of a couple of seconds in between commands to make sure they have time to be sent and processed)
This works!
By activating the GH with a brief silent clip a few seconds earlier and then setting the volume correctly immediately after, it is still active when I make my actual announcement. If the initial activation incorrectly sets the volume back to 45%, my sequence has a chance to restore 70% before the actual announcement.
Now my question is, is there a way to make a sort of function or subroutine so I don’t have to cut and paste all that every time I want to do a TTS…
if I could put all this as a routine:
(*VOLUME FIX ROUTINE * )
Glad to hear that pre-playing a small silence clip works for you too.
My automation is in Node Red, so the code wouldn’t be the same, but the basic idea is pretty simple: play a small silent clip first to trigger the faulty volume reduction, then immediately after set the volume correctly, then play the actual output.
Unfortunately I don’t know any way to include a subroutine in HA automations, other than some complicated scheme of triggering a virtual device that runs another automation. Time to learn Node Red!
Something else I just noticed, if you have the volume set high (like 88%) during the day it also automatically lowers it to 70% when you send a TTS or MP3 file to it.
I also noticed:
It changes the volume when you send a sound to it when its been “asleep” (not used for a while), and the sound is what “wakes” it. Sending a volume adjustment command to it does not “wake” it.
The reason this is important is the order you need to do things to fix it.
Send a mp3 file of silence to it. (mine is 0.2 seconds long). This “wakes” the device. There is a good chance it will set its volume to 45% (at night) or 70% (during the day)
Send a command to it to set the volume to what you want it to actually be
THEN send your TTS or MP3 file you want people to hear and it should play at the volume you want. It will stay at the volume you just set it to in step 2 because its already “awake”
If you omit step 1, then it will change its volume to 45% or 70% just before it plays when you do step 3 because step 3 will be the one that “wakes” it
The other thing to note is that since google had its legal issues and removed the ability to change the volume of a group of google home/chromecast etc you can send a TTS/MP3 file to a single or group of devices, but have to send media_player.volume_set adjustments to the individual devices to get it to work reliably.
Thanks google for breaking something that worked because you’re too tight ass to pay royalties for technology you stole