Amazon Developer

as

Settings
Sign out
Notifications
Alexa
Amazon Appstore
Ring
AWS
Documentation
Support
Contact Us
My Cases
Get started
Connect with Matter
Alexa Connect Kit
Add-ons
Certify
Resources

Step 5: Test the Add-on


In the previous step, you completed account linking between Alexa and your add-on. Now, in this final step of the tutorial, you can test the smart home add-on in the Alexa app and with voice on an Alexa-enabled device and the Alexa simulator.

Substeps to test the smart home add-on

Complete the following substeps to test that you can control the virtual light bulb by using the smart home add-on.

  1. Enable your add-on and account linking
  2. View the device
  3. Test your add-on with voice
  4. View the add-on log entries

Substep 5.1: Enable your add-on and account linking

In this substep you enable your add-on and perform account linking in the Alexa app.

To enable your add-on and account linking in the Alexa app

  1. Sign in to the Alexa app on your mobile device with the same credentials as your Alexa developer account.
  2. If you have Alexa+, follow these instructions to find your add-on in the Alexa app.
    1. Tap the three lines menu.
    2. Under More, tap Alexa+ Store.
    3. Scroll down, and then tap Browse Alexa Skills and Games.
  3. If you have the standard version, tap the three lines menu, and then tap Skills and Games.
  4. Scroll the skill types to the right, and then tap Dev.
  5. Tap my-smart-home-add-on, and then tap ENABLE TO USE.
  6. When Alexa prompts you, sign in to your Amazon developer account.
  7. To allow access to the add-on, tap Allow, and then tap CLOSE.

On success, you see the message, "my-smart-home-add-on has been successfully linked." If account linking fails, check your account linking configuration in the Alexa developer console in Step 4: Set up Account Linking. If you make changes to the account linking configuration or your discovery response, disable your add-on in Your Skills, and then go back to Substep 5.1: Enable your add-on and account linking.

Substep 5.2: View the device

After you enable and link the add-on, Alexa sends a Discover request to your add-on to learn about the connected devices. Your add-on returns the discovery response with the details about the virtual light bulb device. After Alexa finds your device, the Sample light device displays on the Devices page in the Alexa app.

If discovery fails, check the logs for your Lambda function. Use the logs to troubleshoot the issue. Common issues include incorrectly formatted discovery responses. If you make changes to the discovery response, disable your add-on in the Alexa app under Your Skills, and then go back to Substep 5.1: Enable your add-on and account linking.

Substep 5.3: Test your add-on with voice

If you have an Amazon Echo or another Alexa-enabled device associated with your Amazon developer account, you can ask Alexa to turn the light on and off with one of the following utterances.

User: Alexa, turn on the sample light.

User: Alexa, turn off the sample light.

You can also test your add-on with voice or text in the Alexa simulator.

To test your add-on in the Alexa simulator

  1. Sign in to the Alexa developer console.
  2. From the skill list, locate your add-on.
  3. Under ACTIONS, expand the dropdown list in your add-on's row, and then select Test.
  4. To test with voice, in the Allow developer.amazon.com to use your microphone? pop-up, select Allow.
  5. For Test is disabled for this skill, expand the dropdown list, and then select Development.
    The option changes to Skill testing is enabled in with Development selected.
  6. If you have already enabled testing, the console shows Skill testing is enabled in. Expand the dropdown list, and then select Development.
  7. In the simulator pane, enter an utterance.
    Or, to use voice, choose and hold the microphone, and then speak an utterance.

If the test is successful, Alexa says, "OK."

Substep 5.4: View the add-on log entries

AWS Lambda logs events, errors, and debugging information in AWS CloudWatch.

To view the add-on log entries on the CloudWatch console

  1. Sign in to the AWS management console.
  2. Navigate to the CloudWatch console.
  3. In the CloudWatch console, from the left menu under Logs, select Log groups.
  4. Under Log group, to open the log stream for your add-on, select /aws/lambda/my-smart-home-add-on.
  5. Under Log stream, to view logs for each directive that Alexa sent to the add-on, select the log entry that you want to view.
  6. Review the requests and values from Alexa and the responses from the Lambda function.

Congratulations!

After you review the requests from Alexa and the responses from the Lambda function, and your logs in AWS CloudWatch are clean, you finished Step 5 and completed the Build a Smart Home Add-on tutorial successfully.

Troubleshooting guide

You can use the Smart Home Devices page of the Alexa developer console to view device state to test and debug your smart home add-on.

Review the following items to find possible resolutions for common issues.

Q: Why can't I see the my-smart-home-add-on in the Alexa app?

Make sure that you log into the Alexa app with the same Amazon developer account that you used to create the add-on.

Q: Why can't doesn't account linking from the Alexa app work?

Make sure that you log into the Alexa app with the same Amazon developer account that you used to create the add-on. Also, verify the account linking configuration for your add-on in the developer console. Check that you copied the client ID and client secret correctly from LWA to the developer console. Be sure that there are no any trailing spaces in these values. For details, see Step 4: Set up Account Linking.

Q: Why can't Alexa discover the sample light?

Check the logs for your Lambda function to see if your add-on received a Discover directive. If it didn't receive the directive, check that you have the correct ARN configured for your add-on. If you have the right ARN and are still not receiving a directive, on your Lambda function page, make sure that the AWS Lambda region is set to US East (N. Virginia). If the region isn't US East, go back to Step c: Create a Lambda function.

Q: Why does Alexa say, "Sample light is not responding"?

Check the responses to the TurnOn and TurnOff directives in the logs. Verify that the response is formatted correctly and contains all the required properties. Compare your responses to the example responses in the Alexa.PowerController interface.

Clean up resources

After you complete the tutorial and start building your own add-ons, delete the resources that you no longer need.

To delete a Lambda function

  1. Navigate to the Lambda console.
  2. From the left menu, select Functions.
  3. Under Functions, find the my-smart-home-add-on, and then select the check box.
  4. From the Actions dropdown list, select Delete.

To delete an IAM role

  1. Navigate to the IAM dashboard.
  2. On the IAM Identity Center navigation pane, under Access management, select Roles.
  3. On the IAM > Roles page, select lambda_smart_home_add-on_role, and then choose Delete.

To delete an IAM policy

  1. On the IAM Identity Center navigation pane, under Access management, select Policies.
  2. On the IAM > Policies page, select smart_home_add-on_policy, and then choose Delete.
  3. From the Actions dropdown list, select Delete.

To delete an add-on

  1. Sign in to the Alexa developer console.
  2. On the Skills tab, under SKILL NAME, find my-smart-home-add-on that you created in Step 1: Create a Smart Home Add-on.
  3. Expand the dropdown list under ACTIONS, and then select Delete.

Was this page helpful?

Last updated: May 01, 2026