[RELEASE] Text to Alexa, "Tell me a joke","did Chelsea win?" or any question

Hello,

I have an Amazon Echo in my house but no other connected speakers at this time. I would like to have smartthings be able to send messages to be played or spoken by my Echo on command. I want to use this as a sort of alarm when the smart home monitor detects intrusion. To have the Echo say something repeatedly such as “Intrusion detected, police have been notified”

Is it possible to send text to be spoken by my Echo?

Thanks, Doug

It is possible, in theory, but very difficult to pull off. As near as I can tell, you would need to create an Alexa app (via the Amazon ASK kit) and you would then have to create a REST point on your ST account to respond to queries from Alexa, which could then speak the results. It is very UNLIKELY to ever have the Alexa be proactive (i.e. speak without ever being spoken to) outside of a timer or alarm…The best we can hope for is reactionary results (“Alexa, is the door open”).

Why is it so UNLIKELY???

I can understand that the choice to add this feature has to be considered very carefully over at Amazon HQ, but I don’t think the cons outweigh the pros. The alarm feature already is somewhat of a self-initiated action (triggered by a request to wake me up in 30 minutes, etc.); so why not allow and accept speech or sound triggers from an authorized service using the API?

1 Like

Using the Alexa app on my phone I can remotely initiate the playing of audio files stored in my Amazon account and play them on my Echo. In theory I could record messages and save them to my amazon account that I want to play if I’m alerted to an intrusion, but I would have to manually go into my Alexa app and start the message playing. I would prefer it to be automatically done by sharedtalk or just send text to Alexa to be spoken by the associated Echo.

1 Like

Hi @DougS, I don’t think is possible to access a real echo by service, at least not this momment ,

If there is a way to get the echo keys and secret words maybe can be accesed, but i dont know how to get that.

the best shot i think is to have an old android device with media renderer device near to the echo, ST send your command to the android device and send the talk command to echo, and echo respond. I think you can mode your echo to install an audio input to hide the android device.

or use the android connected to echo by bluethooth, but in this way echo works like a speaker and not answerd commands

you can send audio from ST to bluetooth speaker if you have a windows computer that works like bridge.

I agree…however, when I talked to some of the managers and architects over at Amazon during a recent interview there, the Echo was designed to be a ‘reactionary’ device…you speak or give it an action, it responds. To have it ‘monitor’ is not in its skill set…but it is such an open platform that I am sure they will do it if demand is enough, if someone smarter than them does it, or the competition comes out with something that forces them to do it.

Yup; Well, I’m still waiting for someone with the learning-curve time to write a SmartThings integrated skill to answer “simple” device State questions like:

Alexa ask SmartTalk ...

  • What's the temperature from <device>
  • Is the <device> locked, closed, open?

(etc.) … These fit the “reactionary” (i.e., question-response) paradigm.

3 Likes

Thanks everyone for your comments. I think I will work on setting up some SmartThings controlled speakers instead of trying to control the Echo. Just to clarify, I don’t need the Echo to monitor anything. Just need it to allow SmartThings to initiate the playing of an audio file or reading a text when told to do so by by SmartThings.

However, having the Echo play a message that an intruder hears may not work well. All the intruder would need to do is say “Alexa, STOP” ahahaha

I have looked over the ASK kit and you should be able to do that if you write an proper REST API for your devices, set up a Lamda account with AWS and set up the skill…Sounds like a lot, but that SHOULD work. Your syntax would need to be something like “Alexa, ask SmartThings the temperature from ‘device’”.

2 Likes

Also, if anyone is skilled in the Alexa ASK kit, I would love to collaborate as I have a framework to do the SmartThings part (i.e. query and export in HTML or JSON the results). Let me know.

1 Like

Yup…Hmmm… and if we create Virtual Contact Sensor (which is open if any contact sensors in a list are open), for example, we might be able to ask “Alexa, ask SmartTalker the state of house.” and get a open/closed (unsecured/secured) response…

In other words, it may be possible to reduce the complexity of the Alexa code by moving various bits of logic into SmartThings as Virtual Devices and/or a SmartApp with logic for special desired questions…

True, however, I would envision that app similar to the IFTTT app…you basically select which items are exposed and then have a REST API call that would output the proper JSON for the response that the ASK could reply with. I already have this going using an external speaker, except that I can’t ask specific questions, just on/off type requests (i.e. “Alexa, open home report” which is a momentary button that runs a report and outputs to a Sonos)

1 Like

I know this is just bitching, but for my money, integration between Echo and ST shouldn’t require a skill to get this stuff done. That’s the whole point of it, right? It’s great that I can say “Alexa, turn the den lights to 50%,” but why add another layer of “Alexa, ask SmartThings…” just to find out the status of devices, modes, etc? I know this is all a work in progress and in 10 years the kids of today are going to be flabbergasted that we couldn’t just ask the toaster for a beej, but I find having to add additional skill annoying.

On the other hand, once the community creates a workaround that’s popular enough, these things often get implemented, so I guess that’s cool.

If nothing else, I can ask Alexa for a fart, which I’m immature enough to find endlessly amusing.

Again, I am open to anyone wanting to collaborate on something that will give this functionality…I will do the following:

  • Write the wiki article
  • Create the REST API structure that outputs results of requests
  • Host and pay for the Lamda AWS account (haha…it is free)

I would need someone write the ASK skill.

Any takers?

1 Like

Yup… You’re just bitchin! :smirk:
Gotta be happy if someone writes the skill for this!!

Yes… These have to start with Community initiatives and if we’re very lucky, SmartThings may eventually assign someone to figure out how to merge this into the official Alexa Smart Home integration.

This is exactly what I was looking for, please confirm how to install the app. I only see code on the github link, how should I install it on the Smart phone?

How can I find my Alexa Access API Key so that I can interact with my Echo profile (skills/connected devices)?

Hi @thatsjt, This service does not need Echo information, just a text to ask alexa, it is not a Echo extension, just a way to get answers from Alexa

If you want to control the house with an android phone you can use poor man’s echo, it allows you to control the house and send the Alexa answers to speakers, you must to use the firefox browser to send the command but if you have a root android you can use many others ways to send the commands.

For anyone interested in how the Alexa works (block diagram) here is a place to look: https://developer.amazon.com/public/solutions/alexa/alexa-skills-kit/overviews/understanding-the-smart-home-skill-api

Notice the one way arrows…Alexa by design doesn’t allow for unsolicited feedback…you much initiate action to get a response. That is not to say that our idea of feedback from ST devices is invalid…it would work with the proper skill…you would just need to ask the question of Alexa…