question

yesyes avatar image
yesyes asked

Do I really have to include the Invocation Name every time I use a custom skill?

Hi,

I'm new to Alexa and her APIs. I want to include support in my own home automation system. I have looked at the Smart Home Skill API first as that seems easier to do but it (currently?) has too many limitations for what I would like to do (e.g. I want to set lights to a certain colour and have Alexa read temperature and humidity values from my sensors).

Now, looking at the ASK documentation it looks to me as if I have to include the Invocation Name (name of the skill) in each and every thing I ask Alexa to do. So instead of "Alexa, turn the living room lights pink" I would have to say "Alexa, ask HomeAutomation to turn the living room lights pink".

Am I understanding this correctly? This would be a show stopper for me (or rather for my wife ;-) ).

Or is there maybe a way to make a custom skill the default? Something like "Alexa, open HomeAutomation" and from then on I can just say "Alexa, turn the living room lights pink"? And maybe leave the skill by saying "Alexa, close/exit HomeAutomation" if I wanted to ask Alexa other things?

How is the Smart Home Skill API different that it does not need the Invocation Name?

alexa skills kitskillalexa smart home
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Ross@Amazon avatar image
Ross@Amazon answered

Hi yesyes,

Your understanding of using the Alexa Skills Kit and Alexa Smart Home is correct. Custom skills require the invocation name to be said every time they are used, while smart home skills do not but have more limited functionality. The "default custom skill" functionality you mentioned is not supported, but the Alexa development team is constantly working to improve the product. If you would like to make a feature request, please post it as an idea by clicking the Create button on the top menu and selecting Post an idea.

1 comment
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

yesyes avatar image yesyes commented ·

Thanks Ross.

Good to know that the Alexa developer team is interested in feature requests. I think I might create 2 of them, one to have the smart home API extended to support setting colours and querying values, and one for the "default custom skill".

0 Likes 0 ·
BobD avatar image
BobD answered

Yes, you can use the conversation route you suggest for custom skills (I don;t know anything about Smart Home Skills, but this is what I do for one of my own custom skills).

So you could have:

"Alexa, Open HomeAutomation" (Alexa opens your skill, and speaks whatever welcome intent message you have)

"Turn on the kitchen" (Your skill handles the TurnOnIntent and switches the light on)

"Set the Lounge to Bright Pink" (Your skill handles the ColourChangeIntent and everything goes pink)

"Goodbye" (Your skill handles the CancelIntent, speaks a farewell message and goes away)

"Alexa, do something else that has nothing whatsoever to do with my HomeAutomation skill" (Normal service is resumed)

5 comments
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

yesyes avatar image yesyes commented ·

Thanks!

So if I understand this right this would basically "trap" Alexa inside my skill with a cleverly designed interaction model? The downside would be that no wake word is needed, so the device would constantly listen and transmit everything that is said in the room to "the cloud".

0 Likes 0 ·
BobD avatar image BobD commented ·

Yes, Alexa would be listening to everything you said after "open Home Automation" until your skill decides to terminate the conversation - when it hears Cancel, Stop, Goodbye, Go Away or whatever you code up, or until it times out. If you don't speak at all within (I think) 30 seconds then Alexa will give you one reprompt and another 30 seconds, and will then end the conversation anyway,

0 Likes 0 ·
apreston48 avatar image apreston48 BobD commented ·

New dev here. Is there documentation or an example of how to keep Alexa listenining like this in a "conversation mode"? I'd like to try this out. Thanks!

0 Likes 0 ·
BobD avatar image BobD apreston48 commented ·

I think I started using the Tide Pooler skill available on GitHub. This uses AlexaSkills.js (included as part of the code) which provides some support functions. You then just decide if you want to use the response.tell function (which ends the conversation) or the response.ask function (which doesn't).

It was pretty easy to pick up and learn from. I didn't use any documentation at all.

Let me know if you get stuck or if you need more info/help.

1 Like 1 ·
Show more comments