Echo Devices (Alexa) as Media Player - Testers Needed

Thanks for asking. I was able to get this all working following your instructions. I had no choice but to change my Amazon password unfortunately.

1 Like

It’s located here:

hassio/config/custom_components/alexa_media/translations

So, just to be clear… as soon as I get prompted that I need to configure alexa media player again,

  1. I rename the translations folder to a temp folder
  2. Create a new translations folder and copy the files from the temp folder to this new folder.
  3. Delete the old temp folder
  4. Delete the Alexa media player Integration
  5. Add Alexa Media player integration.

Do I need to restart HA at any point?

You just need to do these steps whenever you update the integration and see a blank configuration form. Please see Umbe’s post/screenshot.

I also had the same issue with not being able to enter the 2FA. I had to change my Amazon password and also updated the integration and it worked fine

I’ve tried renaming the ‘translations’ folder and even completely removed and readded the integration and I’m still getting blank fields when trying to login. What am I missing?

edit: Got it. Had to clear cache and hard load. Weird.

I’d just like to share what is not helpful to have to deal with when maintaining this component. Please think carefully before you post stuff like this.If this keeps coming up I am just going to walk away from the project as the component works fine for me. I will not respond to PRs like that and will ban you from posting to the repo. Even if banned, you can of course download it and make changes under the open source license but I don’t have time to deal with you.

That said, I do realize it’s a rare occurrence and the vast majority of people are supportive and respectful. I appreciate the regulars who help answer questions here–particular those questions that keep coming up. I’m also particularly thankful to everyone who has helped out in their small way by working with me on bug reports, translations, wiki edits and other things I’m probably forgetting. Again, this is a HA community and as long as it’s a healthy community I’ll continue to participate.

4 Likes

Eugh. I’m sorry that you have to deal with stuff like that. Please be assured that the vast majority of us are so incredibly grateful for the work you do. I fear that some don’t realise that this integration is not using an officially-published Amazon API and issues such as this will always be a thing so long as you have to play cat and mouse with Amazon’s changes.

4 Likes

Agreed! thanks for all you do on this, i use it every day and i really appreciate it :slight_smile:

Why are people using 2FA when it’s recommended to use cookies instead anyway, I’ve had to reenter them twice in over four months and one of them was definitely my fault for changing the password by mistake. It only takes a couple of clicks and copy and paste so not a hardship.

Can anyone provide any more targeted instructions on getting the cookie text data…?
Which cookie, which part, what data etc…

The links within the readme for the chrome ‘tool’ lead to a dead end.

Much appreciated

This is the simplest way…

Install ‘get cookiestxt’ chrome extension…

Go to relevant Alexa web page, eg. https://alexa.amazon.com, and login.

Click the cookies.txt extension, select export and save file.

Open the cookies text file and copy all the lines that don’t have a ‘#’ in front of them.

Paste into cookie field of Alexa Media Player dialogue.

Once you’ve done it once it takes seconds the next time.

Without the tremendous amount of work and dedication you have provided to the community, we wouldn’t have a working Alexa component right now. People need to stfu about having to reauthenticate too often and understand this problem is due to Amazon and not the component. I only have to reauthenticate every 3 or 4 weeks, and it takes 30 seconds.

It would also be helpful imho if people who are having problems would read the advice given to others having the same problem so that @alandtse and others don’t have to waste time answering the same questions over and over.

Unfortunately this thread is mostly feedback by those who are having trouble. Perhaps a lot of us who never have a problem should post in this thread from time to time and show some support and appreciation for the work by @alandtse in supporting this component,.

11 Likes

Your integration is the GOAT for my entire HA setup and I’m sure for many others as well. Yeah I reauth every few weeks, but it’s a small price to pay for what I can do with my alexa speakers as a result. Hope you don’t let those obnoxious messages get you down too much.

4 Likes

Hi all, I am struggling after a reauthentication. I used the integration for many months without issues.
With any notification it seems from HA side that everything went fine, but nothing arrives to the echo devices.

  • Logs show nothing useful
  • I can turn on the Don’t disturb mode from HA, so the authentication is fine
  • I have used the cookies from amazon.com, same set on the integrations
  • Both tts and announce seems not to be working working
  • The echos by themselves are working as expected
    I have tried to reinstall the integration, no luck.
    Where should I look?

It has to be from alexa.amazon.com from your appropriate domain.

thanks, yes I meant that used the cookies from the same domain. ofc I get them from alexa.amazon.com

After debug logging enabled I can see this:


2020-11-16 08:42:44 DEBUG (MainThread) [custom_components.alexa_media.media_player] <Entity Adam's Echo Dot: standby>:Running skill amzn1.ask.skill.555861c2-4d51-472e-87be-5f814153dc9c with queue_delay 1.5
2020-11-16 08:42:45 DEBUG (MainThread) [alexapy.alexaapi] Queue changed while waiting 1.5 seconds
2020-11-16 08:42:45 DEBUG (MainThread) [alexapy.alexaapi] Creating sequence for 2 items
2020-11-16 08:42:45 DEBUG (MainThread) [alexapy.alexaapi] Running behavior with data: {"behaviorId": "PREVIEW", "sequenceJson": "{\"@type\": \"com.amazon.alexa.behaviors.model.Sequence\", \"startNode\": {\"@type\": \"com.amazon.alexa.behaviors.model.SerialNode\", \"nodesToExecute\": [{\"@type\": \"com.amazon.alexa.behaviors.model.OpaquePayloadOperationNode\", \"type\": \"AlexaAnnouncement\", \"operationPayload\": {\"deviceType\": \"A3S5BH2HU6VAYF\", \"deviceSerialNumber\": \"G090LF09637700E6\", \"locale\": \"en-gb\", \"customerId\": \"xx\", \"expireAfter\": \"PT5S\", \"content\": [{\"locale\": \"en-gb\", \"display\": {\"title\": \"Home Assistant\", \"body\": \"Daddy is home\"}, \"speak\": {\"type\": \"text\", \"value\": \"Daddy is home\"}}], \"target\": {\"customerId\": \"xx\", \"devices\": [{\"deviceSerialNumber\": \"G090LF09637700E6\", \"deviceTypeId\": \"A3S5BH2HU6VAYF\"}]}, \"skillId\": \"amzn1.ask.1p.routines.messaging\"}}, {\"@type\": \"com.amazon.alexa.behaviors.model.OpaquePayloadOperationNode\", \"type\": \"Alexa.Operation.SkillConnections.Launch\", \"operationPayload\": {\"targetDevice\": {\"deviceType\": \"A3S5BH2HU6VAYF\", \"deviceSerialNumber\": \"G090LF09637700E6\"}, \"locale\": \"en-gb\", \"customerId\": \"xx\", \"connectionRequest\": {\"uri\": \"connection://AMAZON.Launch/amzn1.ask.skill.555861c2-4d51-472e-87be-5f814153dc9c\", \"input\": {}}}}]}}", "status": "ENABLED"}
2020-11-16 08:42:45 DEBUG (MainThread) [alexapy.alexaapi] POST: https://alexa.amazon.com/api/behaviors/preview returned 400:Bad Request:application/octet-stream

Are you in the UK or in the US? You’re communicating with the US servers but your media player is reporting that it’s in en-GB which is the UK. You have to log into the correct domain for the component to work. If you’ve mixed and match your devices to different domains it also can cause issues.

Well, I’m in Hungary, but amazon is not supported here. So I usually use US.
I’ll look around in that part Thanks

Moved the echo to US location, still no luck.
Logging in without the cookies.txt, works as expected. So the issue is defiantly around that part.
Thanks for the help