Site icon Renzo Mischianti

AWS Alexa Smart Home Skill: test your skill in dev and manage log – 7

Spread the love

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.

Amazon AWS Smart Home Skill test and manage log

Link the Alexa Smart Home Skill

Alexa Skill Smarthome: Install development skill
  1. Go to https://alexa.amazon.com, login with your developer account, and select Skills from the left menu.
  2. Click Your Skills from the top right of the section.
  3. On the Your Skills page, select the DEV SKILLS tab.
  4. Click the skill-esp8266-nodejs-smarthome-switch skill.
  5. 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”.
  6. On success, you should be presented with a window that reads “skill-esp8266-nodejs-smarthome-switch” has been successfully linked.
  7. When redirected back to the Skill page, you will be prompted Discover Devices. Click Discover Devices.
  8. 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.
Alexa Skill Smarthome: Smart home device founded

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.

Alexa Skill Smarthome: development test
  1. Navigate to https://developer.amazon.com/alexa/console/ask and select skill-sample-nodejs-smarthome-switch from the list of Alexa Skills.
  2. Select the Test tab.
  3. In the Alexa Simulator tab, leave English selected and type Alexa, turn on relay into the input box.
  4. If successful, Alexa should respond with ok.

Test the Skill with an Alexa-Enabled Device

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.

Review the logs on CloudWatch

Alexa Skill Smarthome: CloudWatch Management Console log
  1. 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)
    https://eu-west-1.console.aws.amazon.com/lambda/home?region=eu-west-1#/functions/lambda-skill-esp8266-nodejs-smarthome-switch/latest?tab=monitoring (Europe)
  2. Click the Latest invocation and review the Messages.
  3. 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.

Thanks

  1. AWS Alexa Smart Home Skill: introduction and startup
  2. AWS Alexa Smart Home Skill: create the skill manage the security
  3. AWS Alexa Smart Home Skill: create lambda and manage security
  4. AWS Alexa Smart Home Skill: configure lambda for the skill
  5. AWS Alexa Smart Home Skill: setup the DynamoDB database
  6. AWS Alexa Smart Home Skill: load sample code and test Lambda
  7. AWS Alexa Smart Home Skill: test your skill in dev and manage log

Spread the love
Exit mobile version