Echo Devices (Alexa) as Media Player - Testers Needed

I´m trying to get the Alexa component working, so far i´ve managed to see the alexa_media.update_last_called service. But the notify.alexa_media service doesn´t show.


But there are no other Alexa entities available. When I started to set up the alexa component i was on Hassio 0.88 and now on 0.94.1 and it has never worked. I´m a little lost on what to do next?

I also have a .pickle file with my account for Alexa
and the config:
alexa_media:
accounts:
- email: !secret alexa_email
password: !secret alexa_password
url: amazon.com

If you are just using the notify.alexa_media service, you need the target argument. This should be an array of the target devices. You can use the friendly name, entity id or a Home Assistant group).
If you want to easily send the notification to all devices, there are a couple of ways.

Using a Home Assistant Group
Create a group in Home Assistant, containing all your Alexa devices.
Call the notify.alexa_media service as follows (assuming your group is named group.alexa:

{
  "data": {
    "method": "speak",
    "type": "announce",
    "target":["group.alexa"]
  },
  "message": "There is motion at the Entry Gate"
}

Using an Alexa Multi Speaker Group

Create a multi speaker group in Alexa, containing all the devices. You may need to restart Home Assistant to pick up the new group.
You should now find a new service, named like notify.alexa_media_groupname (e.g. notify.alexa_media_everywhere).

Since this service automatically targets a particular group, you don’t need the target argument, and can just call it with your original JSON:

{
  "data": {
    "method": "speak",
    "type": "announce"
  },
  "message": "There is motion at the Entry Gate"
}

This is the method I prefer as, once the new groups have been picked up by the component, everything can be managed in the Alexa app and you shouldn’t need to restart Home Assistant.

This also allows you to limit notifications to different parts of the house. For example, you could have Everywhere, Upstairs, and Downstairs groups and use the notify.alexa_media_everywhere, notify.alexa_media_upstairs, or notify.alexa_media_downstairs services depending on which devices you want the announcement to come from.

1 Like

That’s not an entity. That’s a service.

you need to include an entity.

Notifications pushed to alexa work well most of the time, but every day or two, instead of playing the message, she will say “if you want me to repeat something then use the Simon says skill” or something like that.
Any idea why this happens intermittently, and how I can fix it?

1 Like

True. Sorry my mistake in description

If I call notify.alexa_media_echo1
Message sent to echo1.

My expectations was notify.echo_media would message all available echo by default. This is action of other components like html5 push. If no entity provided, send to all. I was asking if there should be default but in very poor way.

EDIT
Also just noticed Target is required so maybe ignore me :slight_smile:

So is there any way to get Alexa devices to play a local media file or youtube stream?

Alexa will only play Amazon approved sources. TTS (your text) is approved. Local mp3 is not. Youtube is owned by Google so don’t hold your breath.

Damn ok, I wonder if there is any way to do it through Plex or a custom Alexa plugin which could play an audio source provided by home assistant…

I am working on a way to use my Plex server (an Amazon approved source) to use it to call an mp3 stored there. I’m having issues with the media_player with Plex working consistently though.

Let me know if you ever get it working properly, can you use Plex to handle YouTube stream as I’m trying to do all house audio with Alexa and Google.

I changed the password to the amazon account and now in the home assistant I have the following error … the following components could not be setup.

  • alexa media
    please check your config
    I have already changed the pssword in configuration.yaml …

Delete your file .pickle restart hass and re-link account.

where is this file?

under /config/[email protected]

grazie tante

By any chance is there a repository for this if I’m using Home Assisstant Community Store instead of custom_updater?

2 Likes

Thanks. Mine stopped working randomly. This fixed it.

:0) yes, this is because cookies expire after a while.

hello.
i have a problem.
if i follow every stepp in the guid ant then check the config its only loading and dont say aniting,
and if i try tu restart in the web interface it dose not work.+
if i pull the plug from the pi 3b+ its starting i have acess to the files but the web interface dont load,
what can i do to fix it?

@keatontaylor I am trying to expose the media_image_url but it doesn’t seem to be one of the available attributes so I’m guessing it is one of the support features? Can you help me understand how to retrieve this information.

self._media_image_url = (self._session['mainArt']['url']
                                         if (self._session['mainArt'] is not
                                             None and 'url' in
                                             self._session['mainArt'])
                                         else None)
1 Like