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.44k stars 277 forks source link

notify.alexa_media_last_called_*****_hotmail_com does not always exist #2362

Open geofffarmer opened 1 month ago

geofffarmer commented 1 month ago

Describe the bug

This integration creates a service in my HA called notify.alexa_media_lastcalled****_hotmail_com that I can use to get the last called echo to speak. However, this service does not always exist. This causes my automation that uses the service to get repeatedly flagged as a problem when the service doesn't exist. Can this be fixed?

To Reproduce

I'm not sure

Expected behavior

The service always exists

System details

danielbrunt57 commented 1 month ago
  • alexa_media (version from const.py or HA startup): 4.11.5

Is this still an issue with v4.12.1? FYI, v4.12.2 should be coming soon...

geofffarmer commented 1 month ago

Hi @danielbrunt57

This is still an issue in 4.12.1.

Thank you for looking at this.

danielbrunt57 commented 1 month ago

Can you please try v4.12.5?

geofffarmer commented 1 month ago

Hi @danielbrunt57

I'm sorry to say that it is not fixed by 4.12.5

Do you need any more info?

Thanks for trying. Good luck!

BoGnY commented 1 month ago

same problem.. captcha error

image

Registratore: homeassistant.config_entries
Fonte: config_entries.py:604
Prima occorrenza: 19:54:47 (1 occorrenze)
Ultima registrazione: 19:54:47

Error setting up entry XXXXXXXXXXXXXXXXX - amazon.it for alexa_media
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 604, in async_setup
    result = await component.async_setup_entry(hass, self)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/alexa_media/__init__.py", line 359, in async_setup_entry
    await login.login(cookies=await login.load_cookie())
  File "/usr/local/lib/python3.12/site-packages/alexapy/helpers.py", line 137, in wrapper
    return await func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/alexapy/alexalogin.py", line 687, in login
    post_resp = await self._session.post(
                ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/aiohttp/client.py", line 576, in _request
    raise err_exc_cls(url)
aiohttp.client_exceptions.InvalidUrlClientError: /errors/validateCaptcha
ScottWoolven5 commented 1 month ago

I'm getting the same issue, no longer able to send notifications via my Alexa devices with my automation logging that notify is an unknown action.

I get the same error as above and also a warning:

This error originated from a custom integration.

Logger: alexapy.helpers Source: custom_components/alexa_media/init.py:359 integration: Alexa Media Player (documentation, issues) First occurred: 8 August 2024 at 18:20:49 (2 occurrences) Last logged: 21:25:35

alexalogin.login((<alexapy.alexalogin.AlexaLogin object at 0x7f63741670>,), {'cookies': {'session-id': , 'session-id-time': , 'csrf': , 'ubid-acbuk': , 'session-token': , 'x-acbuk': <Morsel: x-acbuk="ZSEzhOl@TaZwjriDwrY57KOcul2mX3tX"; Path=/>, 'i18n-prefs': , 'lc-acbuk': }}): An error occurred accessing AlexaAPI: An exception of type InvalidUrlClientError occurred. Arguments: (URL('/errors/validateCaptcha'),) alexalogin.login((<alexapy.alexalogin.AlexaLogin object at 0x7f63741670>,), {'cookies': {}}): An error occurred accessing AlexaAPI: An exception of type InvalidUrlClientError occurred. Arguments: (URL('/errors/validateCaptcha'),)

andy-81 commented 1 month ago

I am getting the same error with 4.12.7.

I have a script which updates the last called details but I am getting an error when I try to send to the last called. I have an automation which uses notify.alexa_media_last_called which no longer appears in the actions/services tab of home assistant and throws up an error when the script runs.

BoGnY commented 1 month ago

for me is resolved with 4.12.7.. many others have to delete pickle file in .storage directory, many other have to reconfigure without using amazon.com as url but using their local Amazon site (ex amazon.it, amazon.de, etc)

andy-81 commented 1 month ago

Thanks BoGnY,

deleting the pickle file appears to have done the job for me. Apologies if this was listed somewhere else but perfect job helping me out :)