I’ve setup HASS on my ubuntu server. Most things seem to be working correctly, but have not been able to setup a wireless doorbell, using a Xiaomi button to play a local mp3 to several Google Homes.
I’m double-nat - not by choice, my service provider is using internal IP addresses, and the fibre modem has no interface that I can access, so I haven’t been able to specify my router as DMZ. So even DDNS doesn’t work, and my ubuntu server can’t be accessed from the internet/not publicly accessible.
Hopefully someone has a work-around, otherwise it looks like I’m screwed if that is the only way to play an mp3
P.S. I just realized that maybe you could also try to just place the file directly in your www directory instead of in a subfolder. Could be a permission issue on the subfolder.
Than use:
Oddly still doesn’t work, whether it’s on directly in the www directory or a subfolder.
I’ll also try out the dropbox method as well. Although dropbox is better than a random file on the internet, it’s still not ideal as it’s not locally hosted. I’d still prefer to locally host the file in case the internet craps out, so if anyone has any ideas, I’ll be happy to try them out!
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.