alexa_media_player: Broken Home Assistant Configuration in HAss Core 2024.8.0

Describe the bug

Devices unresponsive under any circumstance, HA asking to reconfigure the extension but nothing happens.

To Reproduce

  1. Update Home Assistant Core to version 2024.8.0.
  2. Check the settings under devices and settings.
  3. Click on Alexa Media Player, check that the integration is working (it’s not).
  4. See the error, Home Assistant asks to reconfigure the integration.

Expected behavior

The integration to properly work as it did before updating HAss Core to 2024.8.0. To show all my echo devices as well as Alexa linked ones.

Screenshots

The UI Error is shown below: Screenshot 2024-08-08 alle 15 35 14

System details

  • Home-assistant (version): 2024.8.0
  • alexa_media (version from const.py or HA startup): 4.12.6
  • alexapy (version from pip show alexapy or HA startup):
  • Amazon [2FA is enabled]: Yes

Logs

Don’t know where to find them! Tried to take a look to the log files but nothing seems to be relevant…

Additional context

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Reactions: 19
  • Comments: 108

Most upvoted comments

"requirements": ["alexapy>=1.28.2", "packaging>=20.3", "wrapt>=1.14.0"], 

This worked, change the manifest.json.

Guys, that’s the first time I’ve opened an Issue in Github, I didn’t think I would get so much effort!

At this time, do you think I should close the Issue? I mean, is resolved no?

we have a temp solution but it needs to be fixxed in future versions. I would not close the issue until the team has fixxed it in the final version 😃

Guys, that’s the first time I’ve opened an Issue in Github, I didn’t think I would get so much effort! At this time, do you think I should close the Issue? I mean, is resolved no?

@F5ancesco I’d hold off from closing this issue until this fix is baked in to an official update from Alexa Media Player.

Sorry, please can you tell me where to add this: “requirements”: [“alexapy>=1.28.2”, “packaging>=20.3”, “wrapt>=1.14.0”],

modify this : /homeassistant/custom_components/alexa_media/manifest.json

Now it works for me for two days and without restarting AMP. I used it to announce sensor states via TTS, and after the update I had to restart AMP every few minutes.

  • I don’t use 2FA, (I don’t know if this may be a problem or not)
  • I update cookies.py,
  • And I have the AMP system options like this:

image

Thank you everyone for the help, I came right.

Working 100% now.

I’ve set my system options like this which seems to eliminate the API error: Too many requests which shuts down AMP requiring a reload to restart:

image

Thanks for the really detailed explanation. The alexa media player then is not using to check if Nabu exposed the entities… this is the important thing here.

The auth process works fine so for the most the @petrotti77 issue looks to be a specific scenario.

@sca075 Correct. AMP is only scanning amazon for alexa media capable devices (like Echo) in Alexa. The Alexa Smart Home skill is unrelated to AMP and enables seeing HA entities in the cloud. Home Assistant Cloud (Nabu Casa) makes that skill automatically available versus having to do all of the steps of creating a skill manually.

Do you need some specific data to analyze it?

I’m confused as to what your issue is now…

@danielbrunt57 @sca075

After some testing to solve problems related to AMP integration I found that the “alexa” and “alexa_auth” files contained in homeassistant/.storage/ (which perhaps not everyone has in their configuration) are related to the configuration of Amazon aws to expose HA devices on Alexa. In fact, by removing the “alexa_auth” file (which contains a token) the “alexa” file cannot be changed to true. So I came to the conclusion that they actually have nothing to do with the AMP integration that still doesn’t work for me if I upgrade to HA 2024.8.1.

@petrotti77 this is an “international” community (comprendo la frustrazione, Italiano lo capiscono solo gli Italiani, quindi se non ti dispiace traduco) understanding you are frustrated as I’m Italian please allow me to traslate.

Dopo l'aggiornamento 4.12.7 il problema è stato risolto parzialmente per me. Riesco ad auteticarmi ma le automazioni che integrano le notifiche tramite echo non funzionano e continuano a persistere problemi di riautenticazioni giornaliere. Attualmente l'integrazione alexa media player è fuori uso per me. Sarà possibile tornare ad utilizzare l'itegrazione come prima della versione 2024.8? Se ci sono altri suggerimenti da parte vostra non esiterò a provarli. Grazie.

Text Translated. “After the update to version 4.12.7 the problem was partially solved for me. I can login but the my automatons that are integrating the notifications via echo’s are not working and continue to give problems of re-authentications each day. In this moment “Alexa Media Player” is disabled in my system. I’m thinking to restore the backups before 2024.8.0 if, anyone has any Idea how to solve the problem?”

sca075 advices

  1. please check if you setup the HTTPS connection as earlier posted see up.
  2. I do use the same automations as before and all works well, no issues and I think several users can confirm it too. If you please provide logs of Home Assistant were the errors are popping up, as this looks to be another issue… eventually open another issue after you have read all above on this thread and also others that have been keep open.

Most of the the time the solution is something there under our noses, and I think this issue with the dependencies was managed really well from community point of view and also the authors of this integrations that here I thanks for the fast and prompt respose.

okay, I just deleted the integration since I see that it works well for several of you and when you add it again the tts actually works, we’ll see if it doesn’t fail later 😅

I had to delete the integration and reinstall it which fixed the announcements to work again!

I am using:

AMP version 4.12.7 Home Assistant Core: 2024.8.0 Home Assistant Supervisor: 2024.08.0 Frontend: 20240806.1

Can someone explain what public url it is that needed changed? I don’t have any settings specific to me in the alexa manifest file so is this somewhere else?

In the configuration of alexa media player: Screenshot 2024-08-08 at 18 13 08

The url of your Nabu Casa account or whatever you use to access Home Assistant from aboard. the manifest.json as above is in the config/custom_components/alexa_media/ folder

“requirements”: [“alexapy>=1.28.2”, “packaging>=20.3”, “wrapt>=1.14.0”],

@sca075 Hugest of props—that worked perfectly! 🙌🏻

@sca075

It was the pulic URL! Thanks a lot!

@herden-system I use amazon.de too and work fine, 500 = “Internal Server Error” means that there is some issue on the configuration of your instance, . Probably just reconfigure it and if you did change the mainifest.json as above all should work as usual. Note that it looks it is now required an external (https) url of your home assistant in the config. Hope this can help 😃 Edit: “alexapy==1.28.2” HA will not load properly… don’t know if it was because I mistyped something.

@Shaunpottie you need to SSH inside the machine that has HA installed and locate the data directory like /etc/homeassistant/custom_components/alexa_media/ and then modify that file using a Text Editor like nano

Or simply use Studio Code Server from within HA 😉

Thank you @sca075, that worked - I use Alexa Media Player for so many announcements, playing music, etc, I was (temporarily) lost before you gave us a fix 👍

@Shaunpottie you need to SSH inside the machine that has HA installed and locate the data directory like /etc/homeassistant/custom_components/alexa_media/ and then modify that file using a Text Editor like nano