Help understanding Alexa launch requests

The Alexa docs say “There may be times when you want to respond to a launch request initiated from a command such as “Alexa, Red Alert!”.”

I can’t figure out how to do this. I have my Home Assistant skill all set up and working, but I can’t figure out this part. It makes it seem like I can bypass the “ask home assistant” for certain scripts, but I assume it depends on the phrase used.

The section mentions what do do differently in my config, but doesn’t say what to do to the skill itself. I can’t figure out how it is supposed to be called. Can anybody help me out or tell me what I’m missing here? Thank you!

Also trying to figure the same out. Not sure if we’re both missing something somewhere though. I guess we’ll keep trying and looking out.

Let me know if you figure this out.

I went to reddit and got some help there.

Turns out the invocation name on the Skill Information page on Amazon Developer is the key. You need to call that whatever you’ll tell Alexa to do.

1 Like

Oh, so you create a whole new skill for those?

That’s what I did. You only have the one intent per skill, then, since you are calling it not with the utterances but by the invocation name. I’d love to know if there was a way to do both, but it doesn’t appear to be so.

Sweet. It’s funny, that just didn’t cross my mind. Thank you for your help!

How did you fill out your intent schema on the Amazon end?

I kept it very basic since the invocation was doing the hard work.

{
  "intents": [
    {
      "intent": "MyIntent"
    }
  ]
}

Remember that the YAML won’t even use the “MyIntent” above since it’s using the invocation name.

1 Like

Super!

Working and how. Thanks guys!

Glad to hear it. I suggested updates to the documentation page so hopefully others won’t have this same confusion.

I decided to experiment with launch requests today, but can’t figure out a natural way to invoke the new skill. The example page uses “Alexa, Red Alert!”, but I can’t figure out a way to do similar without the equivalent of “Alexa tell Red Alert” or “Alexa ask Red Alert”. Have y’all been able to exclude the “ask/tell” from the utterance?

Yes, that’s exact goal with the launch request. Whatever you use as the “Invocation Name” on Amazon Developer in the Skill Information page is what you will use.

In my original script (before launch requests were launched), I called my Invocation Name “home assistant”. Then, I would say, “Alexa, tell Home Assistant to …”. Now, whatever I use in the Invocation Name is what I tell Alexa to do. Let me give you an example, which may help:

In the past, I created an intent within the Home Assistant skill for “beer fridge time” which would turn on the basement lights. I’d have to say “Alexa, tell Home Assistant beer fridge time.” Now, I just created a new skill just for the beer fridge and used the Invocation Name: “beer fridge time”. I used the Amazon Skill ID in my intent_script, and now I can just say “Alexa, beer fridge time,” and the basement lights come on.

Is there something specific I can help with? I’ve experimented a lot with this and I’m more than happy to explain it a different way if it helps.

Hmm. So the first one I tried is to fire a “wake up” script. My invocation name is “wake up Scott”, but if I say “Alexa, wake up Scott”, the Echo sounds a tone (like it’s not sure what to do) and lights the blue ring and does nothing. Not like it’s waiting for a command. Like it’s not sure what to do with what I said. I wonder if “wake” is reserved?

Also - the skill setup required that I set up at least one sample utterance. So I have

MyIntent Wake up scott

(my intent schema sets up an intent called “MyIntent”)

“Wake” may very well be a reserved word. Take a look here for some suggestions on naming.

What I do is keep the Skill Information page up and then try out the Invocation Name. If Alexa doesn’t do what I wanted to do, I change the Invocation Name and hit Save at the bottom. That allows you to try out a bunch of options without going back and forth.

Don’t worry too much about the sample utterance. For the MyIntent Intent Schema I noted above, I just use MyIntent Some words as a sample utterance. The sample utterance isn’t used at all–it’s the invocation name that is the subject of the launch request.

Fiddle with some different invocation names and see if you can at least trigger the script. Let me know if you keep having problems.

Thanks. “Scott is awake” worked as an invocation name. “Alexa, Scott is awake” now does what I want it to.

I recently revisited Alexa custom commands and managed to create few launch requests such as…

  • will it rain?
  • how are you?
  • how’s the weather?
  • who’s at home?
  • who is away?
  • where is xxx?

This is way better than Routines or custom commands where I need to start with “ask Home Assistant…”.

However the only complains I have so far are…

  1. Cannot have multiple invocation names for the same skill.

Have to confess I haven’t read all this thread or tried using intents myself but I’m confused by your comment about being better than ‘routines’ as they seem to end up with the same result, saying whatever you want to trigger an action.

Could you explain please?

Here’s a write-up I did for custom Alexa skills and launch requests. https://smarthomehobby.wordpress.com/2017/10/01/custom-alexa-skills-launch-requests-in-home-assistant/

1 Like

Routines are very limited at the moment. The only things useful in there is turning smart home devices on/off.

However with Alexa launch request, I can have very natural command/questions such as “Alexa, what is the bedroom temperature?” and it will response back on the same Echo that captured my question.

There is no way to do that with Routines. Even Google Assistant unable to achieve that.

For above example, this is what I did…

In HA configuration…

intent_script:
  amzn1.ask.skill.08888888-7777-6666-5555-444444444444:
    speech:
      type: plain
      text: "The bedroom temperature is {{ states('sensor.bedroom_temperature') }} °C"

In Amazon Developer Console…

4 Likes

Gotcha, many thanks for that.

At the moment, I only really use Alexa with HA to turn stuff on and off and control Harmony through it because of the crap old fashioned skill we get in the UK rather than the proper smart skill available elsewhere. For heating and the like I use the vendor skills.

Will give this a go and see what I can come up with.