Echo Devices (Alexa) as Media Player - Testers Needed

Ok, I figured out the problem, and due to embarrassment I am not going to explain other than saying plain ignorance and all is working.

I have been using this component successfully since its first version but it stopped working. I noticed the URL update and then my devices started working again, but would not detect any new echos. I decided to manually upgrade because I did not see the component in HACS even though I have a fresh new install of HA.

I just went through 2FA and got my number from amazon, but the logs are still showing this…

alexalogin.login((<alexapy.alexalogin.AlexaLogin object at 0x7f4a6d79d4f0>,), {'cookies': {}, 'data': OrderedDict([('email', 'n***a@n**************m'), ('password', 'REDACTED 8 CHARS'), ('url', 'https://alexa.amazon.com'), ('debug', False), ('scan_interval', 60), ('include_devices', ''), ('exclude_devices', ''), ('securitycode', '********')])}): A connection error occured: An exception of type ClientConnectorError occurred. Arguments: (ConnectionKey(host='alexa.https', port=443, is_ssl=True, ssl=<ssl.SSLContext object at 0x7f4a6bbcb840>, proxy=None, proxy_auth=None,

Everytime I resubmit it, I get this…

image

I am probably doing something really dumb, but this thread is really long and its very confusing to follow.
`

I replaced my security code with asterisks so people wont get distracted by that and lecture me.

I’m glad you got it working, but you did mention you went through all the documentation. If there is some way to improve the documentation that would have helped your case, it could help someone else. Please consider making updates to the Wiki.

Your domain is wrong. It needs to be amazon.com or whatever your region is. You entered https which is not a valid Amazon.com domain.

thanks! I think it was reading my config from the old code. I removed the URL and now its working.

I don’t think so, in my case I have 4 amazon echos in my house and while testing I was sending specifically to my OFFICE echo, which turns out had gotten switched around with my BEDROOM echo and I was sending messages to the echo in my bedroom(office). Finally figured it out when I played some music on my office echo and the logs showed (BEDROOM) was playing. So I swapped them out and found out it had been working all along, just couldn’t hear it. :flushed:

Please vote for this #WTH to integrate the alexa mediaplayer direct into HA

1 Like

I have no idea if this is related to my problem but I will ask. This morning I did a restart on my PI 4 Home Assistant. After everything came back a request to log back into Alex Media Player appeared which it does often. While attempting this Amazon made me jump through several hoops such as changing my password and sending 6 digit code to my email to enter and entering the captcha over and over again. I have done all of these things several times and am still not able to connect Alexa Media Player to Home Assistant. Any help would be appreciated!!

Have you enabled 2FA?

I am using 2FA yet I still get a failure to connect. I have my region set to “amazon.com” should that be a different url? It always worked before as just amazon.com (I am in the US).

Ok so after entering my 2FA a half dozen times and the captcha I must have finally gotten the combo just right. I wonder if there was a clock drift on my 2FA causing the failures.

Just a note on my problem. I did not enable 2FA because being concerned of making things worse. What I did do was delete alexa_media directory under custom_components then reinstalling alexa_media using HACS. Everything worked the first time. Thanks for the help.

Is there any solution for Alexa 2FA, I am seeing two entries in my integration, one showing entities and other on discovered? The one which is showing discovered is not giving any option to ignore or delete, I tried multiple attempts with my password & captcha but no luck. Integration stopped working, any suggestion?

The discovered happened to me once I updated to new version of alexa media player hac. I went through the configure process for the discovered version. Added the 2FA. Alexa media player will show 2 accounts. I deleted the account that had 2 extra devices.

This is how HA does a relogin unfortunately. Once you successfully configure the Discovered instance it will disappear and everything will work.

I cannot login anymore, can someone help me?

Login
E-Mail
PW
2FA enabled

Test: 2FA from other Browser login, without 2FA Code, with Google Auth Code, 2FA Code after PW
reinstalled, no captcha

I am not able to log in also. I used to be able to log in when the captcha and 2FA was prompted from notifications, today I noticed that I needed to do this from the integrations page. Typically getting 2FA is a two step process but now it looks like I need to provide everything in one shot but not sure how that is possible. Anyway, I tried with a blank 2FA and some random numbers either way I did not get my 2FA code from amazon. Stuck and there does not appear to be any help available for this new form of sign-in. As of now I see a message about needing to enter an “valid email” I wonder if something went wrong due to too many failed attempts.

I must admit that each time I see this need to relogin I remove the Alexa Media Player integration and add it again.

Before you do this setup your 2FA to use an authenticator app. I use the Google Authenticator app. When you set it up, Amazon shows a QR code which you load via the camera to the Google Authenticator app on your phone. If you take an photo of it you can add it again later to an iPad. You can even take the code and load it to an Authenticator integration in HA if you dare. This way you do not need to fight with getting Amazon to send a push code to your phone. You just open the app and it will always show a 6 digit code that changes every 30 seconds

1 Like

Appreciate the response, I completely forgot that I had a 2FA app already setup. It worked, but not sure if it had anything to do with a reboot of the system which I did not do before.

How do I log on without using 2FA. Is it possible?

Regards Dave

Is there any way to add devices to the list of inclusions or exclusions once the integration is configured? Or is the only way to delete the integration and re-add it?