Skip to content

Alexa Smart Home Skill Lambda randomly fails for specific percentage values with "doesn't support that" error

0

I have an AWS Lambda function powering my Alexa Smart Home Skill that controls motorized shades. Most commands work correctly, for example:

Utterance
open shade 1 to 1%
open shade 1 to 1%
open shade 1 to 3%
open shade 1 to 4%
...
open shade 1 to 100%

However, when using specific percentage values (most commonly 2%, 5%, 7%, 25%, 50%, 55%, 77%), Alexa frequently responds with the following error message:

"Shade 1 doesn't support that."

The Lambda logs do not show any errors during these failed attempts.

After retrying the same utterance multiple times, the command sometimes works successfully and is reflected in the backend.

The problem seems isolated only to these percentage values.

My expectation is that the command should be fully transparent and consistent for all values between 1–100%.

Has anyone encountered this issue with Alexa Smart Home Skills and Lambda integration? Could this be related to how Alexa parses percentage values, or is there an underlying configuration/validation issue I should check?

Here my Lambda Function code:

https://drive.google.com/drive/folders/1OJT0zrzgZFzibG1PLYUprtJK4k1MPMEq?usp=share_link

Enter image description here

Enter image description here

Enter image description here

Enter image description here

asked 6 months ago143 views
1 Answer
0

This issue with your Alexa Smart Home Skill Lambda function appears to be related to request validation or handling of specific percentage values.

For Alexa Smart Home Skills, it's important to validate all request and response payloads against the JSON schema for all possible Alexa Smart Home messages. The inconsistent behavior with specific percentage values (2%, 5%, 7%, 25%, 50%, 55%, 77%) suggests there might be an issue with how these values are being processed or validated.

A few things to check:

  1. Ensure your Lambda function timeout is set to less than eight seconds, as the Alexa Service has an eight-second timeout. If your function takes too long to process certain percentage values, it might result in the error you're seeing.

  2. Validate your request and response payloads against the JSON schema for Alexa Smart Home messages. There might be an issue with how specific percentage values are being handled in your code.

  3. Check if there's any conditional logic in your code that might be treating these specific percentage values differently.

  4. Consider using the skill beta testing tool to collect feedback and test these specific percentage values more systematically.

  5. If you're storing state in DynamoDB, ensure your table is configured optimally. For skills with heavy reads, consider using DynamoDB Accelerator (DAX) to improve response times.

Since the Lambda logs don't show errors during these failed attempts, the issue might be occurring before your code is executed or in how Alexa is interpreting the responses from your Lambda function. The fact that retrying sometimes works suggests there might be a timing or race condition issue.
Sources
Alexa skills - Serverless Applications Lens

answered 6 months ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.