ah ok, thanks for the clarification.
Has anyone managed to find a workaround for groups? I stumbled across this thread and am now a little disappointed to learn that it still doesn’t solve the beepBOOP when the Homes are used in Google Home app groups
yep, same issue here.
I was wondering whether bringing the volume down to zero before playing the silence file then back to previous volume would work, but not had the chance to try it yet. What do you think @hoffsta?
Not really, as Google Home doesn’t seem to have the same idea of “zero” as humans do.
Means: Yes, you can set the volume to 0% before casting, but this doesn’t mute the device completely, just lowers the volume to about 5 to 10%. Maybe this is some sort of a “security” feature, because Google want’s to ensure, that users always get an audible response if something is happening with their device.
@hoffsta WOW Thank You!!
I finally got my Google Home Mini to announce the time on the hour every hour and I was looking for a solution to eliminate the initial chime before the announcement. I was figuring it had to do with the idle/off status of the device because it wouldn’t happen right after an announcement.
Your solution worked like a charm. It’s funny, when I started it I got the chime but that was the last time I heard it.
I think I am going to try @lolouk44 's idea of using a tts message with nothing but spaces to see if that works. Then if anyone else wants to use this solution you don’t even have to create a 1 second audio file.
Thanks Again So Much!!
RK
I’m glad this solution worked out for some of you. I am just rebuilding my HASS install from scratch after moving from Rpi to NUC and wondering if there is now a better solution. I haven’t been following the forums at all!
@lolouk44 - does the blank TTS message others are attributing to you work well as a replacement for the silent mp3 file?
Not sure why it’s attributed to me
I still use the silent mp3 file and it still works fine, but can’t see why the blank TTS message would not work
I used a script to do the following:
-
Lower volume to 1%
-
Turn off GH
-
Wait 1 second
-
Turn on GH
-
Wait 1 second
-
Start playing my media (white noise)
-
Set desired volume
Using this method, I don’t hear the “cast-start” or the “volume change” sounds
Here is my script:
https://pastebin.com/rpEt8CC6
It’s a modified version of this:
https://pastebin.com/PKEqSfZ5
The delays cause the media to take 4 seconds to start playing but I found if I don’t add those delays I would sometimes hear the sounds. I also found that I had to turn off GH (step 2) or else I would hear the sound if the GH wasn’t “off” when I started the script.
So thankful I came across this fix, but is there a way to keep this specific instance from clogging up my logbook? lol It’s like 99% of all of the entries.
Also, has there been a solution mentioned for groups yet? I can’t seem to find one.
Several months later, sorry for waking this topic.
If anyone else stumbles on this posts, this solved it for me;
# Logbook chillpill
logbook:
exclude:
domains:
- media_player
I was actually able to do this without having to deal with playing the mp3 file all day. Let me walk you through it. I have a smart doorbell that rings on all my google home devices, however the connection to the speakers startles my dog and makes him start barking like crazy. The way I got around this is outlined below:
First, when the doorbell button is pressed, this automation gets triggered by my doorbell press automation
trigger: []
condition:
- after: 08:00:00
before: '20:30:00'
condition: time
action:
- service: media_player.volume_set
entity_id: group.house_speakers_group
data:
volume_level: 0.0
- service: media_player.turn_on
entity_id: media_player.doorbell_group
- service: media_player.play_media
entity_id: media_player.doorbell_group
data:
media_content_id: 'https://[My DDNS]/local/Doorbell.mp3'
media_content_type: music
- delay:
seconds: 10
- service: media_player.volume_set
entity_id: group.house_speakers_group
data:
volume_level: 0.4
- data:
volume_level: 0.7
entity_id: media_player.living_room_speaker
service: media_player.volume_set
- service: media_player.turn_off
entity_id: media_player.doorbell_group
This first automation basically makes it so the connection to the google home devices is muted, and then it plays the media for 10 seconds and then sets the volume back to normal and turns off.
Next, I have configured in my home assistant a binary sensor that detects if this doorbell mp3 is playing or not:
platform: template
sensors:
doorbell_playing:
value_template: >-
{{ states.media_player.doorbell_group.attributes['media_content_id'] == 'https://[My DDNS]/local/Doorbell.mp3' }}
This next automation is where the magic happens:
description: 'Watches to see if the doorbell group starts playing the mp3 to adjust volume'
trigger:
- entity_id: binary_sensor.doorbell_playing
from: 'off'
platform: state
to: 'on'
condition: []
action:
- delay:
milliseconds: 1000
- service: media_player.volume_set
entity_id: media_player.doorbell_group
data_template:
volume_level: >-
{% if now().hour < 20 and now().hour > 8 %}
0.6
{% else %}
0.4
{% endif %}
This automation watches for that binary sensor to change. When it does, it adjusts the volume to the level I want it (varies depending on time of day).
I was able to complete this without constantly connecting all day by doing the following
- Mute the google speaker
- Play 1 sec of silence
- Wait 1 sec while the silence plays
- Unmute the speaker
- Play the media or TTS
This appears to only work on individual speakers and not speaker groups.
Here is an example subflow I made in Node Red:
[{"id":"ab1c930c.be40c","type":"subflow","name":"Silent TTS","info":"","category":"","in":[{"x":120,"y":220,"wires":[{"id":"715c62e4.4b128c"}]}],"out":[{"x":1460,"y":220,"wires":[{"id":"698e0c30.b663d4","port":0}]}],"env":[{"name":"message","type":"str","value":""},{"name":"media_player","type":"str","value":""}],"color":"#DDAA99"},{"id":"d55904da.6076e8","type":"api-call-service","z":"ab1c930c.be40c","name":"Mute","server":"6c2daf11.fae89","version":1,"debugenabled":false,"service_domain":"media_player","service":"volume_mute","entityId":"{{media_player}}","data":"{\"is_volume_muted\":true}","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":610,"y":220,"wires":[["dbdbd11f.a129d"]]},{"id":"52fb11f1.9b757","type":"delay","z":"ab1c930c.be40c","name":"","pauseType":"delay","timeout":"1","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":940,"y":220,"wires":[["afe92288.ae47b"]]},{"id":"afe92288.ae47b","type":"api-call-service","z":"ab1c930c.be40c","name":"Unmute","server":"6c2daf11.fae89","version":1,"debugenabled":false,"service_domain":"media_player","service":"volume_mute","entityId":"{{media_player}}","data":"{\"is_volume_muted\":false}","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":1080,"y":220,"wires":[["698e0c30.b663d4"]]},{"id":"698e0c30.b663d4","type":"api-call-service","z":"ab1c930c.be40c","name":"Google TTS","server":"6c2daf11.fae89","version":1,"debugenabled":false,"service_domain":"tts","service":"google_say","entityId":"{{media_player}}","data":"{\"message\":\"{{payload}}\"}","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":1270,"y":220,"wires":[[]]},{"id":"dbdbd11f.a129d","type":"api-call-service","z":"ab1c930c.be40c","name":"1 Sec Silence","server":"6c2daf11.fae89","version":1,"debugenabled":false,"service_domain":"media_player","service":"play_media","entityId":"{{media_player}}","data":"{\"media_content_id\":\"https://xx.duckdns.org/local/sounds/1sec.mp3\",\"media_content_type\":\"music\"}","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":780,"y":220,"wires":[["52fb11f1.9b757"]]},{"id":"6e8384c6.72078c","type":"change","z":"ab1c930c.be40c","name":"Set Message","rules":[{"t":"set","p":"payload","pt":"msg","to":"message","tot":"env"}],"action":"","property":"","from":"","to":"","reg":false,"x":430,"y":220,"wires":[["d55904da.6076e8"]]},{"id":"715c62e4.4b128c","type":"change","z":"ab1c930c.be40c","name":"Set Media Player","rules":[{"t":"set","p":"media_player","pt":"msg","to":"media_player","tot":"env"}],"action":"","property":"","from":"","to":"","reg":false,"x":250,"y":220,"wires":[["6e8384c6.72078c"]]},{"id":"6c2daf11.fae89","type":"server","z":"","name":"DAN HA","legacy":false,"addon":true,"rejectUnauthorizedCerts":true,"ha_boolean":"y|yes|true|on|home|open","connectionDelay":true,"cacheJson":true}]
Nice one! I copied this subflow and did some experimenting. It seemed that I could replace the “play 1 sec of silence” step with a media_player.turn_on command and have it still work the same, which seems like it may be a little less resource intensive than playing an mp3.
Hi,
Can you share your code on how you did this?
thanks!
Here’s an example of where I have it at right now, it’s also doing a notification sound and flashing a light:
There’s a quick video of an earlier implementation running.
It expects the following in msg.payload
{
"say":"Update from Deliveroo: Your rider is nearby",
"play":"<MEDIA HOST>/local/notifications/End_note.ogg",
"colour":{
"red":53,
"green":184,
"blue":178
}
}
and the flow code itself is:
[{"id":"e03051af.ea8be","type":"subflow","name":"Nest De-Blooped Notifications","info":"","category":"","in":[{"x":60,"y":40,"wires":[{"id":"6b534786.3b6fb8"}]}],"out":[{"x":840,"y":380,"wires":[{"id":"d046cc9b.ce33","port":0}]}],"env":[{"name":"media_player","type":"str","value":""},{"name":"light","type":"str","value":""}]},{"id":"67c347b5.30de78","type":"api-call-service","z":"e03051af.ea8be","name":"Mute","server":"e4f26bd6.7d3c08","version":1,"debugenabled":false,"service_domain":"media_player","service":"volume_mute","entityId":"{{media_player}}","data":"{\"is_volume_muted\":true}","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":190,"y":160,"wires":[["b8861876.6c5348"]]},{"id":"e90a26a9.1ac138","type":"delay","z":"e03051af.ea8be","name":"","pauseType":"delay","timeout":"1","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":200,"y":280,"wires":[["74e0714.06f499"]]},{"id":"74e0714.06f499","type":"api-call-service","z":"e03051af.ea8be","name":"Unmute","server":"e4f26bd6.7d3c08","version":1,"debugenabled":false,"service_domain":"media_player","service":"volume_mute","entityId":"{{media_player}}","data":"{\"is_volume_muted\":false}","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":480,"y":200,"wires":[["64986c94.1fa854","634f31f2.bfef2","dbb7a8d1.a06068"]]},{"id":"1b08e104.e3366f","type":"api-current-state","z":"e03051af.ea8be","name":"Check Device Is On","server":"e4f26bd6.7d3c08","version":1,"outputs":2,"halt_if":"off","halt_if_type":"str","halt_if_compare":"is_not","override_topic":false,"entity_id":"{{media_player}}","state_type":"str","state_location":"","override_payload":"none","entity_location":"","override_data":"none","blockInputOverrides":false,"x":240,"y":100,"wires":[["74e0714.06f499"],["67c347b5.30de78"]]},{"id":"6b534786.3b6fb8","type":"change","z":"e03051af.ea8be","name":"Set Media Player","rules":[{"t":"set","p":"media_player","pt":"msg","to":"media_player","tot":"env"}],"action":"","property":"","from":"","to":"","reg":false,"x":230,"y":40,"wires":[["92a0bd63.1b44e"]]},{"id":"92a0bd63.1b44e","type":"change","z":"e03051af.ea8be","name":"Set Light","rules":[{"t":"set","p":"light","pt":"msg","to":"light","tot":"env"}],"action":"","property":"","from":"","to":"","reg":false,"x":440,"y":40,"wires":[["1b08e104.e3366f"]]},{"id":"b8861876.6c5348","type":"api-call-service","z":"e03051af.ea8be","name":"Turn On","server":"e4f26bd6.7d3c08","version":1,"debugenabled":false,"service_domain":"media_player","service":"turn_on","entityId":"{{media_player}}","data":"","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":200,"y":220,"wires":[["e90a26a9.1ac138"]]},{"id":"64986c94.1fa854","type":"api-call-service","z":"e03051af.ea8be","name":"Pulse Light","server":"e4f26bd6.7d3c08","version":1,"debugenabled":false,"service_domain":"lifx","service":"effect_pulse","entityId":"{{light}}","data":"{\"mode\":\"breathe\",\"brightness\":120,\"rgb_color\":[\"{{{payload.colour.red}}}\",\"{{{payload.colour.green}}}\",\"{{{payload.colour.blue}}}\"],\"period\":0.5,\"cycles\":2}","dataType":"json","mergecontext":"","output_location":"payload","output_location_type":"msg","mustacheAltTags":false,"x":490,"y":260,"wires":[[]]},{"id":"634f31f2.bfef2","type":"api-call-service","z":"e03051af.ea8be","name":"Sound","server":"e4f26bd6.7d3c08","version":1,"debugenabled":false,"service_domain":"media_player","service":"play_media","entityId":"{{media_player}}","data":"{\"media_content_id\":\"{{{payload.play}}}\",\"media_content_type\":\"music\"}","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":470,"y":320,"wires":[[]]},{"id":"d046cc9b.ce33","type":"api-call-service","z":"e03051af.ea8be","name":"Text to Speech","server":"e4f26bd6.7d3c08","version":1,"debugenabled":false,"service_domain":"tts","service":"google_say","entityId":"{{media_player}}","data":"{\"message\":\"{{{payload.say}}}\"}","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":680,"y":380,"wires":[[]]},{"id":"dbb7a8d1.a06068","type":"delay","z":"e03051af.ea8be","name":"","pauseType":"delay","timeout":"1","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":480,"y":380,"wires":[["d046cc9b.ce33"]]},{"id":"e4f26bd6.7d3c08","type":"server","z":"","name":"Home Assistant","legacy":false,"addon":false,"rejectUnauthorizedCerts":true,"ha_boolean":"y|yes|true|on|home|open","connectionDelay":true,"cacheJson":true},{"id":"a63b019e.9aed1","type":"inject","z":"9d8f1f73.b767a8","name":"Test Deliveroo Update","topic":"","payload":"{\"say\":\"Update from Deliveroo: Your rider is nearby\",\"play\":\"<MEDIA HOST>/local/notifications/End_note.ogg\",\"colour\":{\"red\":53,\"green\":184,\"blue\":178}}","payloadType":"json","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":140,"y":40,"wires":[["bd3013aa.6cae78"]]},{"id":"bd3013aa.6cae78","type":"subflow:e03051af.ea8be","z":"9d8f1f73.b767a8","name":"","env":[{"name":"media_player","type":"str","value":"media_player.googlehome4245"},{"name":"light","type":"str","value":"light.lifx_bulb_001"}],"x":170,"y":120,"wires":[["c6f7de4a.8877e"]]},{"id":"c6f7de4a.8877e","type":"debug","z":"9d8f1f73.b767a8","name":"Debloop Debug","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","x":160,"y":200,"wires":[]}]
Haha! … now I started to notice that annoying sound!
I was happy until you make it an issue in my head!
But thanks for sharing, at least now know how to disable it if it gets on my nerves
Here’s my .yaml
implementation that doesn’t require an always active script. Granted, you will hear the volume adjustment sound on the Google Home
- id: doorbell_chime
alias: Doorbell chime
trigger:
entity_id: binary_sensor.doorbell_[DOORBELL_ID]
platform: state
to: 'on'
condition: []
action:
- service: media_player.volume_set
entity_id: group.doorbell
data:
volume_level: 0.0
- service: media_player.turn_on
entity_id: group.doorbell
- service: media_player.volume_set
entity_id: group.doorbell
data:
volume_level: 0.6
- service: media_player.play_media
entity_id: group.doorbell
data:
media_content_id: https://[YOUR_URL].com/doorbell.mp3
media_content_type: music
- delay:
seconds: 5
- service: media_player.volume_set
entity_id: group.doorbell
data:
volume_level: 0.3
- service: media_player.turn_off
entity_id: group.doorbell
Hi all,
Sorry if I’m misunderstanding something but… The main concern about all of this is listening the cast-start audio and the startup sound, isn’t it ?
Well, my approach consists in playing 1sec silence mp3 every 4 minutes if the media_player
is idle or off. This way I’m able to mantain all my Google Nest devices alive, and all my TTS and sounds will play without any cast-start sound before them.
- alias: keepLavaboNestAlive
trigger:
platform: time_pattern
minutes: "/4"
condition:
condition: or
conditions:
- condition: state
entity_id: media_player.lavabo
state: "off"
- condition: state
entity_id: media_player.lavabo
state: "idle"
action:
- service: media_player.play_media
entity_id: media_player.lavabo
data:
media_content_id: https://hass.pirineus:8123/local/1sec.mp3
media_content_type: music
Any of you thinks that this can be problematic some way? Running it for 2 days and it works flawlessly for the moment.
Thanks
That’s what I’ve been doing for a very long time. No issues