Skip to content
Alexa Unsolicted TTS for Home Assistant
Branch: master
Clone or download
Type Name Latest commit message Commit time
Failed to load latest commit information. Update Jun 30, 2018 Upstream CSRF additional acquisition points Jul 1, 2019 Create Jun 18, 2018


Alexa Unsolicted TTS for Home Assistant

Here is the unsolicited text to speech for Alexa devices that we have been waiting for!

The shell script has been updated (Thanks Ralf Otto) with the excellent work of Michael Geramb to support direct TTS to any Alexa devices!

This script does work by using the Alexa web interface, so it may break at anytime. However, the TTS component is POSTing a JSON object direct to the API endpoint, so the odds that TTS portion stays working are high.

The TTS works with two shells scripts, the original by Alex Loetzimmer and wrapper for it that allows Home Assistant to call it as a command line notify component.

To get started, download the scripts:

Save scripts in your Home Assistant config directory and make them executable (chmod +x & chmod +x

Add your login credentials to the Home Assistant secrets.yaml file, with the keys alexa_email and alexa_password.

Run the script interactively to pull your devices:

./ -a

If login fails look at /tmp/.alexa.login. Search for "password" and see if you are being prompted for the captcha. If so, you can attempt to login to Alexa manually from a browser (from the same IP) and see if that fixes the issue for you. It never did for me, so I logged in to with Chrome and used the cookies.txt extension( to export my amazon cookies to /tmp/.alexa.cookie. Other individuals have reported success using the same procedure, but only when using Firefox.

Once you have ./ -a returning your devices you can test TTS by running:

./ -d "My Dot Name" -e speak:This_is_a_test!

If that works, next in a shell type:

echo $PATH

Copy that value and put it in the PATH in

Add a command line notify to Home Assistant:

  - platform: command_line
    name: 'My Dot Name'
    command: "/home/homeassistant/.homeassistant/ -d 'My Dot Name'"

If you are using, adjust the command line to:

     command: "/config/ -d 'My Dot Name'"

Restart Home Assistant and you should now be able to call notify.my_dot_name with a message from an automation or the services interface broadcast messages to your devices.

You can also add a notify for all of your Alexa devices:

  - platform: command_line
    name: 'All Alexas'
    command: "/home/homeassistant/.homeassistant/ -d 'ALL'"

Let me know if you have any questions!

You can’t perform that action at this time.