Hello Buttons Skill
Important: The Gadgets Skill API is in beta and is subject to change at any time without notice. We welcome your feedback.
These instructions show how to create a simple skill called Hello Buttons. This skill demonstrates how to send directives to, and receive events from, Echo Buttons.
Note: Hello Buttons demonstrates how to use the Gadget interfaces (GameEngine and GadgetController). It is not intended to be a comprehensive example. For an end-to-end skill, please refer to the Color Changer sample.
This sample skill uses:
- The developer portal to configure the skill and specify the interaction model
Hello Buttons Skill Flow
When the Hello Buttons skill begins, it will send animation directives for the three possible trigger events (
none) to all the Echo Buttons. Alexa will then ask you to press the buttons, and an audio file will play.
When you press a button, the skill will interrupt Alexa's speech. If the button that you pressed is not awake, the skill will initialize the button by sending animation directives for
none to that button. This is different from the original
LaunchRequest intent, which sent initialization directives to all buttons.
If the pressed button wakes up, you will see a different color on
buttonUp events, as well as a breathing animation for the
none event. If you cancel the skill (for example, by saying "Alexa, cancel") or the Input Handler expires, the buttons will fade from white to black.
Before you create the Hello Buttons skill, you must take the following steps:
- Create an Amazon developer account If you don't already have an Amazon developer account, go to the developer portal and select Sign In in the upper right to create a free account.
- Get Echo Buttons This skill works best with two Echo Buttons, but you can also test using simulated buttons that will appear in the developer console.
Each skill consists of two basic parts, a front end and a back end. The front end is the voice interface, or VUI. The voice interface is configured through the voice interaction model. The back end is where the logic of your skill resides.
Three Options for Skill Setup
There are a number of different ways for you to setup your skill, depending on your experience and what tools you have available.
- If this is your first skill, try the Alexa-Hosted backend instructions to get started quickly.
- If you want to build a "classic" Alexa skill, and manage the backend resources in your own AWS account, you can follow the AWS-Hosted instructions.
- Developers with the ASK Command Line Interface configured may build the Alexa Hello Buttons skill from the command-line instructions.
- Amazon Developer Forums - Join the conversation!
- Hackster.io - See what others are building with Alexa.
Tutorials & Guides
- Voice Design Guide - A great resource for learning conversational and voice user interface design.
- Codecademy: Learn Alexa - Learn how to build an Alexa Skill from within your browser with this beginner friendly tutorial on Codecademy!