AWS Alexa Smart Home Skill: test your skill in dev and manage log – 7
We have reached the last phase, now we have to go and test our smart home skill on a device, this must first be enabled and linked to your Amazon developer account.
- Go to https://alexa.amazon.com, login with your developer account, and select Skills from the left menu.
- Click Your Skills from the top right of the section.
- On the Your Skills page, select the DEV SKILLS tab.
- Click the skill-esp8266-nodejs-smarthome-switch skill.
- On the skill-esp8266-nodejs-smarthome-switch page, click Enable in the top right and authenticate with your Amazon developer account. If you are already signed in, you will be presented with a dialog asking to “Click ‘Allow’ to sign in to Smart Home Sample”.
- On success, you should be presented with a window that reads “skill-esp8266-nodejs-smarthome-switch” has been successfully linked.
- When redirected back to the Skill page, you will be prompted Discover Devices. Click Discover Devices.
- After the discovery process completes, a new “Relay test” with the description of “esp8266 relay test www.mischianti.org” will be available in your Devices list.
Test the Skill through the Alexa Developer Console
The Alexa Developer Console has test functionality built-in and can be used to test your skills under development.
- Navigate to https://developer.amazon.com/alexa/console/ask and select skill-sample-nodejs-smarthome-switch from the list of Alexa Skills.
- Select the Test tab.
- In the Alexa Simulator tab, leave English selected and type
Alexa, turn on relayinto the input box.
- If successful, Alexa should respond with
If you have an Amazon Echo or other Alexa-enabled device associated to your Amazon developer account, you can give that device the command “Alexa, turn on relay” and she should respond with “OK”.
Review the Skill Logs
Interactions between Alexa and the AWS Lambda function are recorded in AWS CloudWatch. Those logs are useful for investigating what information is sent back and forth to the Lambda function.
- Browse to
https://us-east-1.console.aws.amazon.com/lambda/home?region=us-east-1#/functions/lambda-skill-esp8266-nodejs-smarthome-switch/latest?tab=monitoring (North America)
- Click the Latest invocation and review the Messages.
- Note the values recorded in the logs. The inbound handler request and context values are from Alexa. The outbound handler response value is from the Lambda function.
- AWS Alexa Smart Home Skill: introduction and startup
- AWS Alexa Smart Home Skill: create the skill manage the security
- AWS Alexa Smart Home Skill: create lambda and manage security
- AWS Alexa Smart Home Skill: configure lambda for the skill
- AWS Alexa Smart Home Skill: setup the DynamoDB database
- AWS Alexa Smart Home Skill: load sample code and test Lambda
- AWS Alexa Smart Home Skill: test your skill in dev and manage log