You want to use the PlayNamedChoreo command in an onMount handler but it works very unreliably?
When a user uses the wake up word, the Smart Motion extension is temporarily disabled. As a workaround, you could work with the delay property, but even that doesn't guarantee that the command will be executed afterwards.
User: Alexa, do something Alexa: Your skill sends a response with a RenderDocument directive and your APL document uses an onMount handler with the PlayNamedChoreo command.
In this case, the Smart Motion extension may still be blocked by the wakeup word acknowledgement.
I made this custom command "EnqueuePlayNamedChoreo" which ensures that the command is executed within a defined timeout (the default is 1 second). It checks if the Smart Motion extension is in an error state and whether the specified choreo is available.
To use the command you need to copy "EnqueuePlayNamedChoreo" (the command starts in line 24) into your APL document, also you need to load the Smart Motion Extension (this happens in line 11) in addition to configure the deviceStateName property of the extension with the value deviceState (this happens in line 7).
How to use this command:
Be the first to comment.