How do I make Google home play a song /Playlist automatically using service: media_player. Select the source. In-Home Assistant Example:When My door is opened, the door sensor change state should trigger an mp3 file which says, “Your door is open, please close.”
Additional info:
I Am using HA running on Rasberry pi2
Thanks, @lolouk44
Text to speech works but its Robotic like and no expression. Hence I personally don’t like that method
For the method 1 you have mentioned( create sound files and save them in your www folder (create one if it does not exist) then play them with url /local/xxx.mp3)
Can you elobrate exactly how to achive. Am not a great expert hence need a little detailsd explanation
@lolouk44 Thanks
I will give it a try with an MP3 file stored in www/audio/test.mp3 & let you know if there is a qurey.
If your HA exposed to the internet? Not sure what excatly you are asking, but I am using it locally on my LAN, I have not configured to anything like Duck DNS. I have integrated with google home using discovery feature.
Will my above setting work or should I change something?
if you’ve not forwarded any port on your router it’s not exposed (basically you can’t access it from outside your home)
I believe it should work as it is, if not let me know
ok I tried and played about and I think it might not work in the end, at least not for all media_players.
I have ChromeCasts at home and it looks like they’ll only accept online content.
What media_players are you using?
I wonder whether MPD could be an option…
Thanks, they yeah you’ll need a full online URL. this will mean either you expose your HA install on the internet or you store the sound files somewhere so they can be free accessed online.
If you’re not ready to expose your HA instance to the internet, you could save your files in a dropbox folder, then click on share > create link.
Use that link in HA and it should work
Oh got it, Dropbox changed the way you can share files, you need to be signed in
You may need to seek an alternative platform to host your files
In the mean time try with this URL to test: http://icy-e-bab-04-cr.sharp-stream.com/absoluteclassicrock.mp3
To host your own mp3 you need to find some cloud service that will allow you to host and access via direct links. I’ve not tried them but there are a few (Google drive, Microsoft onedrive, etc).
To make your mp3, well it’s up to you. You can record your own voice, find free online samples that you can download,…
I have stored say 10 mp3 files in my local file
I want them to play each one at random every morning. thru an automation/script.
Randomly played Day1 mp3 should not repeat for next 9 days, After 10th day the process repeats