Alexa Announce Feature - Text to Speach via Alexa now a possability?

For the reboot problem (loosing cookies), at least for Ubuntu
is that most files in /tmp get deleted by the system on a reboot, so
instead I created a temp directory “alexa_temp” in my HA configuration directory
and I’ve changed the following in the script:
from

TMP=“/tmp”

to

TMP=“PATH_TO_HA_CONFIG/alexa_tmp”

So far this seems to work.

1 Like

Save scripts in your Home Assistant config directory and make them executable (chmod +x alexa_remote_control.sh & chmod +x alexa_wrapper.sh)

trying to do this and im getting no directory message.

i did create a file in my config for

remote_control.sh & alexa_wrapper.sh

trying to run this with SSH (using putty) am I missing something?

Are you in the config directory when you execute chmod +x alexa_remote_control.sh?

Otherwise, give it the full pathname like chmod+x /home/homeassistant/.homeassistant/alexa_remote_control.sh

Thanks this worked perfectly

yes, that worked tytyty
i had to /config/ as my path because im on hassio

unfortunately im still getting a error

Command failed: /config/alexa_wrapper.sh -d ‘ALL’

but at least that’s one issue behind me. I just keep trying stuff

I think some of the problem is getting TSS setup, is there a way to tell tss to output to my media_player im using mopidy (Raspberry pi hooked to a speaker via AUX cable) i can type words into a box and it says what I type.

A little off-topic, is there an easy way to make Alexa to play a short chime or ringtone before speaking with this script?

I’m in the same boat as you. I’d love to be able to play a short alert tone before the TTS. Currently doing that with my Kindle Fire tablets but being able to use my Echo Dots would be way nicer.

1 Like

Ok, I have come most of the way now. It works as a command but want to try it in HA, I am confused what json to send if I use the developer button to test. Like this: I call service notify.alexa,

Nothing happens. Is there a problem when running hassio as some have said before?

{
“message”: “TEST”
}

Does normal TTS work?

That’s where I think im having a problem i can’t get TTS to work via script. So I’m sure that’s why I’m having the same issue as you!

What happens when you use the alexa_remote_control.sh -d “Echo Name” -e speak:this_is_a_test command from the instructions ?

This is what my output would look like:

sending cmd:speak:This_is_a_Test to dev:Echo Name type:bunchofalphanumerics serial:bunchofalphanumerics customerid:bunchofalphanumerics
Sequence command: Alexa.Speak

Sorry if this should be obvious but how do I do this bit using Hassio.

Save scripts in your Home Assistant config directory and make them executable (chmod +x alexa_remote_control.sh & chmod +x alexa_wrapper.sh)

files downloaded and coped to same folder as my conifguration.yaml file

I has SSH to the pi but cant execute the command

Have you tried running the script anyway, I didn’t need to chmod any files when adding it to hass.io.

Tried to run ./alexa_remote_control.sh -a for the SSH login but it says no such file or directory. Feel I am missing the point somewhere. Can someone post a walk through for hassio.

If you reread the thread you’d see for hassio it’s…

/config/alexa_remote_control.sh -a

This works great…

If your on a Mac you will need to find and replace

${SED} -r
to
${SED} -E

and

brew install jq

You have to be in your config directory… so in my case I had to do: cd /home/homeassistant/.homeassistant/ Your path my be different… I’m also using venv but my commands won’t work unless I do that first

alexa_remote_control.sh was working fine last couple days, but it’s broken this morning.
The lines after Alexa.Speak were not there before, and no sound played, anybody know what’s wrong?

I’ve re-done all the setup steps: log out of alexa, removed /tmp/.alexa*, getting the cookie, still the same. -a logged in amazon correctly and listed all devices, any -e gave me the same results.

alexa_remote_control.sh -d “Kitchen Echo” -e speak:this_is_a_test
sending cmd:speak:this_is_a_test to dev:Kitchen Echo type: … serial: … customerid: …
Sequence command: Alexa.Speak
HTTP/1.1 0 x-amzn-RequestId: aad2a8a1-7f9f-11e8-9b09-2b6ab4a02f6e
Access-Control-Allow-Origin: https://alexa.amazon.com
Content-Encoding: deflate
Vary: Origin
Access-Control-Expose-Headers: x-amzn-dat-gui-client-upgrade,X-Amzn-Error,loginUrl,X-Amzn-RequestId,x-amzn-alt-domain,Date,Location
Access-Control-Allow-Credentials: true
Date: Wed, 04 Jul 2018 15:33:57 GMT
Connection: close

1 Like

Thanks for the pointers. All working now.

1 Like

Mine is still working fine… what happens when you Run ./alexa_remote_control.sh -d “My Dot Name” -e speak:This_is_a_test! From the command line