Echo Devices (Alexa) as Media Player - Testers Needed

Where location did you remove and re-add the folder? I deleted the integration but not able to add it back…
Thanks.

I followed the wiki under manual install to re-add the files. It’s important it follows the correct directory structure. I also downloaded the whole thing from the release location and used WinSCP to move it over to my HA server.

Thanks. I am doing HACS mode, not manual installation.

After spending sometime try and error, my Alexa am finally back! It turns out that after a few tries your account probably got blocked out by amazon for sometime. I went ahead and changed my amazon account password, then able to add it back to HA.

Glad you got it working. I was never able to get HACS or the integrations to show Alexa as an option. I think something got corrupted in my multiple login attempts and doing a fresh start fixed it. Someone else completely deleted their HA docker container and re-added, which solved it for them. I think both of these paths solved the same issue. I’m happy that I’m up and running again.

I thought I had this fixed as you can see in post 4135. I have 2FA enabled and using Gogle Authenticator app and it worked perfectly. Now 16 days later, the Notifications drwer says I need to reauthenticate. This happened once in the interim and the login worked fine.

I now go through the process getting the first pop-up dialog but there is no request for a captcha. Just email, password, and 2FA. I get the auth code from the Google App and hit submit. It comes back with a blank pop-up (except for a little X on the right). There is no way to get past that except for rebooting.

I turned on debug as @alandtse described. and I see two files in config: […]netget.htme and […]netpost.html. The netget.html is an empty amazon login page.

The netpost.html has an error on top:

The username/email was correct
.
Like I said, it worked brilliantly until Amazon needed to reauthenticate. No changes since (famous last words every engineer hears - LOL). Also of note, I got a notification from amazon that a new login took place which was good.

Since I couldn’t get past this, I tried uninstalling then reinstalling the alexa_media files. Same thing. I installed the last 2.11.2 version but that did not change behavior. I noticed that no pickle file is being created. Also, once I get the blank dialog box it always appears when I go back to the integrations_>configure page. I have to cold reboot to get the original configurations login page back.

I’m running raspian with docker and currently running version 0.107.7 of HA core.

I’ve seen a couple of posts tat say ‘remove the amazon credentials from the configuration.yaml’ but I am reluctant to do that because I don’t understand what it will do for the login process.

My configuration.yaml file has this:

lexa_media:
 accounts:
 - email: !secret amz-email
   password: !secret amz-pwd
   url: amazon.com
   debug: True
   scan_interval: 30

logger:
  default: critical
  logs:
# for v 1.0.0
    custom_components.alexa_media: debug  
# for API debugging (verbose and intended for service debugging)
    alexapy: debug

Any help is appreciated. If I missed the solution somewhere in the posts above, please forgive me for not seeing it.

Thanks.

Well, I’ve tried over and over. but all that showed up was this:

after_config

and I could not get past it even with a hard reboot.

So I again deleted and replaced the alexa_media directory in custom_components. Hard booted and still the same thing. I looked at the post.html file and there is no error this time but it wants me to put in my password again as shown here:

So I’m no further but at least it’s different. I’m assuming Amazon changed something but are we dead in the water now or is this fixed in 3.0? I saw the breaking changes but don’t see any reference to Amazon changing login yet again.

If anyone is seeing this behavior and fixed it - Please help.

I installed 3.0.0 and no change in behavior. I logged an issue in github.

We may be reaching the end of our ability to handle authentication. Apparently Amazon is now asking for credit card validation details as part of their verification (currently what is the expiration date of x). I’m not sure I’m comfortable adding that to the component given how likely someone will think I’m harvesting that data. Of course I’m wiling to hear feedback. Please try to plus 1 someone else instead of repeating with a “me too” post so it’s easy to count up.

I personally don’t see an issue with asking for that info.

If people were afraid of giving the component personal account information then they should already not want to give it their Amazon login details (user & password).

I would really like to keep this component alive as long as possible since it’s so useful.

7 Likes

I agree totally!!
We have to keep this solution up, until a replacement will be available.
I hope, that the devs have the WTH topic on their schedules.

2 Likes

Hi, could it be an approcach, to use the Nabu Casa connect for outputs as long as a core integrated solution is available even if that mean, that some functionality will be reduced?
Just an idea.
I cannot imagine, that the core devs are not interested in having an interface to alexa as output device.

Hi, I’m intensively using the notify service. Alexa tells me many critical things I need to know about my smart home and I ask her to execute scripts to turn devices on or off… For me that has become an essential part of my HA installation. I also prefer this solution over Nabu Casa. So please try to find a way to keep this integration alive.
It would probably help to explain to users in the installation process why this information is needed and that it is not misused. And/or is there a way to provide the needed auth data in an encrypted format?
I did +1 on github.

2 Likes

By the way, the GiutHub-Issue: https://github.com/custom-components/alexa_media_player/issues/943

I haven’t had any issues for a long time since going to 2fa. Perhaps we need a count of those not having issues before we assume the worst? Of course many who aren’t having issues are not monitoring this thread.

Interesting @alandtse. I’m not sure this is the result of Amazon asking for credit card info because I’m experiencing blank dialog popups. When I look at the html files generated, they look fine and the post.html is only asking for the password again.
Could it be there are two different problems occurring here? I wish I knew more about the process of getting the popup dialogs to appear because something is preventing them to be filled with content returned from Amazon. I hope this makes sense but it is only observational.
I do recognize the mounting issues with logins and authentication so I want to thank you for your unbelievable efforts to keep this integration running. Even though I’m still without Alexa integration working, I appreciate your hard work here. If there is anything I need to provide to my github issue, please let me know.

i cant imagine that amazon will ask for creditcard info for a normal login.
business perhaps, but not for normal clients.
i dont even own 1, and if i would need 1 for amazon they would lose a client.

if amazon asks for creditcard info there is way more going on.
with my appdaemon app (which is also based on alexapy (old version)) i dont even need 2FA. and i never had to use a captcha. all i need is my username and password.

so i wonder if it isnt other things causing the login issues.

So, you mentioned on GitHub that:

It’s not possible to do it with a webpage unless you want to manually copy cookies from the browser for the component.

If we start running into more issues, could you please share how to do that with your component? I had to do that with the old “alexa_remote_control.sh” script I used for my first year with HA… I would have no issue copying a cookie every couple/few weeks just to keep it working.

Thanks for all your time and effort!

Just because I know in theory how to do it doesn’t mean I know how to do it in practice. Someone else is going to have to look it up. Initial research shows one solution requires you have to have the browser on the same machine as python is running. With Docker, this may be add further complication. Again, these hacks appear to require hacking the local Chrome or Firefox database, which will be as complicated as hacking Amazon’s login.

Working with @alandtse on the github issue he saw that the en.json file in the translation directory had a double backslash (\\n) where there should have been one (\n).

It appears this way in 2.11.0, 2.11.2 and 3.0 (maybe others?) and was somehow causing the dialog boxes not to appear properly. At Alandtse’s suggestion, I edited the “\\n” 's from the en.json file to be “\n”.

In order to get the dialog boxes correctly showing again, I had to delete the “pycache” directory in the alexa_media directory while restarting HA as it gets recreated when initializing.

All the dialog boxes worked including the captcha and 2FA so now I have my Alexa devices back and working.

Thanks @alandtse for the support. It was awesome!

2 Likes

3.1.0 now allows cookie importing from the browser. My testing in Chrome shows it’s brittle and will force a relogin quite frequently. This may or may not be fixable but I’ll let others test it to see if it’s isolated or not.

1 Like