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

Can you provide a little more detail, on the setup. If I understand correctly, you can say “Alexa what is the lounge temp?” and your alexa will play this TTS message “the temperature is xx.x degress”.

What are you using to trigger the script? Are you just exposing the script to Alexa? I do remember that you can expose automations and scripts as “Alexa Devices”.

Here is what I think I understand. The script “lounge_temp” is exposed to alexa as a “device”, and saying “alexa what is the lounge temp” is understood the same as “turning on” the script?"

Yep, you’re spot on. The only downside, if you’re being really fussy, is Alexa will say “OK” as she ‘turns on’ the script, takes a breath and then reads the response, still sounds like natural speech though.

Cool, I have “brief mode” turned on so I just get a quiet ding at the end. My big learning of the day was I did not know you could say " what is the xxx" and have it act as turning something on. That’s huge.

“Alexa, what is the location of my spouse” - reads location/zone info from tracker
“Alexa, what is the time to work” - provides information from waze travel time sensor
“Alexa, what is the alarm status” - provide a list of locked, unlocked, open, closed, doors, windows, etc

Thanks!

Lol, forgot I turned the acknowledgement on, my missus was getting in a hump when we first had them as she’d say something and nothing would happen so put it on when so she knew she’d got through. Real problem is for some reason she puts on a voice and talks to her like she’s a six year old!

Have fun.

1 Like

Well, attempt #1 failed. I had an automation, named person travel notice

When I say “Alexa what is the person travel notice”. she goes to wikipedia and give results
When I say Alexa turn on the person travel notice" she does infact turn on the automation, but of course that’s not same as triggering the automation.

Next text will be a script.

Edit: addred a script to alexa named ecobee away mode
I say “alexa what is ecobee away mode”
She says ecobee away mode does not support that
When I say turn on ecobee away mode, she runs the script successfully.

So you’re sure you are just saying “Alexa what is the …” and the runs your script? For me anyway, that does not seem to be a possible key phrase?

there are lots of words and keyphrases that you cant use.
it would be nice if there would be a list from that
but to bad, there is no such list.

i have had many times that i had alexa work on a certain command, and suddenly she responds with another reaktion.
at least i know: try to avoid the obvious and what you would normally say.
because most of those kind of commands are already occupied.

I understand the normal phrases, my post was more directed to @Bobby_Nobble. We had a back and forth on keywords, and in his set up he was able to “turn on” his script by saying “Alexa what is …”, I was unable to get similiar results.

I have an ecobee and with thermostat type devices I can say “Alexa, what is the temp in “name of device””, and it returns the temp, but in his case his room_temp is actually just a script named room temp that kicks of a TTS message that happens to be about temp. Maybe that’s the trick. Maybe since temp is in the name, Alexa is smart enough to treat it like a thermostat device, and works with “what is?”

@Bobby_Nobble do you have any other scripts that you are able to trigger with Alexa that are not temp related/named by saying “What is?”

Thanks

Slight crossed wires, technically it is “turn on…” but you add a “what is…” version to Routines in the Alexa and point it at the “turn on…”

Ok, makes much more sense. I have done that plenty of times. So basically you’re really just using the alexa app to run scripts. So If you wanted to say
Alexa what is the location of person x you’d create an alexa routine for “what is the location of person x” that ran script person X
If you wanted to also ask about person Y, you’d create another alexa routine pointing to another script.

Not that I don’t appreciate the help, but I wish you had said that in the beginning. Basically this approach (which is probably what I’ll do), is not the same as exposing a device to Alexa via HA, which was what I had asked in the beginning. I’ll say that after trying various approaches, and reading, sounds like the answer is NO, you cannot expose a device value to Alexa and get the state/value, but you can use alexa routines to allow you a more customized way to say what you want which can run a script to say that value to any TTS device. If you want that TTS device to be your Alexa, then use one of the couple custom component solutions to enable Alexa to be used for TTS.

you can also create a skill that exposes the value to alexa but then you cant use a routine to change the keywords
but really exposing it to alexa would suggest that alexa knows what it is and that means creating a skill that tell her what to do with it.

1 Like

I’ve been looking at this and it seems as if it offers a lot of functionalty above and beyond TTS, which is what I was initially looking for. Does anyone know if its possible to Send messages to Alexa as if you said them.

For example Hyundai Bluelink has an Alexa App. I can say “Alexa Tell bluelink to lock my car doors”, alexa then comes back asking for a bluelink PIN. I provide the 4 digit PIN, and then it sends the command, and my car doors lock.

Does that seem like something that can be done with this capability?

nope.

you cant start any actions with this unless you can create a routine for it.
this code does what you can do in the alexa app.
starting skills from the app isnt supported yet by alexa.

Thanks, I thought so, but it sure looked like something in the last update here

enabled starting alexa routines without speaking to the echo, so was just wondering how far people had been able to go with that

you can create routines in the app.
and those routines you can activate.

so you can create a routine that puts on your coffemachine, tells your morgen report and says hi to you and after that starts some music.
and you can activate that routine when a motion detector detects you.

but you cant start a skill. because routine dont support that (yet)

Has anyone got to the bottom of the no audio problem? I an log in, get a list of devices & send a command, but I never get any response out of Alexa.

I switched curl to verbose mode & it’s not reporrting an error,

* upload completely sent off: 396 out of 396 bytes
< HTTP/1.1 200 OK

I’ve tried a TTS command & traffic, and I get the same silnce, but if I say alexa, what's the traffic I get a response so Alexa’s working properly apart from this.

there are a few things that i noticed that can cause that

  1. make sure that you use the same server in the code as where you have setup the alexa device (both in .de or both in .co.uk or …)
  2. make sure that the alexa device is installed with the same account that you use to connect with the code
  3. make sure that no other account is using the alexa device (some people have several accounts in the household, and the device is used by another account at that moment)

what the code actually does is mimic the alexa app.
so log on to the alexa app with the same account that you use the code for and try if you can create a routine and start that from the app.

It must be #1, the others I can verify as Ok.

How do I check which server I’ve set up the device against?

the server you use in the code needs to be the same server where you can login in a browser and change your devicesettings.

Looks like it was giving me a captur on the UK site though, once I got around that it now works perfectly.

1 Like

I’ve got alexa working with the command prompt, but cannot call it in any other way.

if i use:
./alexa_remote_control.sh -d "Karls Office" -e speak:" GO AWAY"

She speaks, I can see that the two files are located inside my alexa folder within HA along with .alexa.cookie and .alexa.devicelist.json but they dont show up for some reason. (I’m using docker on unraid, and i’ve used cloud commander to check files are present, all files are owned by root, and both of the scripts have +x applied to them.)

# cd /config/alexa
# dir
alexa_remote_control.sh  alexa_wrapper.sh
# 

If i then try and run

./alexa_wrapper.sh -d "Karls Office

i get an error:

sh: 53: ./alexa_wrapper.sh: not found.

which, i’m guessing when I try and call the notify script in HA i’m getting the following error in the log file.

2018-10-02 12:31:42 ERROR (SyncWorker_37) [homeassistant.components.notify.command_line] Command failed: /config/alexa/alexa_wrapper.sh -d 'Karls Office'

Any advice/help would be great.