Jcarlier
(Carlier Jacques)
September 23, 2021, 4:27pm
1
First , i am on Amazon.fr
i can’t send a local mp3 on my alexa echo
service: media_player.play_media
data:
media_content_id: http://192.168.y.xxx:8123/local/Alarm-System_alarm1.mp3
media_content_type: music
target:
entity_id: media_player.echo_dot_carlier
have you a solution ? THANKS
finity
September 24, 2021, 1:28am
2
as far as I know (unless something has recently changed) there has never been a way for any Echo to play a local MP3.
Jcarlier
(Carlier Jacques)
September 24, 2021, 8:17am
3
How can i, in an automation, use alexa to send a alarm voice ?
thanks
finity
September 24, 2021, 9:02am
4
you can play a local file only iuf it’s accessible via the internet.
If you have a Nabu Casa subscription and you have the Alexa Media Player custom component installed then you can play the media that way using the following example:
service: notify.alexa_media
data:
message: "<audio src='https://<my_nabu_csa_url>.ui.nabu.casa/local/mp3/nws_alert_tone.mp3' />"
target:
- media_player.computer_room_dot
- media_player.kitchen_dot
- media_player.livingroom_dot
- media_player.lg_webos_tv_echo
data:
type: tts
or you could use an offsite file storage such as dropbox to host the file.
Jcarlier
(Carlier Jacques)
September 24, 2021, 9:05am
5
thanks
can you explain the second solution (‘dropbox’) and an exemple of code please
finity
September 24, 2021, 9:15am
6
I’ve never used it for playing an mp3 thru an echo but here is what I used to use for playing an mp3 via my chromecast audio:
- service: media_player.play_media
data:
entity_id: media_player.chromecastaudio1984
media_content_id: "https://www.dropbox.com/s/<my_dropbox>/trespass_warning.mp3?dl=0&raw=1"
media_content_type: audio/mp4
you should be able to just change the previous post above URL to the dropbox URL (keeping the same format) and I think it should work.
so something like:
service: notify.alexa_media
data:
message: "<audio src='https://www.dropbox.com/s/<my_dropbox>/trespass_warning.mp3' />"
target:
- media_player.computer_room_dot
- media_player.kitchen_dot
- media_player.livingroom_dot
- media_player.lg_webos_tv_echo
data:
type: tts
Jcarlier
(Carlier Jacques)
September 24, 2021, 11:01am
7
thanks but where i can found <my_dropbox> ?
Jcarlier
(Carlier Jacques)
September 24, 2021, 11:34am
9
but doen’t work…
alexa says ‘no possible to access for the moment…’ in french
but i can access it with the url on chrome
service: notify.alexa_media_echo_dot_carlier
data:
message: >-
data:
type: tts
Jcarlier
(Carlier Jacques)
September 24, 2021, 11:37am
12
service: notify.alexa_media_echo_dot_carlier
data:
message: >-
<audio
src=https://www.dropbox.com/s/…/Alarm-System_alarm1.mp3?dl=0&raw=1
/>
data:
type: tts
Hi, I was able to make it work this way but it only works once, then if I stop the playback (for example I say “Alexa, stop”) then I’m not able to make it work again. I have to power off and on the Echo Dot. Even switching to a fixed message won’t work.
Anyone has any idea why?
EDIT: When the mp3 starts to play, if I stop it then I have to say “Alexa, delete notifications”… if not, recalling the script again will freeze tts completely and I have to reboot the Echo Dot. Very odd.