To play a local MP3 file on my local Google Home Assistant Mini, the procedure that finally worked for me was:
Install HassIO onto Raspberry Pi. Install Add-On, Samba Share.
From laptop or PC, map to Samba share, config.
From laptop or PC, create subdirectory under config named: www
Then create subdirectory under config/www named: audio
Copy the mp3 file to /config/www/audio
Restart HassIO. This is required to make HassIO start sharing the new folders locally via http.
After HassIO has restarted, from laptop or PC, browse to http://Local_IP_Address_of_HA:8123/local/audio/YourSong.mp3
The browser should launch the audio file using whatever your browser has configured to play MP3s. That proves the changes above were effective.
Now configure HassIO to play the file.
I’m using an automation to play mine at 7PM every day, like this (in automations.yaml):
Thanks for your suggestion. I will try those solutions. In the meantime, I use Audacity software to repeat the siren sound from 30 sec to 5 min and save as a long version siren mp3 file. That would be enough to scare the thief
That produces the error extra keys not allowed @ data['media_content_id'] even though popping that URL into my browser plays the file. Anyone see what I’m doing wrong?
This is one of the action when motion was detected. It will turn light on as strobe light, google home on, increase volume, play my recorded siren sound (last 5 minutes), then decrease volume.
Unless Google has changed something in the last couple of days, my Google Home Mini plays local MP3 files right off my HassIO HA, using http and a local IP address.
I haven’t messed with it in a while, because I got gig fiber internet, so even using my reverse proxy outside my network, the latency isn’t even a concern any more.