Echo Devices (Alexa) as Media Player - Testers Needed

OK this works already several times, hurray

service: media_player.play_media
data:
  media_content_id: shuffle playlist my special songs weekend
  media_content_type: custom
target:
  entity_id: media_player.first_floor
1 Like

how do I add a command for alexa to stop after one minute

How di you start to play it, by automation?

I’m trying to make a stop in the automation
playing a playlist and stops after one minute
It is some sort of a nice notification for all the house member that an event is up coming

Than add another action with a delay (wait for time to pass) and after that another action with media_player.media_stop or media.player.media_play_pause

1 Like

Found the solution for my problem:

service: media_player.play_media
data:
  media_content_type: "routine"
  media_content_id: "test routine"
  entity_id: media_player.kitchen_speaker

I have another question… I’m trying to create an automation that plays bird sounds gradually 20 minutes before I wake up. The problem is that as soon as I ask Alexa to play the bird sounds, she answers “Okay I will play bird sounds by sleep jar” which ruins everything. So as a workaround, I tried to mute the speaker for the first 30 seconds, but it’s not working and I can still hear her response to the command.

alias: Wake Up Routine (20M BEFORE ALARM)
description: 20mins before alarm
trigger:
  - platform: numeric_state
    entity_id: sensor.minutes_next_alarm
    above: '1'
    below: '20'
condition: []
action:
  - service: media_player.volume_set
    data:
      volume_level: 0
    target:
      device_id: media_player.sound_bar
  - service: media_player.volume_mute
    data:
      is_volume_muted: 'yes'
    target:
      device_id: media_player.sound_bar
  - delay:
      hours: 0
      minutes: 0
      seconds: 3
      milliseconds: 0
  - service: media_player.play_media
    data:
      media_content_type: custom
      media_content_id: Open Bird Sounds by Sleep Jar
      entity_id: media_player.sound_bar
  - delay:
      hours: 0
      minutes: 0
      seconds: 30
      milliseconds: 0
  - service: media_player.volume_mute
    data:
      is_volume_muted: 'no'
    target:
      device_id: media_player.sound_bar
  - service: media_player.volume_set
    data:
      volume_level: 0.05
    target:
      device_id: media_player.sound_bar

I am aware there is a feature called “Brief Mode” but I don’t want to enable it on all devices, and Alexa still says something to reply to voice commands.

Do you have a device somewhere no one will hear it? Issue the command there to play it where you want it. Perhaps take an old echo and put it in a cupboard and use that.

Theres a timer function, will this work ?

1 Like

it’s unbelievable stopped working get respond "cant find xxx playlist on spotify
didn’t do any changes. its the exact playlist name
so frustrating :weary:

Are you trying to play normal or shuffle?
This works for me:

service: media_player.play_media
data:
  entity_id: media_player.echo_office2
  media_content_id: play playlist_name
  media_content_type: SPOTIFY

both don’t work for me

Have this here as well sometimes, especially with speaker groups. Not sure on which side it is, but often it works when restarting the echo(s).

Is it possible to set the language when sending TTS to Alexa?

  message: 'Que la force soit avec toi.'
  language: 'fr'

Seems to work with Google but not Alexa?

Sorry, but I am stumped here…

I run this:

service: media_player.play_media
target:
  entity_id: media_player.my_echo_show
data:
  media_content_id:  screen off
  media_content_type: custom

And the screen turns off (as expected). But when I run this:

service: media_player.play_media
target:
  entity_id: media_player.my_echo_show
data:
  media_content_id:  screen on
  media_content_type: custom

I.e., “screen on” to try to turn it back on, and nothing happens, the echo show screen remains off. I am trying to turn it off at night and on in the morning (via automation).

Is there another way to do this?

Thanks!

You can use Alexa SSML tags to approximate French pronunciation, but it will be limited to using the English phoneme database so it’s not great:

service: notify.alexa_media_XXXX
data:
  message: <lang xml:lang="fr-FR">Que la force soit avec toi.</lang>
  data:
    type: tts

To get a more accurate pronunciation you have to switch to a French voice as well:

service: notify.alexa_media_amanda_s_living_room_dot
data:
  message: |
    <voice name="Celine"><lang xml:lang="fr-FR">
    Que la force soit avec toi.
    </lang></voice>
  data:
    type: tts

Available French voices are as follows:
French, Canadian (fr-CA): Chantal
French, France (fr-FR): Celine, Lea, Mathieu

short question:
I play my spotify playlists via alexa_media_player with media_content_type: custom

- service: media_player.play_media
  data:
      media_content_id:  shuffle my playlist xyz
      media_content_type: custom         

Some guys here use SPOTIFY as content type.
I’m wondering now where the differene is. Does it have any functional effect?

custom uses the custom command. Spotify uses the standard play command but specifies spotify as the media service. Check out the routines in the Alexa app to see what we’re using.

1 Like

Ah, ok. Got it. Thanks

Sometimes some has to be more specific, for example when having the same name for playlists in AMAZON and SPOTIFY or when - like me - being a bit lazy and use play playlist_name instead of play my playlist playlist_name

Shuffle on the other hand only works when additional using my playlist regardless if SPOTIFY or custom is used (as long there is only on playlist with this name)