Echo Devices (Alexa) as Media Player - Testers Needed

volume should work and pause should work, but it can be that radio is preventing that.
i only play from amazon music and that works.

I have same situation, shows details ok but no controls working and TTS does nothing.
Tried Radio and also Amazon music and no luck, I am on amazon.co.uk if that makes any difference?
(config correctly picked up all my amazon devices)

tts also through services not working?

as per @prodarek image i copied that changing my entities to match my own.

{"entity_id": "media_player.living_room", "message": "test"}
{"entity_id": "media_player.bedroom_2", "message": "test"}

Neither worked. Volumes/Pause/Play or onscreen TTS from media controls not working either i see the home assistant box to say service called but nothing happens with the echo.

Yes tts also nothing.

seems to me like an authentication problem.

at least i saw that @prodarek tried .com and .co.uk

there are a few things to realise:

your echo is connected to 1 server from amazon only.
you should have 1 account on only 1 server.
with that account your echo needs to be configurated
on the echo you should not be switched to another account (some people also have an account from their partner)
the password and email should be the same as the account you use to do stuff in the alexa app or on the pc on alexa.amazon.your_server

yes I am happy will be one or other. As others report with set to amazon.com I get “unavailable” when i correctly set to amazon.co.uk I can monitor the players correctly.

in the alexa.py i did find within
def play_music(self, provider_id, search_phrase) and def send_tts(self, message)
That the locale is hardcoded to en-US, I just tried changing this to en-GB in both instances but no change. (after restart)

This was because when I manually did the def get_devices(url, session) from browser i saw the locales for me were set to en-GB within the Headers.

Found a fix for it.
I have set my locales previously mentioned back to en-US and working fine.

Issue appears to be with the cookie, for me i deleted the .alexa_media.pickle file from my HA config. (dot at front makes it hidden on Linux if you cannot see it try ls -la on that directory)

Then rebooted HA and now all working including TTS and play/pause/volumes.

Potentially this cookie needs removing after any change to Domain (url in media player config) for it to take affect?

1 Like

could very wel be.
i think that the component cant notice that people change the url.
so the cookie is noticed and is there, so the authentication is picked up from the cookie.
but off course then the authentication is wrong.

so to avoid that the component needs to save the last used url as wel as the cookie, and if the url is changed the cookie needs to be deleted and new authentication should be started.

the best way to avoid that is to use only 1 alexa server (the one that amazon recomments for that country) and never try another :wink:

1 Like

Booom deleted alexa_media.pickle and works.
Thank you.

My tts is working great and very happy with that, I also want to be able to play a local sound file. (door bell sound in this case). Any ideas what i need to change as when i currently run the below all i get is: (url works fine in browser)

sorry text to speech can only be called with the alexa_tts service

  doorbell:
    alias: Door
    sequence:
      service: media_player.play_media
      data:
        entity_id:
          - media_player.living_room
        media_content_id: https://ADDRESS.duckdns.org/local/sounds/Apartment-ding-dong-sound.mp3
        media_content_type: music

thats not possible.
you can ONLY do everything you also can do with the alexa app.

1 Like

I just jumping into the very long thread. But I did the install as noted above by keaton. But it is still not working for me. Can someone who has it working with a similar setup explain to me how they got theirs working? Looks to me like I have everything that should be there what am I missing? If you need additional information on my environment let me know. My main goal is to use alexa for tts. Thanks in advance.

My environment:
I live in the USA so i point to amazon.com
Ubuntu 18.04 VM
Home Assistant 80.3 running in docker.
path where alexa.py is: custom_components/media_player/alexa.py
configuration.yaml entry:

media_player:
  - platform: alexa
    email: “[email protected]”
    password: “passwrd1233”
    url: “amazon.com”

Retype the quotes in your editor. They should not be smart quotes

@Justin_144 k ill try that and report back, thanks.

today I tested this plugin again on Amazon.it and I saw that work only on echo dot while on echo plus say " I don’t understand" maybe different firmware have different working ?! next version can fix this? We are near to new Echo firmware on december so if can’t fix it , I repeat the test in the next 2 months after the update.

you should probably more afraid for firmware updates then to hope for them.
most of the time it just breaks stuff.

1 Like

@Justin_144 that was it, thanks a bunch.

probably you have right but I have no choice , Firmware on my amazon plus is an italian beta version, I need to upgrade to next version in all case, I don’t think they spend time and money to stop this project , all in all now alexa tts not working on plus , can be the same after upgrade .

i know we have no choice :wink:
and we are all hackers, so the chance that it breaks at some point is there.

but then we find another way :wink: