Echo Devices (Alexa) as Media Player - Testers Needed

Updated mine, still working as good as ever :+1:

I do not manage to get it to work anymore.

I used to have one account with 2 echo dot running. Worked fine until today (before I updated to 3.4.5).
I was happy when I saw today’s update, because I thought that I could add the second account (which didn’t work for me so far).
Tough luck, though. Now no account is working.

I removed everything, reinstalled everything - and it keeps telling me to reauthenticate over and over again. And when I do, I get an “Abort” message, which then in the body claims to be successful (which it isn’t).
I tried multiple times, with amazon.com (which does not work properly because the devices are unavailable) and with amazon.de (which does not work either, because of the authentication issue).

When I reauthenticate the notification that something is work is re-appearing after a brief moment. Really puzzled what I could do to make it work.

Update: Downgraded to 3.4.1 - and now both accounts work. Thanks @poudenes for the idea!

1 Like

3.4.5 working for me :slight_smile:
Thanks alandtse for your continued work on this!!

3.4.5 is working here as well amazon.co.uk

How do you go about downgrading?

This warning will go away once you’ve completed a new log in using the latest version. If it doesn’t on a complete relogin then there’s something wrong with the oauth I need to fix. If we can’t establish oauth, then we are using the old cookie mechanism with the reauthentication issues people were complaining about. In theory using oauth should avoid that but that’s just a guess.

1 Like

sadly downgrading did not change ability to final authorization. I allow request through amazon but the integration does not finish. I tried upgrading again to latest with no change. It appears that HA spammed my amazon enough times to force a password reset with amazon.

I can’t get media_player.everywhere to work on node red call-service. Individual echo dot works using media_player.kitchen_dot.

JSONata that works:

{
   "data":{"type":"tts","method":"all"},
   "message": "hello",
   "target":["media_player.kitchen_dot"]
}

Below doesn’t work, no error found but no sound either:

{
   "data":{"type":"tts","method":"all"},
   "message": "hello",
   "target":["media_player.everywhere"]
}

node flow:

[{"id":"cd5f6f7f.046da","type":"api-call-service","z":"845016a6.b38828","name":"tts msg","server":"e8b4e59e.644ec8","version":1,"debugenabled":false,"service_domain":"notify","service":"alexa_media","entityId":"","data":"{\t   \"data\":{\"type\":\"tts\",\"method\":\"all\"},\t   \"message\": \"hello\",\t   \"target\":[\"media_player.kitchen_dot\"]\t}","dataType":"jsonata","mergecontext":"","output_location":"payload","output_location_type":"msg","mustacheAltTags":false,"x":840,"y":120,"wires":[[]]},{"id":"b88e6288.946a","type":"inject","z":"845016a6.b38828","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":680,"y":120,"wires":[["cd5f6f7f.046da"]]},{"id":"baa7af1.030345","type":"api-call-service","z":"845016a6.b38828","name":"tts msg","server":"e8b4e59e.644ec8","version":1,"debugenabled":false,"service_domain":"notify","service":"alexa_media","entityId":"","data":"{\t   \"data\":{\"type\":\"tts\",\"method\":\"all\"},\t   \"message\": \"hello\",\t   \"target\":[\"media_player.everywhere\"]\t}","dataType":"jsonata","mergecontext":"","output_location":"payload","output_location_type":"msg","mustacheAltTags":false,"x":840,"y":180,"wires":[[]]},{"id":"e4b20158.6e525","type":"inject","z":"845016a6.b38828","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":680,"y":180,"wires":[["baa7af1.030345"]]},{"id":"e8b4e59e.644ec8","type":"server","name":"Home Assistant","legacy":false,"addon":false,"rejectUnauthorizedCerts":true,"ha_boolean":"y|yes|true|on|home|open","connectionDelay":true,"cacheJson":true}]

i believe that amazon doesnt allow tts on groups. (thats because tts is based on a skill)
but announce should work.

2 Likes

announcement works, thank you.

1 Like

since 12:45 I receive these errors.
I’m still on 3.4.1
changed nothing
where does that come from?

Logger: homeassistant.config_entries
Source: helpers/entity_component.py:155
First occurred: 12:04:47 (19 occurrences)
Last logged: 15:05:31

Error setting up entry [email protected] - amazon.de for media_player
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 236, in async_setup
    result = await component.async_setup_entry(hass, self)  # type: ignore
  File "/usr/src/homeassistant/homeassistant/components/media_player/__init__.py", line 345, in async_setup_entry
    return await hass.data[DOMAIN].async_setup_entry(entry)
  File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 155, in async_setup_entry
    raise ValueError("Config entry has already been setup!")
ValueError: Config entry has already been setup!
````

solved! Already updated successful to 3.4.5
Working so far.

Do we need to relogin upgrading from 3.4.4 to the latest 3.4.5 or is it automatic?

3.4.1 still working just fine for me.
I will stay on that version for now and hope that the issue is fixed in one of the next releases.

I had to relogin which worked fluently.
No issues
I came from 3.4.1

IMO there is no issue left in 3.4.5.
The media player works as stable as 3.4.1
We have to see, if the changes helps to avoid manual relogins in future.
Looking forward…

Well, I have a very different view on that topic.

I had those relog issues on 3.4.5. Repeatedly, constantly.
I downgraded to 3.4.1 without changing anything to my configuration - and it works without a single request to re-authenticate.

To me that looks like a very obvious issue in 3.4.5.

HI everyone

first thanks to you all! i’m now able to perform my first automations steps.
i’m trying to use my echo dot to play something with no luck
i deem it is trivial for you…

I added a script trying to copy as much as possilble wiki on github with no success

this is the script

radio:
  alias: playradio
  sequence:
  - service: media_player.play_media
    data:
      entity_id: media_player.echo_input_di_andrea
    media_content_id: cats the musical
    media_content_type: AMAZON_MUSIC

the main aim is to use TUNEIN

What i’m doing wrong?

Use the way, that the media_content_id have tbe the same what you have to say to Alexa.
That means: “tunein cats the musical” if the radio has this name.
the content type in this case is always “custom”
That works here reliable. In your case the media_content_type has to be TUNEIN

thanks for the suggestions

tried in many different way still got same error

2021-01-05 20:06:14 ERROR (MainThread) [homeassistant.config] Invalid config for [script]: [media_content_id] is an invalid option for [script]. Check: script->sequence->0->media_content_id. (See /config/configuration.yaml, line 18).

may be the issue related to hypens?
shall I use ’ or " in media_content_id and media_content_type?

I got rid of the above error ( media_content_id and media_content_type were not intented enough)

but the problem remains, shall I use ’ or " or nothing in defining media_content_id and media_content_type ?