Skip to content
Boris Feldman edited this page Aug 4, 2019 · 32 revisions

FAQ and common errors

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.

TTS doesn't support my language. (e.g., Spanish).

Amazon may not have enabled this. Please review this list for known supported languages. 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.

Sorry, text to speech cannot be read with the alexa tts media player service

Don't use the media player UI. You need to use media_player.alexa_tts. If you can code, you can also fix the Media player UI. You can of course use the Lovelace custom-card, Mini Media Player to get it working in lovelace.

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.

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.

How do I enable debug logging for the component?

To turn on DEBUG mode, you’d need to edit your configuration.yaml. Before publicly posting logs, please scrub emails, cookies, serialNumbers, etc.

logger:
  logs:
# for v 1.0.0
    custom_components.alexa_media: debug  
# for v 0.0.0
    custom_components.media_player.alexa: debug
# for API debugging (verbose and intended for service debugging)
    alexapy: debug

How do I enable advanced debugging?

The component can also capture the various Amazon webpages it is processing. This may be helpful to debug issues logging in as it will provide the raw html of the webpages. This is done by enabling debug in the component configuration. Please note, Amazon pages may store login credentials in the html, so be careful sharing these files without scrubbing. Also, this debug functionality may change between versions depending on the last issue debugged.

alexa_media:
  accounts:
    - email: your amazon email
      password: your amazon password
      url: amazon.com
      debug: True

This will generate two debug files in the configuration directory.

  • alexa_media.(email).get.html - This will show the initial form where the credentials will be input.
  • alexa_media.(email).post.html - This is the webpage immediately after submitting login credential data via a post. This will often show Amazon's response indicating a need for 2FA or a captcha.

While you can use these html files in your browser to see where you are in the login process, actually logging in won't solve the component login problems as the component won't be able to save any cookies you generate in your browser.

ModuleNotFoundError: No module named 'alexapy'

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

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 notify component. If you're still using alexa_tts, you'll need to update your automations.

My question or issue isn't here!

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