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

Has been running in openhab a couple of weeks now. All the hard work has been done by lötzimmer and others at openhab. Just need someone smart to pick up the script and make a custom component

1 Like

need to make sure its running in the same folder as alexa_remote_control.sh . I’m running this in hass.io so need to ensure your paths are correct for your system

I’m also running in Hassio.io, it’s in the same folder as alexa_remote_control.sh (config folder).

How can I check the path?

is it executable you need to chmod +x alexa_notify.sh

my service call from developer tools services is {“message”:“testing-testing-1-2-3”}

you cannot use spaces in the message text

@sebk-666 thank you for the tip. was trying to run via ssh and anything else I could think of with no luck.
running the plain.sh works with HA docker.
as you say, some restrictions (ALL) but it works!

Didn’t get notify working. :confused:

Everything looks correct but receive an error when call notify service.

Files are in the same folder

38

chmod -x done.

alexa_notify.sh = ./alexa_remote_control.sh -d 'Bedroom Echo Dot' -e speak:$(cat)

notify.yaml

- platform: command_line
  name: Alexa
  command: "/config/alexa_notify.sh"

But still showing error …

ERROR (SyncWorker_11) [homeassistant.components.notify.command_line] Command failed: /config/alexa_notify.sh

First of all, it’s chmod +x ... not chmod -x ... - the plus sign is important as it adds executable permissions while the minus sign removes them.
Then, don’t call the remote control script from the wrapper using “./alexa_remote_control.sh” as this will only work when you call the wrapper from the directory it is located in.
You can’t make any assumptions from where it is called, so use the full path instead: /config/alexa_remote_control.sh.

Sebastian

1 Like

Thanks for the corrections too busy watching the football. Good point on the paths :+1:

Having great fun with this, Alexa is spouting all sorts of rubbish at every opportunity. Missus didn’t appreciate Alexa’s personal greeting and turning on TuneIn Radio automatically when she got up this morning though as I ‘forgot’ to warn her :scream:

1 Like

lol.
i also had great fun.
letting alexa speak on the fly just what i type.
a friend of us was here and he did ask my wife how it was possible that alexa knows he was there and why she was talking about soccer with him.
my wife kept herself dumb, and i was trying not to laugh, ended up going to the toilet to tell him stuff.

2 Likes

Weird. Got the wrapper working from the command line, but calling it from within home assistant yields an error in the log. Do you spot any problem in the notifier like this:

 - name: 'Notify all dots'
   platform: command_line
   command: "/srv/docker/hass-config/ha-alexa-tts/alexa_wrapper.sh -d 'ALL'"

Very nice. Thank you very much.

How to slow down the speech. When Alexa speaks very very fast o.O’

that isnt possible (yet) with this feature

1 Like

Yay, finally cracked a long time goal of getting Alexa to read out the temperature from my Broadlink RMPro…

lounge_temp:
  alias: Lounge temp
  sequence:
  - service: notify.lounge_dot
    data_template:
      message: "The temperature is {{states('sensor.broadlink_sensor_temperature')|replace('.', ' point ') }} degrees"

Until I added the ‘replace’ bit she kept saying “two hundred and thirty one degrees” instead of “twenty three point one degrees”, thanks to an old post by @cederlof for a clue to the answer.

1 Like

Ok for those running the script in HA docker, you can still use the full “alexa_remote_control.sh” as opposed to the plain by simply calling the alexa_wrapper.sh from the operating system instead of the HA container.
This is what I did:
I run Ubuntu 18.04 LTS
install jq - sudo apt-get install jq
Run the notify command by ssh(ing) into the OS:
this is mine:

- platform: command_line 
  name: 'Office Echo Dot'
  command: ssh -l hass 192.168.1.XXX "~/docker/homeassistant/assistant_components/alexa_notify/alexa_wrapper.sh -d 'Office Echo Dot'"

Note: I placed the scripts in a folder called “alexa_notify”. You can put them wherever. They must be together and the notify path has to point to the corresponding folder.

I ended up doing this, because the “remote_plain” would only activate 1 of my echos, no matter which one I selected.

1 Like

This is good. Earlier I always use | round(0)

Does anyone have the script working with Australian Alexa? I keep getting the CAPTCHA for the login and copying over cookies does not help either.

LANGUAGE="en-AU"
#LANGUAGE="en-US"

AMAZON='amazon.com.au'
#AMAZON='amazon.com'

#ALEXA='layla.amazon.de'
ALEXA='alexa.amazon.com.au'

did you change add your email and password to the script?

hey guys

when I try to run: ./alexa_remote_control.sh -a

I get the following error: -bash: ./alexa_remote_control.sh: Permission denied

Anyone can help please?

youre file has the wrong filerights.
the user that you use to start the file has other permissions then the one you used to save it.