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.54k stars 291 forks source link

After update today notify.alexa_media no longer shows or works in HA #2117

Closed thorrrr closed 4 months ago

thorrrr commented 1 year 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 have several automation's using notify.alexa_media but after an update it no longer shows or works in HA The service is no longer showing so this part of my automation's no longer work

Logger: homeassistant.helpers.script.websocket_api_script Source: helpers/script.py:1783 First occurred: 16:42:05 (2 occurrences) Last logged: 16:47:07

websocket_api script: Error executing script. Service not found for call_service at pos 1: Unable to find service notify.alexa_media

Logger: homeassistant.components.websocket_api.http.connection Source: components/websocket_api/connection.py:268 Integration: Home Assistant WebSocket API (documentation, issues) First occurred: 16:42:05 (2 occurrences) Last logged: 16:47:07

[139756669377344] Error handling message: Unable to find service notify.alexa_media (unknown_error) Dale from 192.168.23.34 (Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/119.0.0.0 Safari/537.36)

image

svenht commented 1 year ago

Same problem here :-(

ZeloNoleZ commented 1 year ago

Same here

Update: It's working again.

VictoriousCupid commented 1 year ago

For me it works half the time.

MidnightLink commented 1 year ago

I'm wondering it they were having issues on the API's end as these all happened near the same time

This error originated from a custom integration.

Logger: custom_components.alexa_media
Source: helpers/update_coordinator.py:322
Integration: Alexa Media Player (documentation, issues)
First occurred: 10:38:04 AM (1 occurrences)
Last logged: 10:38:04 AM
Error fetching alexa_media data: Error communicating with API:

Logger: alexapy.helpers
Source: runner.py:188
First occurred: 10:38:04 AM (4 occurrences)
Last logged: 10:38:04 AM

alexaapi.get_devices((<alexapy.alexalogin.AlexaLogin object at 0x7f8651eefe10>,), {}): Timeout error occurred accessing AlexaAPI: An exception of type CancelledError occurred. Arguments: ()
alexaapi.get_bluetooth((<alexapy.alexalogin.AlexaLogin object at 0x7f8651eefe10>,), {}): Timeout error occurred accessing AlexaAPI: An exception of type CancelledError occurred. Arguments: ()
alexaapi.get_device_preferences((<alexapy.alexalogin.AlexaLogin object at 0x7f8651eefe10>,), {}): Timeout error occurred accessing AlexaAPI: An exception of type CancelledError occurred. Arguments: ()
alexaapi.get_dnd_state((<alexapy.alexalogin.AlexaLogin object at 0x7f8651eefe10>,), {}): Timeout error occurred accessing AlexaAPI: An exception of type CancelledError occurred. Arguments: ()
Logger: homeassistant.components.alexa.state_report
Source: components/alexa/state_report.py:376
Integration: Amazon Alexa (documentation, issues)
First occurred: 10:37:57 AM (2 occurrences)
Last logged: 10:38:11 AM

Timeout sending report to Alexa for sensor.temperature_humidity_sensor_library_attic_air_temperature
Timeout sending report to Alexa for sensor.temperature_humidity_sensor_top_attic_air_temperature
alandtse commented 1 year ago

Please fill out the full template. You're not providing all the required info.

andregoncalvespires commented 1 year ago

Same here

edzards commented 1 year ago

same for me

andregoncalvespires commented 10 months ago

I already use the alexa_media.update_last_caled service in all scripts, but I can't understand why some echos don't have last_called and the last_called_timestamp and last_called_summary attributes updated. I believe this is the reason why it is not working correctly.

image

mrai64 commented 9 months ago

A week ago also for me. Was my ALL notify.* on HA...

Gheben commented 9 months ago

Guys, It seems that I found a solution (temp solution?) Comment media_player and api in configuration.yaml as in the image below, restart HA and works again!

Screenshot_20240225_084056_Home Assistant

daxxio commented 9 months ago

maybe a coinicidence, but just wanted to add that for me it worked after commenting these lines and ass Gheben mentioned, the media_player:

alexa:
  smart_home:
    locale: de-DE
    #endpoint: 
    #client_id: 
    #client_secret:
shamimrahim commented 7 months ago

I updated to latest version of Homeassistant yesterday and the notify.alexa services had disappeared. I restored to an older version and they came back. I checked for @daxxio and @Gheben's fixes but they did not work for me.

makgiber1984 commented 7 months ago

Same problem here, for two weeks the notify.alexa_media_xxx services have been randomly disappearing, sometimes they recover when restarting, but it has not been recovered for days. Any idea? Capture de pantalla 2024-04-23 a las 18 55 36 Captura de pantalla 2024-04-23 a las 18 56 33

mirlorojiblanco commented 7 months ago

The same here :-(. What is the solution?

github-actions[bot] commented 4 months ago

The issue has received no activity for 60 days and will be closed in a week.

johntdyer commented 3 months ago

Same issue for me....

WLammert commented 2 months ago

maybe a coinicidence, but just wanted to add that for me it worked after commenting these lines and ass Gheben mentioned, the media_player:

alexa:
  smart_home:
    locale: de-DE
    #endpoint: 
    #client_id: 
    #client_secret:

Thank you @daxxio -> you saved my life! So after having the same issue after every update I just edited the missing locale as you described (which by the way is only optional in the documentation) and everything is now working as intended!

danielbrunt57 commented 2 months ago

For everyone's information, this alexa_media custom component has absolutely nothing to do with the Amazon Alexa Smart Home Skill which makes HA entities appear in the Amazon Alexa app when you say "Alexa, discover devices". The alexa: key in configuration.yaml is only required when you manually configure that Smart Home Skill instead of using Nabu Casa Cloud and is how I have my Smart Home skill set up:

alexa:
  smart_home:
    locale: en-CA
    endpoint: https://api.amazonalexa.com/v3/events
    client_id: amzn1.application-oa2-client.9c<redacted>cd
    client_secret: amzn1.oa2-cs.v1.56<redacted>48
    filter:
      include_domains:
        - light
        - cover
        - lock
...etc.

To reiterate: That smart home skill integration is completely separate and unrelated to this integration! Also, media_player is only used for the Universal Media Player integration. If you only added the key without a platform, I could see where that could cause HA to refuse to permit AMP to add itself to that existing unconfigured media_player integration (Universal).

media_player:
  - platform: universal
    name: MEDIA_PLAYER_NAME
    children:
      - media_player.CHILD_1_ID
      - media_player.CHILD_2_ID
    commands:
      turn_on:
        action: SERVICE
        data: SERVICE_DATA
      turn_off:
        action: SERVICE
        data: SERVICE_DATA
      volume_up:
        action: SERVICE
        data: SERVICE_DATA

api: is only used for the Home Assistant API to expose a RESTful API when running headless (i.e. you're not using the fronend in your setup)

The legacy YAML setup documentation for this integration is:

Configuration.yaml While this still works, it will be deprecated in the future. Please use Integrations. Once the files are downloaded, you’ll need to update your config to include the following under the alexa_media domain:

alexa_media:
  accounts:
    - email: !secret amazon_user
      password: !secret amazon_password
      url: amazon.com