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 278 forks source link

Unable to find service notify/alexa_media #459

Closed sephrioth closed 4 years ago

sephrioth commented 4 years ago

Describe the bug Every restart to HA will cause this error

homeassistant.exceptions.ServiceNotFound: Unable to find service notify/alexa_media

To Reproduce Steps to reproduce the behavior: Restart HA

Expected behavior A clear and concise description of what you expected to happen.

Screenshots If applicable, add screenshots to help explain your problem.

System details

Logs

ERROR (MainThread) [homeassistant.core] Error doing job: Task exception was never retrieved Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 190, in async_run await self._handle_action(action, variables, context) File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 274, in _handle_action await self._actions[_determine_action(action)](action, variables, context) File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 357, in _async_call_service context=context, File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 97, in async_call_from_config domain, service_name, service_data, blocking=blocking, context=context File "/usr/src/homeassistant/homeassistant/core.py", line 1211, in async_call raise ServiceNotFound(domain, service) from None homeassistant.exceptions.ServiceNotFound: Unable to find service notify/alexa_media

Additional context After remove the previous alexa_media.xxx@gmail.com.pickle file, then restart HA and add Alexa again can make it work again. But restart HA will reproduce this issue.

alandtse commented 4 years ago

Please provide startup logs. You should see some logs discussing setting up the notify service.

sephrioth commented 4 years ago

Please provide startup logs. You should see some logs discussing setting up the notify service.

Here it is.

2019-11-11 03:16:07 stdout  homeassistant.exceptions.ServiceNotFound: Unable to find service notify/alexa_media[0m
2019-11-11 03:16:07 stdout      raise ServiceNotFound(domain, service) from None
2019-11-11 03:16:07 stdout    File "/usr/src/homeassistant/homeassistant/core.py", line 1211, in async_call
2019-11-11 03:16:07 stdout      domain, service_name, service_data, blocking=blocking, context=context
2019-11-11 03:16:07 stdout    File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 97, in async_call_from_config
2019-11-11 03:16:07 stdout      context=context,
2019-11-11 03:16:07 stdout    File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 357, in _async_call_service
2019-11-11 03:16:07 stdout      await self._actions[_determine_action(action)](action, variables, context)
2019-11-11 03:16:07 stdout    File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 274, in _handle_action
2019-11-11 03:16:07 stdout      await self._handle_action(action, variables, context)
2019-11-11 03:16:07 stdout    File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 190, in async_run
2019-11-11 03:16:07 stdout  Traceback (most recent call last):
2019-11-11 03:16:07 stdout  [31m2019-11-11 11:16:07 ERROR (MainThread) [homeassistant.core] Error doing job: Task exception was never retrieved[0m
2019-11-11 03:14:50 stdout  }[0m
2019-11-11 03:14:50 stdout      "id": 1
2019-11-11 03:14:50 stdout      ],
2019-11-11 03:14:50 stdout          "Display Is Turned off"
2019-11-11 03:14:50 stdout          40005,
2019-11-11 03:14:50 stdout      "error": [
2019-11-11 03:14:50 stdout  [31m2019-11-11 11:14:50 ERROR (SyncWorker_8) [braviarc.braviarc] JSON request error:{
2019-11-11 03:14:28 stdout  }[0m
2019-11-11 03:14:28 stdout      "id": 1
2019-11-11 03:14:28 stdout      ],
2019-11-11 03:14:28 stdout          "Display Is Turned off"
2019-11-11 03:14:28 stdout          40005,
2019-11-11 03:14:28 stdout      "error": [
2019-11-11 03:14:28 stdout  [31m2019-11-11 11:14:28 ERROR (SyncWorker_9) [braviarc.braviarc] JSON request error:{
2019-11-11 03:14:08 stdout  [31m2019-11-11 11:14:08 ERROR (MainThread) [homeassistant.components.automation] Error while executing automation automation.start_homeassistant. Service not found for call_service at pos 2: Unable to find service notify/alexa_media[0m
2019-11-11 03:14:04 stdout  AttributeError: 'bool' object has no attribute 'hass'[0m
2019-11-11 03:14:04 stdout      notify_service.hass = hass
2019-11-11 03:14:04 stdout    File "/usr/src/homeassistant/homeassistant/components/notify/__init__.py", line 96, in async_setup_platform
2019-11-11 03:14:04 stdout      await async_setup_platform(platform, discovery_info=info)
2019-11-11 03:14:04 stdout    File "/usr/src/homeassistant/homeassistant/components/notify/__init__.py", line 162, in async_platform_discovered
2019-11-11 03:14:04 stdout  Traceback (most recent call last):
2019-11-11 03:14:04 stdout  [31m2019-11-11 11:14:03 ERROR (MainThread) [homeassistant.core] Error doing job: Task exception was never retrieved[0m
2019-11-11 03:13:34 stdout  [33m2019-11-11 11:13:34 WARNING (MainThread) [homeassistant.components.switch] Setup of platform alexa_media is taking over 10 seconds.[0m
2019-11-11 03:13:33 stdout  [33m2019-11-11 11:13:33 WARNING (MainThread) [homeassistant.components.sensor] Setup of platform alexa_media is taking over 10 seconds.[0m
2019-11-11 03:13:30 stdout  [31m2019-11-11 11:13:29 ERROR (SyncWorker_0) [braviarc.braviarc] [W] Exception: HTTPConnectionPool(host='192.168.199.67', port=80): Max retries exceeded with url: /sony/accessControl (Caused by ConnectTimeoutError(<urllib3.connection.HTTPConnection object at 0x7f06efe4f690>, 'Connection to 192.168.199.67 timed out. (connect timeout=10)'))[0m
2019-11-11 03:13:29 stdout  [33m2019-11-11 11:13:29 WARNING (MainThread) [homeassistant.components.media_player] Setup of platform braviatv is taking over 10 seconds.[0m
2019-11-11 03:11:59 stdout  [31m2019-11-11 11:11:59 ERROR (SyncWorker_1) [homeassistant.components.ios.notify] The notify.ios platform was loaded but no devices exist! Please check the documentation at https://home-assistant.io/ecosystem/ios/notifications/ for more information[0m
2019-11-11 03:11:59 stdout  AttributeError: 'bool' object has no attribute 'hass'[0m
2019-11-11 03:11:59 stdout      notify_service.hass = hass
2019-11-11 03:11:59 stdout    File "/usr/src/homeassistant/homeassistant/components/notify/__init__.py", line 96, in async_setup_platform
2019-11-11 03:11:59 stdout  Traceback (most recent call last):
2019-11-11 03:11:59 stdout  [31m2019-11-11 11:11:58 ERROR (MainThread) [homeassistant.core] Error doing job: Task exception was never retrieved[0m
2019-11-11 03:11:26 stdout  [33m2019-11-11 11:11:26 WARNING (MainThread) [homeassistant.loader] You are using a custom integration for colorfulclouds which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you do experience issues with Home Assistant.[0m
2019-11-11 03:10:45 stdout  [33m2019-11-11 11:10:45 WARNING (MainThread) [homeassistant.loader] You are using a custom integration for xiaomi_miio_airconditioningcompanion which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you do experience issues with Home Assistant.[0m
2019-11-11 03:10:40 stdout  [32m2019-11-11 11:10:40 INFO (MainThread) [homeassistant.setup] Setting up logger[0m
2019-11-11 03:10:40 stdout  [32m2019-11-11 11:10:40 INFO (MainThread) [homeassistant.bootstrap] Setting up {'system_log', 'logger'}[0m
2019-11-11 03:10:40 stdout  [32m2019-11-11 11:10:40 INFO (SyncWorker_2) [homeassistant.loader] Loaded ifttt from homeassistant.components.ifttt[0m
2019-11-11 03:10:40 stdout  [32m2019-11-11 11:10:40 INFO (SyncWorker_9) [homeassistant.loader] Loaded system_log from homeassistant.components.system_log[0m
2019-11-11 03:10:40 stdout  [32m2019-11-11 11:10:40 INFO (SyncWorker_4) [homeassistant.loader] Loaded onboarding from homeassistant.components.onboarding[0m
2019-11-11 03:10:40 stdout  [32m2019-11-11 11:10:40 INFO (SyncWorker_7) [homeassistant.loader] Loaded lovelace from homeassistant.components.lovelace[0m
2019-11-11 03:10:40 stdout  [32m2019-11-11 11:10:40 INFO (MainThread) [homeassistant.setup] Setup of domain persistent_notification took 0.0 seconds.[0m
2019-11-11 03:10:40 stdout  [32m2019-11-11 11:10:40 INFO (MainThread) [homeassistant.setup] Setting up persistent_notification[0m
2019-11-11 03:10:40 stdout  [32m2019-11-11 11:10:40 INFO (SyncWorker_3) [homeassistant.loader] Loaded device_automation from homeassistant.components.device_automation[0m
2019-11-11 03:10:40 stdout  [32m2019-11-11 11:10:40 INFO (MainThread) [homeassistant.setup] Setup of domain homeassistant took 0.0 seconds.[0m
2019-11-11 03:10:40 stdout  [32m2019-11-11 11:10:40 INFO (MainThread) [homeassistant.setup] Setting up homeassistant[0m
2019-11-11 03:10:40 stdout  [32m2019-11-11 11:10:40 INFO (SyncWorker_0) [homeassistant.loader] Loaded adguard from homeassistant.components.adguard[0m
2019-11-11 03:10:40 stdout  [32m2019-11-11 11:10:40 INFO (SyncWorker_1) [homeassistant.loader] Loaded auth from homeassistant.components.auth[0m
2019-11-11 03:10:40 stdout  [32m2019-11-11 11:10:40 INFO (SyncWorker_9) [homeassistant.loader] Loaded persistent_notification from homeassistant.components.persistent_notification[0m
2019-11-11 03:10:40 stdout  [32m2019-11-11 11:10:40 INFO (SyncWorker_5) [homeassistant.loader] Loaded cloud from homeassistant.components.cloud[0m
2019-11-11 03:10:40 stdout  [32m2019-11-11 11:10:40 INFO (SyncWorker_4) [homeassistant.loader] Loaded automation from homeassistant.components.automation[0m
2019-11-11 03:10:40 stdout  [32m2019-11-11 11:10:40 INFO (SyncWorker_8) [homeassistant.loader] Loaded configurator from homeassistant.components.configurator[0m
2019-11-11 03:10:40 stdout  [32m2019-11-11 11:10:40 INFO (SyncWorker_7) [homeassistant.loader] Loaded webhook from homeassistant.components.webhook[0m
2019-11-11 03:10:40 stdout  [32m2019-11-11 11:10:40 INFO (SyncWorker_3) [homeassistant.loader] Loaded homeassistant from homeassistant.components.homeassistant[0m
2019-11-11 03:10:40 stdout  [32m2019-11-11 11:10:40 INFO (SyncWorker_6) [homeassistant.loader] Loaded mobile_app from homeassistant.components.mobile_app[0m
2019-11-11 03:10:40 stdout  [32m2019-11-11 11:10:40 INFO (SyncWorker_8) [homeassistant.loader] Loaded device_tracker from homeassistant.components.device_tracker[0m
2019-11-11 03:10:40 stdout  [32m2019-11-11 11:10:40 INFO (SyncWorker_5) [homeassistant.loader] Loaded ios from homeassistant.components.ios[0m
2019-11-11 03:10:40 stdout  [32m2019-11-11 11:10:40 INFO (SyncWorker_7) [homeassistant.loader] Loaded homekit from homeassistant.components.homekit[0m
2019-11-11 03:10:40 stdout  [32m2019-11-11 11:10:40 INFO (SyncWorker_1) [homeassistant.loader] Loaded timer from homeassistant.components.timer[0m
2019-11-11 03:10:40 stdout  [32m2019-11-11 11:10:40 INFO (SyncWorker_9) [homeassistant.loader] Loaded plex from homeassistant.components.plex[0m
2019-11-11 03:10:40 stdout  [32m2019-11-11 11:10:40 INFO (SyncWorker_3) [homeassistant.loader] Loaded xiaomi_aqara from homeassistant.components.xiaomi_aqara[0m
2019-11-11 03:10:40 stdout  [32m2019-11-11 11:10:40 INFO (SyncWorker_0) [homeassistant.loader] Loaded logbook from homeassistant.components.logbook[0m
2019-11-11 03:10:40 stdout  [32m2019-11-11 11:10:40 INFO (SyncWorker_6) [homeassistant.loader] Loaded yeelight from homeassistant.components.yeelight[0m
2019-11-11 03:10:40 stdout  [32m2019-11-11 11:10:40 INFO (SyncWorker_8) [homeassistant.loader] Loaded updater from homeassistant.components.updater[0m
2019-11-11 03:10:40 stdout  [32m2019-11-11 11:10:40 INFO (SyncWorker_5) [homeassistant.loader] Loaded alexa from homeassistant.components.alexa[0m
2019-11-11 03:10:40 stdout  [32m2019-11-11 11:10:40 INFO (SyncWorker_4) [homeassistant.loader] Loaded cast from homeassistant.components.cast[0m
2019-11-11 03:10:40 stdout  [32m2019-11-11 11:10:40 INFO (SyncWorker_9) [homeassistant.loader] Loaded climate from homeassistant.components.climate[0m
2019-11-11 03:10:40 stdout  [32m2019-11-11 11:10:40 INFO (SyncWorker_6) [homeassistant.loader] Loaded panel_iframe from homeassistant.components.panel_iframe[0m
2019-11-11 03:10:40 stdout  [32m2019-11-11 11:10:40 INFO (SyncWorker_3) [homeassistant.loader] Loaded weather from homeassistant.components.weather[0m
2019-11-11 03:10:40 stdout  [32m2019-11-11 11:10:40 INFO (SyncWorker_1) [homeassistant.loader] Loaded cert_expiry from homeassistant.components.cert_expiry[0m
2019-11-11 03:10:40 stdout  [32m2019-11-11 11:10:40 INFO (SyncWorker_0) [homeassistant.loader] Loaded apple_tv from homeassistant.components.apple_tv[0m
2019-11-11 03:10:40 stdout  [32m2019-11-11 11:10:40 INFO (SyncWorker_8) [homeassistant.loader] Loaded config from homeassistant.components.config[0m
2019-11-11 03:10:40 stdout  [32m2019-11-11 11:10:40 INFO (SyncWorker_7) [homeassistant.loader] Loaded ps4 from homeassistant.components.ps4[0m
2019-11-11 03:10:40 stdout  [32m2019-11-11 11:10:40 INFO (SyncWorker_0) [homeassistant.loader] Loaded sun from homeassistant.components.sun[0m
2019-11-11 03:10:40 stdout  [32m2019-11-11 11:10:40 INFO (SyncWorker_0) [homeassistant.loader] Loaded light from homeassistant.components.light[0m
2019-11-11 03:10:40 stdout  [32m2019-11-11 11:10:40 INFO (SyncWorker_4) [homeassistant.loader] Loaded zeroconf from homeassistant.components.zeroconf[0m
2019-11-11 03:10:40 stdout  [32m2019-11-11 11:10:40 INFO (SyncWorker_5) [homeassistant.loader] Loaded geofency from homeassistant.components.geofency[0m
2019-11-11 03:10:40 stdout  [32m2019-11-11 11:10:40 INFO (SyncWorker_6) [homeassistant.loader] Loaded system_health from homeassistant.components.system_health[0m
2019-11-11 03:10:40 stdout  [32m2019-11-11 11:10:40 INFO (SyncWorker_4) [homeassistant.loader] Loaded remote from homeassistant.components.remote[0m
2019-11-11 03:10:40 stdout  [32m2019-11-11 11:10:40 INFO (SyncWorker_9) [homeassistant.loader] Loaded websocket_api from homeassistant.components.websocket_api[0m
2019-11-11 03:10:40 stdout  [32m2019-11-11 11:10:40 INFO (SyncWorker_9) [homeassistant.loader] Loaded vultr from homeassistant.components.vultr[0m
2019-11-11 03:10:40 stdout  [32m2019-11-11 11:10:40 INFO (SyncWorker_3) [homeassistant.loader] Loaded frontend from homeassistant.components.frontend[0m
2019-11-11 03:10:40 stdout  [32m2019-11-11 11:10:40 INFO (SyncWorker_1) [homeassistant.loader] Loaded history from homeassistant.components.history[0m
2019-11-11 03:10:40 stdout  [32m2019-11-11 11:10:40 INFO (SyncWorker_2) [homeassistant.loader] Loaded logger from homeassistant.components.logger[0m
2019-11-11 03:10:40 stdout  [32m2019-11-11 11:10:40 INFO (SyncWorker_8) [homeassistant.loader] Loaded switch from homeassistant.components.switch[0m
2019-11-11 03:10:40 stdout  [32m2019-11-11 11:10:40 INFO (SyncWorker_7) [homeassistant.loader] Loaded input_boolean from homeassistant.components.input_boolean[0m
2019-11-11 03:10:40 stdout  [32m2019-11-11 11:10:40 INFO (SyncWorker_3) [homeassistant.loader] Loaded recorder from homeassistant.components.recorder[0m
2019-11-11 03:10:40 stdout  [32m2019-11-11 11:10:40 INFO (SyncWorker_0) [homeassistant.loader] Loaded binary_sensor from homeassistant.components.binary_sensor[0m
2019-11-11 03:10:40 stdout  [32m2019-11-11 11:10:40 INFO (SyncWorker_5) [homeassistant.loader] Loaded notify from homeassistant.components.notify[0m
2019-11-11 03:10:40 stdout  [32m2019-11-11 11:10:40 INFO (SyncWorker_6) [homeassistant.loader] Loaded sonos from homeassistant.components.sonos[0m
2019-11-11 03:10:40 stdout  [32m2019-11-11 11:10:40 INFO (SyncWorker_7) [homeassistant.loader] Loaded tts from homeassistant.components.tts[0m
2019-11-11 03:10:40 stdout  [32m2019-11-11 11:10:40 INFO (SyncWorker_0) [homeassistant.loader] Loaded media_player from homeassistant.components.media_player[0m
2019-11-11 03:10:40 stdout  [32m2019-11-11 11:10:40 INFO (SyncWorker_5) [homeassistant.loader] Loaded discovery from homeassistant.components.discovery[0m
2019-11-11 03:10:40 stdout  [32m2019-11-11 11:10:40 INFO (SyncWorker_9) [homeassistant.loader] Loaded api from homeassistant.components.api[0m
2019-11-11 03:10:39 stdout  [32m2019-11-11 11:10:39 INFO (SyncWorker_4) [homeassistant.loader] Loaded ssdp from homeassistant.components.ssdp[0m
2019-11-11 03:10:39 stdout  [32m2019-11-11 11:10:39 INFO (SyncWorker_2) [homeassistant.loader] Loaded map from homeassistant.components.map[0m
2019-11-11 03:10:39 stdout  [32m2019-11-11 11:10:39 INFO (SyncWorker_1) [homeassistant.loader] Loaded http from homeassistant.components.http[0m
2019-11-11 03:10:39 stdout  [32m2019-11-11 11:10:39 INFO (SyncWorker_8) [homeassistant.loader] Loaded sensor from homeassistant.components.sensor[0m
2019-11-11 03:10:39 stdout  [32m2019-11-11 11:10:39 INFO (SyncWorker_3) [homeassistant.loader] Loaded zone from homeassistant.components.zone[0m
2019-11-11 03:10:39 stdout  [32m2019-11-11 11:10:39 INFO (SyncWorker_6) [homeassistant.loader] Loaded google_assistant from homeassistant.components.google_assistant[0m
2019-11-11 03:10:39 stdout  [33m2019-11-11 11:10:39 WARNING (MainThread) [homeassistant.loader] You are using a custom integration for hacs which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you do experience issues with Home Assistant.[0m
2019-11-11 03:10:39 stdout  [33m2019-11-11 11:10:39 WARNING (MainThread) [homeassistant.loader] You are using a custom integration for alexa_media which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you do experience issues with Home Assistant.[0m
2019-11-11 03:10:39 stdout  [32m2019-11-11 11:10:39 INFO (SyncWorker_3) [homeassistant.loader] Loaded input_text from homeassistant.components.input_text[0m
2019-11-11 03:10:39 stdout  [32m2019-11-11 11:10:39 INFO (SyncWorker_4) [homeassistant.loader] Loaded group from homeassistant.components.group[0m
2019-11-11 03:10:39 stdout  [32m2019-11-11 11:10:39 INFO (SyncWorker_6) [homeassistant.loader] Loaded script from homeassistant.components.script[0m
2019-11-11 03:10:38 stdout  [32m2019-11-11 11:10:38 INFO (SyncWorker_5) [homeassistant.loader] Loaded input_select from homeassistant.components.input_select[0m
2019-11-11 03:10:38 stdout  [32m2019-11-11 11:10:38 INFO (SyncWorker_1) [homeassistant.loader] Loaded hacs from custom_components.hacs[0m
2019-11-11 03:10:38 stdout  [32m2019-11-11 11:10:38 INFO (SyncWorker_0) [homeassistant.loader] Loaded colorfulclouds from custom_components.colorfulclouds[0m
2019-11-11 03:10:38 stdout  [32m2019-11-11 11:10:38 INFO (SyncWorker_3) [homeassistant.loader] Loaded xiaomi_miio_airconditioningcompanion from custom_components.xiaomi_miio_airconditioningcompanion[0m
2019-11-11 03:10:38 stdout  [32m2019-11-11 11:10:38 INFO (SyncWorker_2) [homeassistant.loader] Loaded alexa_media from custom_components.alexa_media[0m
2019-11-11 03:10:34 stdout  Config directory: /config
2019-11-11 03:10:21 stdout  starting version 3.2.8
alandtse commented 4 years ago

Please enable the logger for alexa_media. It will give more detail about how it's failing.

sephrioth commented 4 years ago

Please enable the logger for alexa_media. It will give more detail about how it's failing.


2019-11-14 04:30:37 stdout  [36m2019-11-14 12:30:37 DEBUG (MainThread) [custom_components.alexa_media.media_player] Sephrioth's Echo Dot: Last_called check: self: G************NWE reported: G************NWE[0m
2019-11-14 04:30:37 stdout  [36m2019-11-14 12:30:37 DEBUG (MainThread) [custom_components.alexa_media.media_player] a********e@g*******m: Refreshing Sephrioth's Echo Dot[0m
2019-11-14 04:30:37 stdout  [36m2019-11-14 12:30:37 DEBUG (MainThread) [custom_components.alexa_media.media_player] a********e@g*******m: No PUSH_AUDIO_PLAYER_STATE in dict_keys(['PUSH_EQUALIZER_STATE_CHANGE']); forcing refresh[0m
2019-11-14 04:30:37 stdout  [36m2019-11-14 12:30:37 DEBUG (MainThread) [custom_components.alexa_media] Updating media_player availability {'destinationUserId': 'A*********ULF', 'bass': 0, 'treble': 0, 'dopplerId': {'deviceSerialNumber': 'G************NWE', 'deviceType': 'A3S5BH2HU6VAYF'}, 'midrange': 0}[0m
2019-11-14 04:30:37 stdout  [36m2019-11-14 12:30:37 DEBUG (MainThread) [custom_components.alexa_media] Adding PUSH_EQUALIZER_STATE_CHANGE to seen_commands: {'PUSH_EQUALIZER_STATE_CHANGE': 1573705837.482054}[0m
2019-11-14 04:30:37 stdout  [36m2019-11-14 12:30:37 DEBUG (MainThread) [custom_components.alexa_media] a********e@g*******m: Received websocket command: PUSH_EQUALIZER_STATE_CHANGE : {'destinationUserId': 'A*********ULF', 'bass': 0, 'treble': 0, 'dopplerId': {'deviceSerialNumber': 'G************NWE', 'deviceType': 'A3S5BH2HU6VAYF'}, 'midrange': 0}[0m
2019-11-14 04:17:25 stdout  homeassistant.exceptions.ServiceNotFound: Unable to find service notify/alexa_media[0m
2019-11-14 04:17:25 stdout      raise ServiceNotFound(domain, service) from None
2019-11-14 04:17:25 stdout    File "/usr/src/homeassistant/homeassistant/core.py", line 1211, in async_call
2019-11-14 04:17:25 stdout      domain, service_name, service_data, blocking=blocking, context=context
2019-11-14 04:17:25 stdout    File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 97, in async_call_from_config
2019-11-14 04:17:25 stdout      context=context,
2019-11-14 04:17:25 stdout    File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 357, in _async_call_service
2019-11-14 04:17:25 stdout      await self._actions[_determine_action(action)](action, variables, context)
2019-11-14 04:17:25 stdout    File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 274, in _handle_action
2019-11-14 04:17:25 stdout      await self._handle_action(action, variables, context)
2019-11-14 04:17:25 stdout    File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 190, in async_run
2019-11-14 04:17:25 stdout  Traceback (most recent call last):
2019-11-14 04:17:25 stdout  [31m2019-11-14 12:17:25 ERROR (MainThread) [homeassistant.core] Error doing job: Task exception was never retrieved[0m
2019-11-14 04:15:28 stdout  [36m2019-11-14 12:15:28 DEBUG (MainThread) [custom_components.alexa_media.media_player] Disabling polling for Sephrioth's Echo Dot[0m
2019-11-14 04:15:26 stdout  [31m2019-11-14 12:15:26 ERROR (MainThread) [homeassistant.components.automation] Error while executing automation automation.start_homeassistant. Service not found for call_service at pos 2: Unable to find service notify/alexa_media[0m
2019-11-14 04:15:23 stdout  [36m2019-11-14 12:15:23 DEBUG (MainThread) [custom_components.alexa_media.media_player] Sephrioth's Echo Dot: Last_called check: self: G************NWE reported: G************NWE[0m
2019-11-14 04:15:23 stdout  [36m2019-11-14 12:15:23 DEBUG (MainThread) [custom_components.alexa_media.media_player] a********e@g*******m: Refreshing Sephrioth's Echo Dot[0m
2019-11-14 04:15:21 stdout  AttributeError: 'bool' object has no attribute 'hass'[0m
2019-11-14 04:15:21 stdout      notify_service.hass = hass
2019-11-14 04:15:21 stdout    File "/usr/src/homeassistant/homeassistant/components/notify/__init__.py", line 96, in async_setup_platform
2019-11-14 04:15:21 stdout      await async_setup_platform(platform, discovery_info=info)
2019-11-14 04:15:21 stdout    File "/usr/src/homeassistant/homeassistant/components/notify/__init__.py", line 162, in async_platform_discovered
2019-11-14 04:15:21 stdout  Traceback (most recent call last):
2019-11-14 04:15:21 stdout  [31m2019-11-14 12:15:21 ERROR (MainThread) [homeassistant.core] Error doing job: Task exception was never retrieved[0m
2019-11-14 04:15:04 stdout  [36m2019-11-14 12:15:04 DEBUG (MainThread) [custom_components.alexa_media.helpers] alexa_media.switch.async_setup_platform: Try: 2/5 after waiting 10 seconds result: True[0m
2019-11-14 04:15:04 stdout  [36m2019-11-14 12:15:04 DEBUG (MainThread) [custom_components.alexa_media.helpers] a********e@g*******m: Excluding device: <Entity Sephrioth's Echo Dot repeat switch: off>[0m
2019-11-14 04:15:04 stdout  [36m2019-11-14 12:15:04 DEBUG (MainThread) [custom_components.alexa_media.helpers] a********e@g*******m: Excluding device: <Entity Sephrioth's Echo Dot shuffle switch: off>[0m
2019-11-14 04:15:04 stdout  [36m2019-11-14 12:15:04 DEBUG (MainThread) [custom_components.alexa_media.helpers] a********e@g*******m: Excluding device: <Entity Sephrioth's Echo Dot do not disturb switch: off>[0m
2019-11-14 04:15:04 stdout  [36m2019-11-14 12:15:04 DEBUG (MainThread) [custom_components.alexa_media.switch] a********e@g*******m: Found G************NWE repeat switch with status: False[0m
2019-11-14 04:15:04 stdout  [36m2019-11-14 12:15:04 DEBUG (MainThread) [custom_components.alexa_media.switch] a********e@g*******m: Found G************NWE shuffle switch with status: False[0m
2019-11-14 04:15:04 stdout  [36m2019-11-14 12:15:04 DEBUG (MainThread) [custom_components.alexa_media.switch] a********e@g*******m: Found G************NWE dnd switch with status: False[0m
2019-11-14 04:15:04 stdout  [36m2019-11-14 12:15:04 DEBUG (MainThread) [custom_components.alexa_media.switch] a********e@g*******m: Loading switches[0m
2019-11-14 04:15:04 stdout  [33m2019-11-14 12:15:04 WARNING (MainThread) [homeassistant.components.switch] Setup of platform alexa_media is taking over 10 seconds.[0m
2019-11-14 04:15:03 stdout  [36m2019-11-14 12:15:03 DEBUG (MainThread) [custom_components.alexa_media.helpers] alexa_media.sensor.async_setup_platform: Try: 2/5 after waiting 10 seconds result: True[0m
2019-11-14 04:15:03 stdout  [36m2019-11-14 12:15:03 DEBUG (MainThread) [custom_components.alexa_media.helpers] a********e@g*******m: Excluding device: <Entity Sephrioth's Echo Dot next Reminder: unavailable>[0m
2019-11-14 04:15:03 stdout  [36m2019-11-14 12:15:03 DEBUG (MainThread) [custom_components.alexa_media.helpers] a********e@g*******m: Excluding device: <Entity Sephrioth's Echo Dot next Timer: unavailable>[0m
2019-11-14 04:15:03 stdout  [36m2019-11-14 12:15:03 DEBUG (MainThread) [custom_components.alexa_media.helpers] a********e@g*******m: Excluding device: <Entity Sephrioth's Echo Dot next Alarm: unavailable>[0m
2019-11-14 04:15:03 stdout  [36m2019-11-14 12:15:03 DEBUG (MainThread) [custom_components.alexa_media.sensor] a********e@g*******m: Found G************NWE Reminder sensor (0) with next: unavailable[0m
2019-11-14 04:15:03 stdout  [36m2019-11-14 12:15:03 DEBUG (MainThread) [custom_components.alexa_media.sensor] a********e@g*******m: Found G************NWE Timer sensor (0) with next: unavailable[0m
2019-11-14 04:15:03 stdout  [36m2019-11-14 12:15:03 DEBUG (MainThread) [custom_components.alexa_media.sensor] a********e@g*******m: Found G************NWE Alarm sensor (0) with next: unavailable[0m
2019-11-14 04:15:03 stdout  [36m2019-11-14 12:15:03 DEBUG (MainThread) [custom_components.alexa_media.sensor] a********e@g*******m: Loading sensors[0m
2019-11-14 04:15:03 stdout  [33m2019-11-14 12:15:03 WARNING (MainThread) [homeassistant.components.sensor] Setup of platform alexa_media is taking over 10 seconds.[0m
2019-11-14 04:15:01 stdout  [36m2019-11-14 12:15:01 DEBUG (MainThread) [custom_components.alexa_media.helpers] alexa_media.media_player.async_setup_platform: Try: 1/5 after waiting 0 seconds result: True[0m
2019-11-14 04:15:01 stdout  [36m2019-11-14 12:15:01 DEBUG (MainThread) [custom_components.alexa_media.helpers] a********e@g*******m: Adding [<Entity Sephrioth's Echo Dot: standby>][0m
2019-11-14 04:15:00 stdout  [36m2019-11-14 12:15:00 DEBUG (MainThread) [custom_components.alexa_media.media_player] Sephrioth's Echo Dot: Last_called check: self: G************NWE reported: [0m
2019-11-14 04:15:00 stdout  [36m2019-11-14 12:15:00 DEBUG (MainThread) [custom_components.alexa_media.media_player] a********e@g*******m: Refreshing Sephrioth's Echo Dot[0m
2019-11-14 04:15:00 stdout  [36m2019-11-14 12:15:00 DEBUG (MainThread) [custom_components.alexa_media.helpers] alexa_media.media_player.async_setup_platform: Trying with limit 5 delay 2 catch_exceptions True[0m
2019-11-14 04:14:59 stdout  [31m2019-11-14 12:14:59 ERROR (SyncWorker_3) [braviarc.braviarc] [W] Exception: HTTPConnectionPool(host='192.168.199.67', port=80): Max retries exceeded with url: /sony/accessControl (Caused by ConnectTimeoutError(<urllib3.connection.HTTPConnection object at 0x7fc186c629d0>, 'Connection to 192.168.199.67 timed out. (connect timeout=10)'))[0m
2019-11-14 04:14:59 stdout  [33m2019-11-14 12:14:59 WARNING (MainThread) [homeassistant.components.media_player] Setup of platform braviatv is taking over 10 seconds.[0m
2019-11-14 04:14:54 stdout  [36m2019-11-14 12:14:54 DEBUG (MainThread) [custom_components.alexa_media.helpers] alexa_media.switch.async_setup_platform: Try: 1/5 after waiting 0 seconds result: False[0m
2019-11-14 04:14:54 stdout  [36m2019-11-14 12:14:54 DEBUG (MainThread) [custom_components.alexa_media.switch] a********e@g*******m: Media player G************NWE not loaded yet; delaying load[0m
2019-11-14 04:14:54 stdout  [36m2019-11-14 12:14:54 DEBUG (MainThread) [custom_components.alexa_media.switch] a********e@g*******m: Loading switches[0m
2019-11-14 04:14:54 stdout  [36m2019-11-14 12:14:54 DEBUG (MainThread) [custom_components.alexa_media.helpers] alexa_media.switch.async_setup_platform: Trying with limit 5 delay 5 catch_exceptions True[0m
2019-11-14 04:14:53 stdout  [36m2019-11-14 12:14:53 DEBUG (MainThread) [custom_components.alexa_media.helpers] alexa_media.sensor.async_setup_platform: Try: 1/5 after waiting 0 seconds result: False[0m
2019-11-14 04:14:53 stdout  [36m2019-11-14 12:14:53 DEBUG (MainThread) [custom_components.alexa_media.sensor] a********e@g*******m: Media player G************NWE not loaded yet; delaying load[0m
2019-11-14 04:14:53 stdout  [36m2019-11-14 12:14:53 DEBUG (MainThread) [custom_components.alexa_media.sensor] a********e@g*******m: Loading sensors[0m
2019-11-14 04:14:53 stdout  [36m2019-11-14 12:14:53 DEBUG (MainThread) [custom_components.alexa_media.helpers] alexa_media.sensor.async_setup_platform: Trying with limit 5 delay 5 catch_exceptions False[0m
2019-11-14 04:14:06 stdout  [36m2019-11-14 12:14:06 DEBUG (MainThread) [custom_components.alexa_media.helpers] alexa_media.notify.async_get_service: Try: 5/5 after waiting 32 seconds result: False[0m
2019-11-14 04:14:06 stdout  [36m2019-11-14 12:14:06 DEBUG (MainThread) [custom_components.alexa_media.notify] a********e@g*******m: Media player G************NWE not loaded yet; delaying load[0m
2019-11-14 04:13:34 stdout  [36m2019-11-14 12:13:34 DEBUG (MainThread) [custom_components.alexa_media.helpers] alexa_media.notify.async_get_service: Try: 4/5 after waiting 16 seconds result: False[0m
2019-11-14 04:13:34 stdout  [36m2019-11-14 12:13:34 DEBUG (MainThread) [custom_components.alexa_media.notify] a********e@g*******m: Media player G************NWE not loaded yet; delaying load[0m
2019-11-14 04:13:18 stdout  [36m2019-11-14 12:13:18 DEBUG (MainThread) [custom_components.alexa_media.helpers] alexa_media.notify.async_get_service: Try: 3/5 after waiting 8 seconds result: False[0m
2019-11-14 04:13:18 stdout  [36m2019-11-14 12:13:18 DEBUG (MainThread) [custom_components.alexa_media.notify] a********e@g*******m: Media player G************NWE not loaded yet; delaying load[0m
2019-11-14 04:13:10 stdout  [36m2019-11-14 12:13:10 DEBUG (MainThread) [custom_components.alexa_media.helpers] alexa_media.notify.async_get_service: Try: 2/5 after waiting 4 seconds result: False[0m
2019-11-14 04:13:10 stdout  [36m2019-11-14 12:13:10 DEBUG (MainThread) [custom_components.alexa_media.notify] a********e@g*******m: Media player G************NWE not loaded yet; delaying load[0m
2019-11-14 04:13:06 stdout  [31m2019-11-14 12:13:06 ERROR (SyncWorker_1) [homeassistant.components.ios.notify] The notify.ios platform was loaded but no devices exist! Please check the documentation at https://home-assistant.io/ecosystem/ios/notifications/ for more information[0m
2019-11-14 04:13:06 stdout  [36m2019-11-14 12:13:06 DEBUG (MainThread) [custom_components.alexa_media.helpers] alexa_media.notify.async_get_service: Try: 1/5 after waiting 0 seconds result: False[0m
2019-11-14 04:13:06 stdout  [36m2019-11-14 12:13:06 DEBUG (MainThread) [custom_components.alexa_media.notify] a********e@g*******m: Media player G************NWE not loaded yet; delaying load[0m
2019-11-14 04:13:06 stdout  [36m2019-11-14 12:13:06 DEBUG (MainThread) [custom_components.alexa_media.helpers] alexa_media.notify.async_get_service: Trying with limit 5 delay 2 catch_exceptions True[0m
2019-11-14 04:13:06 stdout  AttributeError: 'bool' object has no attribute 'hass'[0m
2019-11-14 04:13:06 stdout      notify_service.hass = hass
2019-11-14 04:13:06 stdout    File "/usr/src/homeassistant/homeassistant/components/notify/__init__.py", line 96, in async_setup_platform
2019-11-14 04:13:06 stdout  Traceback (most recent call last):
2019-11-14 04:13:06 stdout  [31m2019-11-14 12:13:06 ERROR (MainThread) [homeassistant.core] Error doing job: Task exception was never retrieved[0m
2019-11-14 04:13:06 stdout  [36m2019-11-14 12:13:06 DEBUG (MainThread) [custom_components.alexa_media.helpers] alexa_media.notify.async_get_service: Try: 5/5 after waiting 32 seconds result: False[0m
2019-11-14 04:13:06 stdout  [36m2019-11-14 12:13:06 DEBUG (MainThread) [custom_components.alexa_media.notify] a********e@g*******m: Media player G************NWE not loaded yet; delaying load[0m
2019-11-14 04:12:34 stdout  [36m2019-11-14 12:12:34 DEBUG (MainThread) [custom_components.alexa_media.helpers] alexa_media.notify.async_get_service: Try: 4/5 after waiting 16 seconds result: False[0m
2019-11-14 04:12:34 stdout  [36m2019-11-14 12:12:34 DEBUG (MainThread) [custom_components.alexa_media.notify] a********e@g*******m: Media player G************NWE not loaded yet; delaying load[0m
2019-11-14 04:12:18 stdout  [36m2019-11-14 12:12:18 DEBUG (MainThread) [custom_components.alexa_media.helpers] alexa_media.notify.async_get_service: Try: 3/5 after waiting 8 seconds result: False[0m
2019-11-14 04:12:18 stdout  [36m2019-11-14 12:12:18 DEBUG (MainThread) [custom_components.alexa_media.notify] a********e@g*******m: Media player G************NWE not loaded yet; delaying load[0m
2019-11-14 04:12:10 stdout  [36m2019-11-14 12:12:10 DEBUG (MainThread) [custom_components.alexa_media.helpers] alexa_media.notify.async_get_service: Try: 2/5 after waiting 4 seconds result: False[0m
2019-11-14 04:12:10 stdout  [36m2019-11-14 12:12:10 DEBUG (MainThread) [custom_components.alexa_media.notify] a********e@g*******m: Media player G************NWE not loaded yet; delaying load[0m
2019-11-14 04:12:06 stdout  [36m2019-11-14 12:12:06 DEBUG (MainThread) [custom_components.alexa_media.helpers] alexa_media.notify.async_get_service: Try: 1/5 after waiting 0 seconds result: False[0m
2019-11-14 04:12:06 stdout  [36m2019-11-14 12:12:06 DEBUG (MainThread) [custom_components.alexa_media.notify] a********e@g*******m: Media player G************NWE not loaded yet; delaying load[0m
2019-11-14 04:12:06 stdout  [36m2019-11-14 12:12:06 DEBUG (MainThread) [custom_components.alexa_media.helpers] alexa_media.notify.async_get_service: Trying with limit 5 delay 2 catch_exceptions True[0m
2019-11-14 04:11:04 stdout  [36m2019-11-14 12:11:04 DEBUG (MainThread) [custom_components.alexa_media.helpers] alexa_media.alarm_control_panel.async_setup_platform: Try: 1/5 after waiting 0 seconds result: True[0m
2019-11-14 04:11:04 stdout  [36m2019-11-14 12:11:04 DEBUG (MainThread) [custom_components.alexa_media.alarm_control_panel] a********e@g*******m: Skipping creation of uninitialized device: <Entity Alexa Guard: None>[0m
2019-11-14 04:11:04 stdout  [36m2019-11-14 12:11:04 DEBUG (MainThread) [custom_components.alexa_media.alarm_control_panel] a********e@g*******m: No Alexa Guard entity found[0m
2019-11-14 04:11:04 stdout  [36m2019-11-14 12:11:04 DEBUG (MainThread) [custom_components.alexa_media.helpers] alexa_media.alarm_control_panel.async_setup_platform: Trying with limit 5 delay 2 catch_exceptions True[0m
2019-11-14 04:11:04 stdout  [36m2019-11-14 12:11:04 DEBUG (MainThread) [custom_components.alexa_media.helpers] alexa_media.async_setup_entry: Try: 1/5 after waiting 0 seconds result: True[0m
2019-11-14 04:11:04 stdout  [36m2019-11-14 12:11:04 DEBUG (MainThread) [custom_components.alexa_media] a********e@g*******m: last_called changed:  to {'serialNumber': 'G************NWE', 'timestamp': 1573703896048}[0m
2019-11-14 04:11:04 stdout  [36m2019-11-14 12:11:04 DEBUG (MainThread) [custom_components.alexa_media] a********e@g*******m: Updated last_called: {'serialNumber': 'G************NWE', 'timestamp': 1573703896048}[0m
2019-11-14 04:11:04 stdout  [36m2019-11-14 12:11:04 DEBUG (MainThread) [custom_components.alexa_media] a********e@g*******m: Updated 0 notifications for 0 devices[0m
2019-11-14 04:11:03 stdout  [36m2019-11-14 12:11:03 DEBUG (MainThread) [custom_components.alexa_media] a********e@g*******m: Existing: [] New: ["Sephrioth's Echo Dot"]; Filtered out by not being in include: ['Sonos One', 'Sonos', 'This Device', "Sephrioth's Alexa Apps"] or in exclude: [][0m
2019-11-14 04:11:03 stdout  [36m2019-11-14 12:11:03 DEBUG (MainThread) [custom_components.alexa_media] DND False found for G************NWE[0m
2019-11-14 04:11:03 stdout  [36m2019-11-14 12:11:03 DEBUG (MainThread) [custom_components.alexa_media] Locale en-us timezone Asia/Shanghai found for G************NWE[0m
2019-11-14 04:11:03 stdout  [36m2019-11-14 12:11:03 DEBUG (MainThread) [custom_components.alexa_media] a********e@g*******m: Found 5 devices, 1 bluetooth[0m
2019-11-14 04:11:00 stdout  [36m2019-11-14 12:11:00 DEBUG (MainThread) [custom_components.alexa_media] a********e@g*******m: Websocket succesfully connected[0m
2019-11-14 04:10:59 stdout  [36m2019-11-14 12:10:59 DEBUG (MainThread) [custom_components.alexa_media] a********e@g*******m: Websocket created: <alexapy.alexawebsocket.WebsocketEchoClient object at 0x7fc18a0d1cd0>[0m
2019-11-14 04:10:59 stdout  [36m2019-11-14 12:10:59 DEBUG (MainThread) [custom_components.alexa_media] Setting up Alexa devices for a********e@g*******m[0m
2019-11-14 04:10:59 stdout  [36m2019-11-14 12:10:59 DEBUG (MainThread) [custom_components.alexa_media] Testing login status: {'login_successful': True}[0m
2019-11-14 04:10:58 stdout  [32m2019-11-14 12:10:58 INFO (MainThread) [custom_components.alexa_media] Loaded alexapy==1.3.2[0m
2019-11-14 04:10:58 stdout  [0m
2019-11-14 04:10:58 stdout  -------------------------------------------------------------------
2019-11-14 04:10:58 stdout  https://github.com/custom-components/alexa_media_player/issues
2019-11-14 04:10:58 stdout  If you have any issues with this you need to open an issue here:
2019-11-14 04:10:58 stdout  This is a custom component
2019-11-14 04:10:58 stdout  Version: 2.3.4
2019-11-14 04:10:58 stdout  alexa_media
2019-11-14 04:10:58 stdout  -------------------------------------------------------------------
2019-11-14 04:10:58 stdout  [32m2019-11-14 12:10:58 INFO (MainThread) [custom_components.alexa_media] 
2019-11-14 04:10:58 stdout  [36m2019-11-14 12:10:58 DEBUG (MainThread) [custom_components.alexa_media.helpers] alexa_media.async_setup_entry: Trying with limit 5 delay 5 catch_exceptions True[0m
alandtse commented 4 years ago

Ok, apparently your system is loading the media player platform for Alexa Media slower than the retry delay allows for. Because of this, multiple platforms are not loading including the notify service. Is this a new error or has this been happening for a while?

A workaround would be to edit all files .py files except __init__.py to increase the retry limit or delay.

So in other words, change this (which will try 5 times delaying 2 seconds waiting exponentially longer between tries):

@retry_async(limit=5, delay=2, catch_exceptions=True)

to something like this (try up to 10 times, delaying 5 seconds exponentially increasing:

@retry_async(limit=10, delay=5, catch_exceptions=True)
sephrioth commented 4 years ago

It's been a week or two, and not every HA restart causes it. Thanks for the explanation!

sephrioth commented 4 years ago

Did some test and found Alexa component will result the error.

alexa:
  smart_home:
alandtse commented 4 years ago

That's not this component. This component is alexa_media. You're referring to the official component.

sephrioth commented 4 years ago

That's not this component. This component is alexa_media. You're referring to the official component.

I see, just for your information.