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

Attempt to install Alexa media_player appeared to be successful, but no integration is found #2710

Open
oywino opened this issue Dec 2, 2024 · 16 comments

Comments

@oywino
Copy link

oywino commented Dec 2, 2024

IMPORTANT: Please search the issues, including closed issues, and the FAQ before opening a new issue. The template is mandatory; failure to use it will result in issue closure.

Describe the bug

I installed the Alexa Media Integration from HACS as explained in the Wiki. Everything seemed fine, including 2FA. Then I installed the Alexa media_player integration from HA Settings --> Devices & Services and again everything appeared fine. I even got a success notification in the end, along with a message to just ignore any error messages.

The only error message I got in the log was:
Detected blocking call to load_verify_locations with args (<ssl.SSLContext object at 0x7fd0de6e77d0>,) inside the event loop by custom integration 'alexa_media' at custom_components/alexa_media/config_flow.py, line 374:
But there's no Alexa Media Player integration in the HA integration page!
And nothing seems to work.

To Reproduce

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior

Screenshots

image

System details

  • Home Assistant version: 2024.11.2
  • alexa_media version (from const.py or HA startup log): v5.0.0
  • alexapy version (from pip show alexapy in homeasssistant container or HA startup log): (not running HA OS)
  • Is Amazon 2FA/2SV enabled <!---We will not debug login issues if unanswered---> (y/n): Yes
  • Amazon Domain: amazon.com

Debug Logs (alexa_media & alexapy)
Please provide logs.
Can't enable debug logging as long as the Integration isn't installed/found.
Additional context

@danielbrunt57
Copy link
Collaborator

I installed the Alexa Media Integration from HACS as explained in the Wiki. Everything seemed fine, including 2FA. Then I installed the Alexa media_player integration from HA Settings --> Devices & Services and again everything appeared fine. I even got a success notification in the end, along with a message to just ignore any error messages.

You sequence of events doesn't make sense to me.

I installed the Alexa Media Integration from HACS as explained in the Wiki. Everything seemed fine, including 2FA.

There is no entry of 2FA when installing the HACS integration. Unless you mean you successfully created/added the Amazon 2SV Authenticator App, obtained the key and verified it.

Then I installed the Alexa media_player integration from HA Settings --> Devices & Services and again everything appeared fine. I even got a success notification in the end, along with a message to just ignore any error messages.

There shouldn't have been a message to just ignore any error messages. The installation should just say Successful followed by the list of discovered devices where you can configure the area.

The only error message I got in the log was: Detected blocking call to load_verify_locations with args (<ssl.SSLContext object at 0x7fd0de6e77d0>,) inside the event loop by custom integration 'alexa_media' at custom_components/alexa_media/config_flow.py, line 374:

This is and always has been an absolutely benign WARNING and has absolutely zero effect of the execution of the code.
FWIW, I recently fixed that issue (last week?) which stems from authcaptureproxy. authcaptureproxy has been bumped and released as new version but alexapy now needs to be bumped and released as a new version and then alexa_media bumped and released as a new version to get the revised code in the hands to users!

@danielbrunt57
Copy link
Collaborator

A full and complete set of DEBUG logs for alexa from initialization through failure might help diagnose what's happening in your system....

@oywino
Copy link
Author

oywino commented Dec 4, 2024

A full and complete set of DEBUG logs for alexa from initialization through failure might help diagnose what's happening in your system....

Can you please give me the step-by-step on how to generate/set-up such a log?
(I run HA Core 2024.11.2 in a docker container on a Linux server. No add-on's or Supervised)

@bengthu
Copy link

bengthu commented Dec 5, 2024

Maybe this is the answer. I had the other issue where the devices weren't found, so I re-installed Alexa Media Player and had a similar experience to the above. I searched in HACS for Alexa Media Player, installed it, configured the 2FA, and it all looked like success. Now I go to Settings > Devices > and there's no Alexa Media Player there. I reinstalled twice and was scratching my head.

Since I disabled it before re-installing, I had to un-disable it. In the top right corner of the Devices list, look for "1 Device Disabled" and enable it.

@oywino
Copy link
Author

oywino commented Dec 5, 2024

Since I disabled it before re-installing, I had to un-disable it. In the top right corner of the Devices list, look for "1 Device Disabled" and enable it.

You're right. That took me one step further. Now I can at least see the integration. But with no devices found! So, it's unable to find my Alexa Echo Dot. I chose "add entry" and fed all the correct data and got a final "success" message, but to no avail - still nothing found.

@jmzg93
Copy link

jmzg93 commented Dec 5, 2024

Hello!! I had the same problem as you, I followed the last steps, the same thing happened to me as you, but I restarted HA and the integration now works for me.
I hope it helps you.
Greetings.

@oywino
Copy link
Author

oywino commented Dec 6, 2024

No, I've updated the Alexa Integration to 5.0.1 and restarted HA, but still it isn't able to find my Echo Dot., but the integration as such now runs without errors.

@yashijoe
Copy link

yashijoe commented Dec 6, 2024

The same here, but was my fault
You need to re-enable the devices that you likely disabled in order to uninstall the integration

@danielbrunt57
Copy link
Collaborator

danielbrunt57 commented Dec 6, 2024

Either that or your devices are registered in a different domain.
I.e. I can tell AMP to use amazon.com and authentication succeeds but no devices are found since they are registered to my account in amazon.ca.

@oywino
Copy link
Author

oywino commented Dec 6, 2024

k, so how do I find out which domain my Echo Dot is registered in?

@danielbrunt57
Copy link
Collaborator

k, so how do I find out which domain my Echo Dot is registered in?

image

@oywino
Copy link
Author

oywino commented Dec 7, 2024

No, that doesn't work for me. I bought my Echo Dots second hand, and I don't live in the US and we don't have access to Amazon Prime. I have the Amazon App installed on my Samsung SmartPhone and the integration to Home Assistant used to work well for several years. but no more.

@danielbrunt57
Copy link
Collaborator

No, that doesn't work for me. I bought my Echo Dots second hand, and I don't live in the US and we don't have access to Amazon Prime.

Amazon Prime is irrelevant. My amazon.ca shows Prime because I have Prime.

Just log into your account and go to Devices...
Screenshot_20241207_083306_Amazon Shopping

I have the Amazon App installed on my Samsung SmartPhone

And you don't have a PC or a laptop?

and the integration to Home Assistant used to work well for several years. but no more.

Irrelevant

@danielbrunt57
Copy link
Collaborator

No, I've updated the Alexa Integration to 5.0.1 and restarted HA, but still it isn't able to find my Echo Dot., but the integration as such now runs without errors.

Are you getting Error 429: Too Many Requests?
If static GET: https://alexa.amazon.<your_region>/api/phoenix returns 429:Too Many Requests then Zero, zilch, zip, nada, nothing is retrieved from your Amazon account!

2024-12-07 00:27:49.191 DEBUG (MainThread) [alexapy.alexaapi] d********7@g*******m: static GET: https://alexa.amazon.de/api/phoenix returned 429:Too Many Requests:application/json
2024-12-07 00:27:49.191 DEBUG (MainThread) [alexapy.alexaapi] api_calls: 7

2024-12-07 00:27:49.192 INFO (MainThread) [alexapy.alexaapi] Backing off _static_request(...) for 2.0s (alexapy.errors.AlexapyTooManyRequestsError: Too Many Requests)
2024-12-07 00:27:51.265 DEBUG (MainThread) [alexapy.alexaapi] d********7@g*******m: static GET: https://alexa.amazon.de/api/phoenix returned 429:Too Many Requests:application/json
2024-12-07 00:27:51.265 DEBUG (MainThread) [alexapy.alexaapi] api_calls: 8

2024-12-07 00:27:51.266 INFO (MainThread) [alexapy.alexaapi] Backing off _static_request(...) for 4.0s (alexapy.errors.AlexapyTooManyRequestsError: Too Many Requests)
2024-12-07 00:27:55.350 DEBUG (MainThread) [alexapy.alexaapi] d********7@g*******m: static GET: https://alexa.amazon.de/api/phoenix returned 429:Too Many Requests:application/json
2024-12-07 00:27:55.350 DEBUG (MainThread) [alexapy.alexaapi] api_calls: 9

2024-12-07 00:27:55.350 INFO (MainThread) [alexapy.alexaapi] Backing off _static_request(...) for 8.0s (alexapy.errors.AlexapyTooManyRequestsError: Too Many Requests)
2024-12-07 00:28:03.431 DEBUG (MainThread) [alexapy.alexaapi] d********7@g*******m: static GET: https://alexa.amazon.de/api/phoenix returned 429:Too Many Requests:application/json
2024-12-07 00:28:03.432 DEBUG (MainThread) [alexapy.alexaapi] api_calls: 10

2024-12-07 00:28:03.432 INFO (MainThread) [alexapy.alexaapi] Backing off _static_request(...) for 16.0s (alexapy.errors.AlexapyTooManyRequestsError: Too Many Requests)

2024-12-07 00:28:17.967 WARNING (MainThread) [alexapy.helpers] alexaapi.get_guard_details((<alexapy.alexalogin.AlexaLogin object at 0x7f34681810>,), {}): Timeout error occurred accessing AlexaAPI: An exception of type CancelledError occurred. Arguments:
()
2024-12-07 00:28:17.968 DEBUG (MainThread) [alexapy.alexaapi] d********7@g*******m: get_network_details response: None

The result of a successful phoenix GET is the network details:

2024-12-06 16:40:49.196 DEBUG (MainThread) [alexapy.alexaapi] d****l@b******a: static GET: https://alexa.amazon.ca/api/phoenix returned 200:OK:application/json
2024-12-06 16:40:49.196 DEBUG (MainThread) [alexapy.alexaapi] api_calls: 4
2024-12-06 16:40:49.222 DEBUG (MainThread) [alexapy.alexaapi] d****l@b******a: get_network_details response: 

@oywino
Copy link
Author

oywino commented Dec 9, 2024

My Alexa App screen doesn't look anywhere like yours:
Amazon Alexa
It is online and I can control the Echo Dot from the App, but still there's nothing found by Home Assistant:
image
(Of course I do have a PC)

@danielbrunt57
Copy link
Collaborator

The page I posted is Amazon app, not Alexa app.

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

5 participants