Invalid username and password setting up Alexa integration

I’ve been using Alexa with Home Assistant (via AWS/Lambda) for a couple years and for the most part it’s been working fine. Recently I was having issues with duplicate devices appearing in the Alexa app causing confusion when using Alexa. In my troubleshooting I disabled the Home assistant integration in the Alexa app and now when I try to enable the Alexa integration app and login I get:

I have verified the username and password are correct as I can log into HA locally and from my external URL. I have even tried logging with my admin credentials with the same error. I am using a reverse proxy with Let’s Encrypt SSLs.

Running a test discovery event on Lambda works fine and returns my devices in HA.

HA log:
Logger: homeassistant.components.http.ban
Source: components/http/ban.py:80
Integration: HTTP (documentation, issues)
First occurred: 10:26:32 AM (2 occurrences)
Last logged: 10:26:44 AM

  • Login attempt or request with invalid authentication from 192.168.1.1 (192.168.1.1). Requested URL: ‘/auth/login_flow/514202eb923f24dadf3225075c40837f’. (Mozilla/5.0 (iPhone; CPU iPhone OS 16_5 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/16.5 Mobile/15E148 Safari/604.1)

All of the videos I’ve seen about setting this up this way are a couple years old so I’m wondering if something has changed? I know using Emulated_Hue is the new hotness but I was having issues with it so that’s a whole other thing

Some assistance would be appreciated.

An alternative approach - I created a HA Addon for setting up the custom Alexa skill. It doesn’t require signing in. Feel free to give it a try

Thanks for posting your integration. I tried it an it was a simple setup, but for some reason the Alexa app is tripling the devices and they’re all “unreachable”. I have no idea why Alexa is being so dumb.

That is strange. If you had multiple skills enabled I guess that could happen. I would expect some of them to be reachable though.

Are there any logs in the Addon or in your AWS account (CloudWatch Logs) that look like errors?

I think it’s an issue with Alexa not HA. Even though I am not using Emulated_Hue anymore Alexa is still seeing those devices as if this data was cached. The fact that it’s finding about 300 ish entities in about 5 seconds also backs that up.

image

“Royal Philips Electronics smart device” is what Alexa sees and labels a device when it finds devices using Emulated_Hue. Alexa.amazon.com sees one device but the app sees 2-3 duplicates. Again, probably a caching thing. I’m diving down that rabbit hole of clearing Alexa’s discovery cache but that’s not really something Amazon intended so most cache clearing suggestions are hit or miss.

For anyone finding this thread in the future we have found a similar issue was fixed by resetting the password on the Alexa user account.
The old password has symbols such as @ in so unsure if that was the cause or if just the reset alone was the fix but we reset it to only use letters and numbers and it’s now working.

1 Like