Echo Devices (Alexa) as Media Player - Testers Needed

Please check the app to see if the behavior matches. If they changed the API, the wiki has info on how to pull the API data so we can match it. Please report it on GitHub and we’ll see if we can resolve.

This applies to the TTS issue and requests for features.

just found this component! Thanks so much.

I had the same problem last night. But now everything’s ok without having changed something.
TTS works as usual.

Some people reached out to Amazon and it turned out to be an Amazon bug.

1 Like

Last Alexa not working for me when upgraded to 2.5.3 or 2.5.4 Reverted back to 2.5.2 and 2.5.0 and still not working. Also no live updates of whats playing. If song is playing i restart HA and then the song shows. When it plays next song, media player not changing to next song. v2.5.4

Delete or rename your pickle file.

1 Like

That fixed it, cheers!

Hi all,

I am able to call TTS on Alexa and the first part of the automation below works fine and works when i use TTS but i’m not sure if i’m missing something with the play_media service. Can anyone see anything wrong? Thank you!

- alias: Jojo play
  trigger:
    platform: state
    entity_id: switch.shelly_shsw_1_22f328
    to: 'on'
  action:
  - service: media_player.volume_set
    data:
      entity_id: media_player.adam_s_echo_dot
      volume_level: '1.0'
  - delay: '00:00:02'
  - service: media_player.play_media
    data:
      entity_id: media_player.adam_s_echo_dot
      media_content_type: AMAZON MUSIC
      media_content_id: "Jojo Siwa" 
1 Like

media_content_type: AMAZON_MUSIC

Works for me. Add the underscore.

All fixed

Thank you

where is the media_content_id coming from?

Reading the docs media content Id is what you’d ask Alexa to play

Hi folks. In our household, we have three different echo devices being used as bedside clocks. I want to run custom automations for each when the alarm goes off in the morning. The Alexa app makes it easy to trigger a routine whenever an an alarm goes off, but I have no way of knowing which alarm it was so I can trigger my custom automations.

I tried using the “Last Alexa” sensor, but results were inconsistent (as that is based of the last device that was spoken to). Currently, I’ve starting down the path of parsing the “Next Alarm” sensors for each device and trying to use that.

Before I go any further, has anyone else done anything like this? If not, does anyone have any suggestions before I continue down this path?

Im using the alexa to announce that the alarm has been set. Its a long notification with pauses in it creating a countdown. If the doors all close I would like to stop the message. I assume the giant notification has been sent to all the alexas and the script moved on. Can I call something from another script to stop all audio on all the alexas and kill that notification?

action:
    - service: notify.all_alexas
      data:
        message: >
          You have 60 seconds to leave the house.
          <break time='8s'/>50 seconds
          <break time='8s'/>40 seconds
          <break time='8s'/>30 seconds
          <break time='8s'/>20 seconds
1 Like

You could run the long notification from a script, perhaps even have the delay time in the script rather than in the message

 - delay:
     seconds: 8

then keep sending the notifications separately with delays between rather than one long message, and use another script to ‘stop’ the long running script.

I do something similar with the following

- service: script.turn_off
      data:
        entity_id: script.alarm_activated

I started off that way but it seems like there is a delay before the notification is played on the alexas and it’s somewhat large and somewhat random. Meaning I can’t really have anywhere near an accurate countdown (sometimes the alarm arms before the countdown is done other times it doesn’t.) Also with announce you get the tone before each message. I have to use announce so it is played on all alexas together. With TTS no tone but it plays the message on each alexa one after another and the delay seems larger.

We don’t support this yet as we don’t know if it’s possible. You can try using the Alexa app to create a routine that uses the action Device SettingsStop Audio. You can then call that in HA. Assuming it works in a routine, we may be able to expose it in HA directly.

I’ll see what I can do and if I find a solution I’ll patch your python and submit a PR. How I’m using it right now I’m not too worried about it. If we are setting an alarm we will all be leaving the house anyway so who cares if it keeps talking. I was thinking about using it for when the alarm goes off and then shut it off if the alarm is cleared, but you know if you use alexa to sound your alarm, the thief just has to yell, alexa stop and the alarm stops, so maybe not a good idea. :laughing:

this component recognizes my echo dot second gen, But none of the enttiy works. Like if i add my device as a media player, changing the volume deos not change anything in the echo dot. None of the services work. Any of the echo dot second gen users please check and reply

Make sure you selected your proper Amazon region. The default is the US and if your devices are not registered in the US, you will end up with the behavior you described.