alandtse / alexa_media_player

This is a custom component to allow control of Amazon Alexa devices in Home Assistant using the unofficial Alexa API.
Apache License 2.0
1.36k stars 263 forks source link

Added 2nd Alexa Account: update_last_called is very slow #2276

Open JensRudolph opened 1 month ago

JensRudolph commented 1 month ago

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 added a second Alexa account to my Alexa Media Player integration and found out that updating the last_called sensor is very slow afterwards. It takes several minutes. I tried many things including adding the email data field to the update_last_called service and deactivating the second account. After deactivating the second account the speeds goes back to 1-3 seconds for updating the last_called sensor. Also reverting the Alexa Media Player integration to another version doesn't help.

To Reproduce

  1. Add a second alexa account.
  2. Run the update_last_called service.
  3. Check the last_called sensor.
  4. Run a command on another alexa device.
  5. Run the update_last_called service.
  6. Check the last_called sensor.
  7. See that it will not change unless you wait several minutes.

Expected behavior

I expected to be able to add more than one account without getting this kind of latency. All devices are on the same network and have a great wireless connection.

Screenshots

No screenshots until now.

System details

Logs I dont know if there are any sensible information in the debug logs of the integration.

Additional context

No

alandtse commented 4 weeks ago

Never had this issue, but not going to create a second account to test it. Let's see if anyone else does and wants to fix it.

wolfwander commented 1 week ago

I don't have a second account but I am facing this issue too for a long time. In sometime in the past I had to remove Alexa account configuration and reconfigure it.