Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Region Mismatch and API Errors #2702

Open
Pingfragger opened this issue Nov 28, 2024 · 2 comments
Open

Region Mismatch and API Errors #2702

Pingfragger opened this issue Nov 28, 2024 · 2 comments

Comments

@Pingfragger
Copy link

Pingfragger commented Nov 28, 2024

Describe the bug

The Alexa Media Player integration is experiencing issues with region mismatch and API errors. When using amazon.de, no devices are found, and API errors occur. Switching to amazon.com lists devices but they cannot be controlled.
The integration fails to authenticate properly with amazon.de, resulting in no devices being listed and API errors. When switching to amazon.com, devices appear but cannot be controlled, with logs showing domain mismatch errors between amazon.com and amazon.de.

To Reproduce

The integration fails to authenticate properly with amazon.de, resulting in no devices being listed and API errors. When switching to amazon.com, devices appear but cannot be controlled, with logs showing domain mismatch errors between amazon.com and amazon.de.

  • Configure Alexa Media Player with amazon.de
  • Observe that no devices are found and API errors occur.
  • Switch to amazon.com.
  • Devices are found but cannot be controlled; logs show domain mismatch errors.

Expected behavior

Devices should be discoverable and controllable using my Amazon region (amazon.de), without domain mismatch or authentication issues.

Screenshots

Login:
Desktop Screenshot 2024 11 28 - 22 28 04 72

Errors after login (amazon.de)
Desktop Screenshot 2024 11 28 - 22 31 20 89
Desktop Screenshot 2024 11 28 - 22 31 26 11
Screenshot_20241129_060352_Home Assistant

Errors after login (amazon.de) with Set async_timeout to 300
Desktop Screenshot 2024 11 28 - 22 59 13 66
Desktop Screenshot 2024 11 28 - 22 59 16 92

Error after login (amazon.com)
Desktop Screenshot 2024 11 28 - 22 43 48 36

Result of login in amazon.de and amazon.com
Desktop Screenshot 2024 11 28 - 22 45 20 59

System details

Home Assistant version: Core 2024.11.3 - Supervisor 2024.11.4 - Operating System 13.2 - Frontend 20241106.2
alexa_media version: 4.13.7, 4.13.8 and 5.0.0 tested
alexapy version: 1.29.4
Is Amazon [2FA/2SV enabled]: Yes
Amazon Domain: amazon.de

Debug Logs (alexa_media & alexapy)

home-assistant_2024-11-28T22-18-34.509Z.log

Additional context

What I already tried:

  • Tried different versions of alexa_media
  • Installed alexa_media on another HA system (version 2024.9.1) with the same error.
  • Accessing https://alexa.amazon.com/api/devices-v2/device and https://alexa.amazon.de/api/devices-v2/device in a browser shows Alexa devices for both.
  • OpenHAB with Echo Control Binding (similar to Alexa Media Player) works without API issues; login and devices function correctly.
  • Disabled all Echo devices, Alexa apps, integrations/bindings for at least 12 hours due to "Too Many Requests" error, but same even after 12 hours
  • Tried various login options over three days.
  • Set async_timeout to 300; then encountered "Too Many Requests" error.
  • Changed code in manifest.json "requirements": ["alexapy>=1.28.2", "packaging>=20.3", "wrapt>=1.14.0"],
  • Tried putting the local HA-URL in the public URL
  • Include only one Alexa device in the config
  • Tried disabling the 2FA
  • Deleting all logged in devices in the the Alexa app

All of this did not work

It worked to integrate my wife's account (Amazon.de without 2FA). The devices appear there

Assumption:
The problem might accur due to the number of devices in my account (Total about 110 devices - Echos and some sensors via the xiaomi skill). The devices cannot be deleted from the alexa app - > unknown error

@Git-Vi
Copy link

Git-Vi commented Dec 1, 2024

I have faced same issue:

  • Home assistant docker container - 2024.11.3
  • Alexa Media Player 5.0 (all recorders are removed from HA configuration file )
  • all entities are unavailable after the account sync. Amazon account from DE but it possible to add only with COM

@danielbrunt57
Copy link
Collaborator

I have faced same issue:

  • Home assistant docker container - 2024.11.3
  • Alexa Media Player 5.0 (all recorders are removed from HA configuration file )
  • all entities are unavailable after the account sync. Amazon account from DE but it possible to add only with COM

Where are your devices registered? www.amazon.com or .de?

Mine originally were registered in Amazon.com as that is where I bought my first echo. Since then, I've moved them to amazon.ca, then back to .com and earlier this year back to .ca (all moves were to gain access to skills only available in .com or in .ca).

You have to use the domain where they are registered. Using another domain is pointless as it will fail to see them.

If they are in .de, use .de. If that fails at some point, that failure needs to be investigated and fixed. Trying to add the integration with another domain will only succeed in authenticating and initial setup with the cookie but will fail to see devices.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants