Steps to Build an Echo Button Skill
An Echo Button skill is a custom skill, so the steps to build an Echo Button skill are very similar to the steps to build any custom skill. This topic highlights aspects that are unique to Echo Button skills and recommends how to get started building a skill for Echo Buttons.
Get Started
If you want to build an Echo Button skill right away, we recommend the following steps.
If you are new to custom skill creation:
- Browse Steps to Build a Custom Skill. You don't need to dive deep yet, just get familiar with the terminology and the overall steps.
- Review Additional Requirements for Echo Button Skills so that you are aware of additional things that you must do for your skill to support Echo Buttons.
- Go to the Echo Button Sample Code and follow the step-by-step procedures to create an Echo Button skills with the provided code.
If you already know how to build a skill:
- Review Additional Requirements for Echo Button Skills so that you are aware of additional things that you must do for your skill to support Echo Buttons.
- Go to the Echo Button Sample Code and follow the step-by-step procedures to create an Echo Button skills with the provided code.
Additional Requirements for Echo Button Skills
To create an Echo Button skill, follow the steps to build a custom skill and include the appropriate interfaces, publishing information, and skill code described next.
Interfaces
Include support for one or both of the following interfaces:
- To animate Echo Buttons, include support for the Gadget Controller interface.
- To receive input from Echo Buttons, include support for the Game Engine interface.
Most Echo Button skills use both interfaces.
The way that you specify the interfaces depends on whether you use the Alexa Skills Kit developer console or the Alexa Skills Kit Command-Line Interface (ASK CLI) to create the skill.
- Developer Console – Find your skill in the list, and then under Actions, select Edit. On the left side, select Interfaces. In the Alexa Gadget row of the interface list, select Gadget Controller, Game Engine, or both.
- ASK CLI – Add the
GADGET_CONTROLLERinterface, theGAME_ENGINEinterface, or both to the skill manifest as described in Specify Echo Button Skill Details.
Publishing Information
Echo Button skills require additional publishing information, which determines how the skills are described in the Alexa Skill Store. The publishing information that you must provide depends on whether you include support for the Gadget Controller interface or the Game Engine interface.
If your skill supports the Game Engine interface, you must specify whether Echo Buttons are required or optional, the minimum and maximum number of Echo Buttons that the skill supports, and the minimum and maximum number of players that the skill supports. If your skill only supports the Gadget Controller interface, then the only field that you must specify is whether Echo Buttons are required or optional.
You select this information in the following way:
- Developer Console – Find your skill in the list, and then under Actions, select Edit. From the top menu, select Launch. In the middle of the page, provide the following information:
- Echo Button Use – Select Required or Optional.
- Number of Echo Buttons – Select the minimum and maximum number of Echo Buttons that the skill supports. If the skill supports the Game Engine, you must choose values for these fields. If you choose the same value for the minimum and maximum, the Alexa Skill Store will show the matching value as the required number of Echo Buttons.
- Number of Players – Select the minimum and maximum number of players that the skill supports. If there isn't a maximum, select No Limit. If the skill supports the Game Engine, this information is required. Otherwise, it is optional.
- ASK CLI – Add the required fields to the skill manifest as described in Specify Echo Button Skill Details.
Skill Code
When you write the code for your skill, use the additional directives that the Gadgets Skill API provides:
- If you included the Gadget Controller interface, you can animate the Echo Buttons by including the
GadgetController.SetLightdirective in response to any request from Alexa. For more information, see Control Echo Buttons. - If you included the Game Engine interface, you can receive input from Echo Buttons by including the
GameEngine.StartInputHandlerdirective in response to any request from Alexa. For more information, see Receive Echo Button Events and Define Echo Button Events.
For sample code, see Echo Button Sample Code.