Can't get doorbell sound to play in Nest Doorbell automation

I’m not able to get the sound to play with my automation, but if I go to the Media Browser and play the sounds from “all.speakers”, it works perfectly. When I try to replicate the behaviour in an automation, I just get the “boink” on sound from the Google speakers, but the audio doesn’t play. My log shows that the speakers have been changed to “idle”.

When I play the audio directly from the Media Browser, it shows “playing”, then changed to “idle” in the logs.

If I enter the URL for the target sound, it gives me an ERR_SSL_PROTOCOL_ERROR. Maybe I’m not entering it properly? I’ve tried with http and https.

Here is my automation:

service: media_player.play_media
target:
  entity_id:
    - media_player.all_speakers
data:
  media_content_id: https://xxx.xxx.x.xxx:8123/local/Doorbell.mp3
  media_content_type: audio/mp3
https://xxx.xxx.x.xxx:8123/local/Doorbell.mp3

This location does not point towards the local folder in the media player, it points to samba location \\xxx.xxx.x.xxx\config\www

I guess that’s the issue and to be honest. I don’t know what the path to the media folder is. My suggestion, at least as test, would be to drop the mp3 in the config/www

Thanks. Is there a way to see the path that the mp3 plays from when I play it from the Media Browser? That way I could just drop that in the automation.

How do I drop the mp3 in the config/www path?

I assume you use Windows.
If you have Samba installed/configured, you can use Windows Explorer to go there by entering \\<ipaddress> in the location bar

Edit: Common tasks - Supervised - Home Assistant

Solved: After digging around, I found that I have to change the content id to: ‘media-source://media_source/local/filename.mp3’. I also changed content type to music.

    service: media_player.play_media
    target:
      entity_id:
        - media_player.all_speakers
    data:
      media_content_id: media-source://media_source/local/Doorbell.mp3
      media_content_type: music

Nice, and don’t forget to mark it as solution so others don’t have to scroll :grinning:

1 Like

Done. Thanks for your help - your reply sent me on a different search string, which led to the answer.