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 skill called Color Changer, which demonstrates the core functionality of an Echo Button skill. It covers roll call, starting and stopping the Input Handler, and defining animations for different button events. It also demonstrates how Echo Buttons can interrupt text-to-speech (TTS).
- Node.js (> v6.9)
- Register for an AWS Account
- Install and Setup AWS CLI
- Configure a named AWS CLI Profile
- Register for an Amazon Developer Account
- Install and Setup ASK CLI
The following instructions show how to get this skill deployed using teh ASK CLI. If you would prefer to view instructions for how to perform the same steps using the Web UIs, please foolow the instruction in this guide.
-
Get a local copy of the Color Changer skill code from alexa-sample-nodejs-buttons-colorchanger GitHub. You may clone the repository locally, or simply download and unzip the sample code from GitHub.
git clone https://github.com/alexa/skill-sample-nodejs-buttons-colorchanger/
-
Initialize the ASK CLI by Navigating into the repository and running the command:
ask init
and create a new profile calledcolor-changer
. Follow the prompts to configure the profile and associate it with one of your AWS profilescd skill-sample-nodejs-buttons-colorchanger ask init -p color-changer
-
Install npm dependencies by navigating into the
/lambda/custom
directory and running the npm command:npm install
cd lambda/custom npm install
ASK CLI will create the skill and the lambda function for you. The Lambda function will be created in the region associated with the AWS profile that you selected.
-
Deploy the skill and the lambda function in one step by running the following command:
ask deploy -p color-changer
-
To test, you need to login to Alexa Developer Console, and enable the "Test" switch on your skill from the "Test" Tab.
-
Simulate verbal interaction with your skill through the command line using the following example:
ask simulate -l en-US -p color-changer -t "alexa, open color changer" ✓ Simulation created for simulation id: 8a5b18dc-24b9-04c0-d3bb-7b63d9887faf ◡ Waiting for simulation response{ "status": "SUCCESSFUL", ...
-
Once the "Test" switch is enabled, your skill can be tested on devices associated with the developer account as well. Speak to Alexa from any enabled device, from your browser at echosim.io, or through your Amazon Mobile App and say :
Alexa, open color changer
-
./skill.json
Change the skill name, example phrase, icons, testing instructions etc ...
Remember that many information is locale-specific and must be changed for each locale (en-GB and en-US)
See the Skill Manifest Documentation for more information.
-
./lambda/custom/*
Modify the skill logic
-
./models/*.json
Change the model definition to replace the invocation name and the sample phrase for each intent. Repeat the operation for each locale you are planning to support.
- Amazon Developer Forums - Join the conversation!
- Hackster.io - See what others are building with Alexa.
- Voice Design Guide - A great resource for learning conversational and voice user interface design.
- Trivia Template - A more complex skill sample, shows a full featured trivia game template
- Official Alexa Skills Kit Documentation - Official Alexa Skills Kit Documentation
- Alexa Skills Kit Node.js SDK
This sample is licensed under the Amazon Software License.