Test and Debug Your Smart Home Skill
Use the following methods and tools to help you test and debug state and other events as you build your Alexa Smart Home skill.
View Device State – View the current values of all properties of smart home devices that associated with your skill and your developer account, and whether the current value came from a
StateReportrequest or proactive state update, such as
Smart Home Debugger – View the
DeleteReportevents that Alexa receives from your skill, including your JSON, and any processing errors.
Smart Home Test – Run automated tests that send directives to your skill and verify that you set the state correctly. Available for the most common Alexa interfaces.
Alexa simulator – Test your skill without a device by using the Alexa simulator in the Alexa developer console.
Verify the minimum configuration
To test the end-to-end flow of your skill, you must complete the minimum configuration for a smart home skill. Use the left-hand navigation of the Build page in the developer console to navigate to the configuration item.
- In SMART HOME, you must define the following items for your smart home skill:
- Version v3 of the Smart Home API
- A valid AWS Lambda ARN service endpoint
A smart home skill can include multiple models. Specify the endpoint for the custom and smart home models.
- In ACCOUNT LINKING, configure the required fields.
- If your skill supports events, such as
ChangeReport, in PERMISSIONS, enable Send Alexa Events.
To test and publish your skill, you need an account configured for your device cloud and discoverable devices for that account.
Deploy your skill code
After you verify the minimum configuration for the skill in the developer console, deploy your skill code Lambda function. For details, see Add a Lambda Function.
Enable your skill in the developer console
Complete the steps to enable your skill for testing in the developer console.
Enable your skill in the Alexa app
Complete the following steps to enable your skill in the Alexa app installed on your desktop, or your iOS or Android mobile device.
- Sign in to the Alexa app with the same credentials as your developer account.
- To find your skill in the Alexa app, tap More, and then tap Skills & Games.
- In Skills & Games, tap Your Skills in the upper right corner.
- Scroll the skill types to the right, and then tap Dev.
- Scroll to find your skill.
- Tap on your skill name, and then tap ENABlE TO USE.
- Follow the prompts to enter your credentials for your device cloud account.
- To allow access to the skill, tap Allow, and then tap CLOSE.
If you're unable to complete account linking, make sure that you use valid credentials for the device cloud. Otherwise, there might be an issue with the account-linking information that you provided in the developer console. For help with this, see Debugging account linking in the developer forums.
- On Discover Devices in the Alexa app, tap DISCOVER DEVICES.
Alexa sends a
Discoverrequest to your skill to learn about the connected devices. Your skill returns the discovery response with the details about the devices.
- After Alexa finds your devices, tap SET UP DEVICE, and then tap DONE.
If the skill doesn't discover devices, check the logs for your Lambda function. Use the logs to troubleshoot the issue. Common issues include incorrectly formatted
If you make changes to the account linking configuration or your discover response, disable your skill in Your Skills.