Echo Devices (Alexa) as Media Player - Testers Needed

No its a massive annoyance for me still and getting it to reauth is also a massive annoyance. I don’t know what it is but every time I see that reauth I know its going to be a pain in the neck. Fill out the boxes and some random error appears.

Question. Does all this go away if you pay nabucasa the subscription?

Mh thats really unfortunate. In theory that integration is super useful but I want my smart home to be hassle-free, not to annoy me with the need of frequent manual fixing.

I am currently paying for the nabu casa subscription and am using alexa via this, but thats not really the same as this integration. You can really easy sync all devices to alexa and control them by voice but the subscription will not allow you to use echo devices as media players. So when I currently want alexa to say something I need to toggle an input boolean and have a alexa routine defined that reacts to that toggle. With the media player I could do everything in HA.

I had a reauthentication request yesterday. First one I’ve seen in many, many months. I use Nabu Casa.

This integration is using an unofficial, undocumented API and every time Amazon so much as sneeze, there’s a chance that it’ll stop working. That being said, it’s been rock-solid for me and forms an essential part of my smart home.

The devs on this integration do an absolutely amazing job.

1 Like

Then you are lucky because all I get is password errors, unknown errors and config flow errors. Authenticating in my case is an absolute nightmare. Just went to do it now, 2FA key in, password error. Re-enter the password, password error.

No one is saying the devs ‘don’t do an absolutely amazing job!’, but the fact is this is far from perfect and even authenticating can be hardwork. If you are going months and months without reauthentication, I’d like to see some broad stats from many users because in my experience that must be pure luck. The guy two posts above authenticated 6 times in 6 months, I’ve had to do it several. I’ve never once gone ‘many, many months’, please let us know what you are doing which is leading to that as I’d appreciate it behaving the same way!

There was a time when I too was having to reauthenticate regularly. In fact I had to change my Amazon password several times as it kept getting locked out. Also, where I had to reauthenticate this week, I too received a password error whilst using the Android companion app - using a browser (for some reason) worked OK.

I don’t think I’m doing anything special. I’m an Amazon UK user with nine echo devices and a Nabu Casa subscription. I’m using HAOS on an ESXi VM on an 8th Gen Intel NUC. Perhaps it is luck.

If you read my post correctly you will see, Yes I had to reauth 6 times in 6 months BUT I went from 2 months to 3 months before reauth and now it is every 2 weeks. So I went for “many many months” without a reauth to every 2 weeks. As I said I think this is Amazon.

Do you read the html files in the HA config dir that are created when a reauth fails? They tell you why it has failed. Unfortunately the AMP reauth interface doesn’t correctly interpret this which is understandable as its a screen scrape! So, for example, you get a wrong password issue when it isn’t.

Unfortunately, in my experience, the reauth is triggered at some time early morning so I have zero chance of entering the 2FA correctly.
If reauth fails which usually does, the only way I can reauth is to restart HA. That forces Amazon to generate another 2FA ( in my case an OTP sms)

There is currently an issue where Amazon will incorrectly reject auth attempts with an incorrect password response. One you’re in the state sometimes a resubmission will work and sometimes you have to remove and readd the integration to start a new session. Given this and the number of complaints, the reauth is broken enough that I’ll probably just rip it all out and make everyone remove and readd (which is my recommended workaround).

If you don’t want to worry about reauths, then I suggest you don’t install the integration. I’m not saying this to be mean, but I can’t guarantee you’ll avoid reauths since we’re hacking Amazon’s API and pretending to be their official app.

One thing that should reduce reauth is using the oauth token login method because the tokens are longer lived. It’s the default setting when you remove and readd, but if someone hasn’t done a remove and readd and is on an old configuration, it would not be enabled as the reauth path doesn’t change any settings. If you’re in this state, the logs should have a warning like “not using oauth tokens, using fallback method.” 2 week reauths are quite common with this fallback method and was a major issue driving the swap to oauth tokens.

For me, I go months without reauth but I’m based in the US so maybe there’s less breakage since Amazon is US based. Unfortunately, hunting down reauth issues for people outside the US is difficult
and it may be tied to the fact Amazon doesn’t want third-party apps accessing the API. While Amazon hasn’t explicitly killed us yet, that’s always a risk.

No. Nabucasa isn’t related to the issues with the custom component.

Don’t get me wrong. I love the integration. I was merely answering the question posed by itDevelops, with my experience.

I was not complaining as I have a working method to reauth.

So your workaround is to delete the integration from Config - Integrations and then add it back in?
According to the wiki this doesn’t mean the entities change and the automations and scripts still work. This is Great.
You also mention the “oauth token login method” as being the the recommended way to login.

I think the wiki is confusing here
" 1. As of 3.5.0, you can also use the non oauth-token login method by disabling the option. This is the default method from 3.4.1 and below which imitated the webapp but also reported reauth problems. Oauth token is how the mobile apps login and in theory will not have that problem."

So, since I haven’t deleted the integration and re-added it since i first installed it many moons ago, I don’t know what that means. It would be nice if the wiki had a succinct recommended way to authorise.

finity suggested the same here

You also mention the logs but when I look I don’t see anything in the HA logs referring to “not using oauth tokens”. So again I’m confused.

I’m in the UK but as I mentioned in my earlier post I went 3 months without a reauth so maybe the oauth token login is the answer, But how do you do that? Any screenshots would be welcome.

Thanks

I reinstalled as suggested, was able to reauth without issue and no config flow / password errors. Thanks. Perhaps I had not looked hard enough but that piece of advice was alluding me and now I’m back up and running. Thanks. EDIT: I also used the built in 2FA this time (was previously using my authenticator app as thats what I was already using for Amazon prior to installing the integration).

For what it is worth, it is not the reauth that bothers me, its how when you try to do it you can get met with these errors and stuck in a never ending loop with no clue what to do. But now I know to reinstall.

One other thing that would be useful certainly for myself is setup a push notification when authentication is required rather than wondering why my automations are no longer running and finding it asking for authentication. Is there some sensor or method for catching the transition from authenticated to not authenticated so I could setup some push notification to myself to fix it?

Thanks.

1 Like

You’ve thought of everything :slight_smile:

He really has, and has spent countless hours of his own time keeping this going… and never leaves us hanging when an issue pops up.

2 Likes

I’m trying to add the template sensor for last_alexa from the wiki. When I add the code to sensors.yaml, I get the following error:

Invalid config for [sensor.rest]: [template] is an invalid option for [sensor.rest]. Check: sensor.rest->template. (See ?, line ?).

What am I doing wrong?

I appreciate the sentiment but I can’t claim credit for the wiki. I don’t use those automations and that really is a community effort as people figure out new ways to improve and share them. But thanks for the kind words!

Hey Guys!

I was wondering if any of you are having issues??

Today it started to ask me for reconfigure… using i just enter my amazon password and the catcha but today its not working… i add the the 2fa on amazon and try to use the built in 2fa still doesn;t work…

any help will be appreciated!

Thansk

1 Like

I have found that unless I happen to notice the need for reauth within about 10 minutes of it appearing I don’t have much luck… so restarting HA has actually in some cases fixed it without even entering my info again… but usually I notice that it needs attention a few hours after it happens so I ended up restarting HA and seem to have better luck reauthenticating… but that is my own personal experience and not necessarily true for everyone.

This just started for me about an hour ago now. I used it about 2 hours ago, then asked to re-auth, but the captcha image is broken. I haven’t tried 2FA.

And now it appears to be working again. I didn’t change or do anything. Amazon must have had an outage.

Had the authentication error last night, restarted HA and it went away :man_shrugging:

Same here a restart and I didn’t have to do anything else.