Skip to content
Alan Tse edited this page Dec 8, 2023 · 32 revisions

FAQ and common errors

TTS doesn't support my language.

Amazon may not have enabled this. Does your mobile app work with the language? If not, it's probably Amazon.

Announce doesn't work, while TTS does

"Announce" method works by having enabled "Communications" under Alexa app device configuration. "Drop In" is not needed, but "Communications" must be active. If "Communications" is not enabled, Home Assistant logs won't give any error while calling notify.alexa_media service, but Alexa remains quiet.

TTS in the Home Assistant Media Player UI doesn't work - "Sorry, text to speech cannot be read with the alexa tts media player service"

Don't use the HA media player UI. The HA media player works by assuming you can send a local MP3 file to the media player. Amazon does not allow local playback.

You need to use the Configuration: Notification Component. If you can code, you can also fix the HA Media player UI. Alternatively if you need a UI you can use the Lovelace custom-card, Mini Media Player to get it working in lovelace. Or you can script it: Examples: Broadcasting with a custom card.

How do I enable debug logging for the component?

image

Enable "Debug Logging" under Integrations.

If the issue is related to initial setup, you will need to enable logging manually instead.

To turn on DEBUG logs, you’d need to edit your configuration.yaml. This will output the logs to /config/homeassistant.log. Before publicly posting logs, please scrub emails, passwords, cookies, serialNumbers, etc.

logger:
  default: critical
  logs:
    custom_components.alexa_media: debug  
# for API debugging (verbose and intended for service debugging)
    alexapy: debug
# for proxy debugging
    authcaptureproxy: debug

ModuleNotFoundError: No module named 'alexapy'

On HA upgrade, it will wipe out custom component dependencies, including alexapy. HA may attempt to reinstall the dependencies when you try to add the integration again (you do not need to complete the install if you already have it configured).

Alexapy may need to be manually installed. Run the pip3 install alexapy or pip install alexapy in the appropriate python environment. For example:

Docker:

docker exec -it <my_container_name> /bin/bash

Virtual environment:

source /srv/homeassistant/homeassistant_venv/bin/activate

hass.io

  1. Go to the "Configurator"
  2. Click on settings
  3. Click on "Execute shell Command"
  4. Paste the command: pip3 install alexapy

Alternatively, you can try a configuration directory install but you will need to remember to delete old versions. pip3 install --target /config --no-dependencies alexapy

Alexa suddenly stopped working. It was working for a few months.

The login cookie may have expired. Delete your alexa_media.(email).pickle from your configuration directory and restart HA. If you're uncomfortable deleting it, rename it to alexa_media.pickle.old so you can restore it.

All my media_players are 'unavailable' and the component doesn't work.

Ensure your Alexa domain is appropriate for your region. For example, if you’re in Germany, you need to be using amazon.de and not amazon.com. If you’re logged into the wrong domain, none of the devices will show up as available.

The component will only work with Alexa devices that are available.

I've just upgraded, now TTS isn't working

The media_player.alexa_tts service has been removed in favor of the new Configuration: Notification Component. If you're still using alexa_tts, you'll need to update your automations.

idna.core.InvalidCodepoint: Codepoint U+201C at position 1 of '“amazon' not allowed

You copy and pasted the configuration values with a "smart" quotation which is unsupported. Remove or change the quotations in the configuration.

Connection errors

  • urllib3.exceptions.NewConnectionError: <urllib3.connection.VerifiedHTTPSConnection object at 0x7010b490>: Failed to establish a new connection: [Errno -3] Try again
  • urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='alexa.amazon.com', port=443): Max retries exceeded with url: /api/devices-v2/device (Caused by NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x7010b490>: Failed to establish a new connection: [Errno -3] Try again',))
  • requests.exceptions.ConnectionError: HTTPSConnectionPool(host='alexa.amazon.com', port=443): Max retries exceeded with url: /api/devices-v2/device (Caused by NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x7010b490>: Failed to establish a new connection: [Errno -3] Try again',))

Reboot. Connection pool issues are deeper issues for HA.

My question or issue isn't here!

Search the community thread and put the answer here or file an issue if it's new.