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

alexa
Tags: #<Tag:0x00007f4811cd9370>

#123

I’ve been trying to get the automation part of this completed all day and still haven’t been able to get it to work. Below is how I currently have things setup. When I trigger the automation nothing happens. No logs no TTS notifications no nothing…

Command Line Notify:

- name: Office
  platform: command_line
  command: ssh -l admin 192.168.1.141 "/volume1/docker/homeassistant/alexa_wrapper.sh -d 'Office'"

Automation:

- id: garage_door_open_voice
  alias: 'Garage Door Open'
  initial_state: false
  hide_entity: False
  trigger:
    - platform: state
      entity_id: cover.garage_door_opener
      to: open
  action:
    - service: notify.office
      data:
        message: "Hello, this is a test"

#124

You have set initial_state: false, which means the automation is disabled. It should be true.

Also, in the trigger, you need to: 'open' (in quotes).


#125

I’d have to agree just make notify groups in HA way easier…


#126

FYI,
I first tested out the service to see if the wrapper and shell script worked.
Can do this using the Front-end Service “notify.Office” and filled in the JSON data:

{ “message”:“Hello, this is a test”
}


#127

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


#128

the only way i can think of is starting a playlist and stop it after a few seconds.


#129

That’s exactly what I try to avoid, oh well.
Thanks, anyway.


#130

Assume you want this to catch your attention so you don’t miss any of the message? In which case you could achieve the same effect by just adding a few unimportant words at the beginning, along the lines of ”listen up, …”


#131

Yes, I have be using my android tabs around the house for announcement with a chime, sort of like that and use to it now. Guess I’ll keep sending the chime/ringtone to the tabs before the text to Alexa (voice is definitely louder and clearier on Alexa).
Thanks


#132

Has anyone been able to get this to still work after a reboot of entire system? I keep having to do the captcha from alexa.login whenever i reboot


#133

this is what i did. saved the cookie.txt in /home/user. Then added the following to config.

shell_command:
  reset_alexacookie: ssh -l hass 192.168.1.XXX "sudo cp ~/.cookies.txt /tmp/.alexa.cookie && sudo chmod 777 /tmp/.alexa.cookie && ~/docker/homeassistant/assistant_components/alexa_notify/alexa_remote_control.sh -a"



script:
  reset_alexacookie:
    alias: reset_alexacookie
    sequence:
    - service: shell_command.reset_alexacookie


automation:
    - id: alexa_restart
      alias: alexa restart
      trigger:
        platform: numeric_state
        entity_id: sensor.nuc_uptime_min
        above: 1
      action:
      - service: script.turn_on
        entity_id: script.reset_alexacookie

#134

can you please tell me how to do this in Hassio?

i think i did everything else.

i can see HA call the service, but get Command failed: /config/alexa_wrapper.sh -d ‘LivingRoom’


#135

@Corey_Maxim, apologies I dont use Hass.io.
cant you do sudo chmod +x?


#136

I can, is that all i have to do?


#137

➜ ~ sudo chmod +x
BusyBox v1.27.2 (2018-05-30 11:54:33 UTC) multi-call binary.

Usage: chmod [-Rcvf] MODE[,MODE]… FILE…

Each MODE is one or more of the letters ugoa, one of the
symbols ±= and one or more of the letters rwxst

    -R      Recurse
    -c      List changed files
    -v      List all files
    -f      Hide errors

#138

are you adding the entire command including the script name?


#139

sudo chmod +x /config/alexa_wrapper.sh -d ‘LivingRoom’

or

sudo chmod +x script.alexa_speak

im not really sure what to put
or the steps involved, im not very good at this


#140

Just curios if anyone else had the same problem as me and solved it. I am located in sweden and my amazon account is US. I get the script running and can list my devices. But the echo wont speak. Just dead silence.


#141

follow the installation


#142

You need to comment out the remove cookie commands in the alexa_remote_control.sh script or it will delete the cookie file on reboot. Change each rm -f ${COOKIE} to #rm -f ${COOKIE} I believe there are 3 of them.