Alexa.MotionSensor interface in your Alexa add-on for devices that sense physical movement in an area. For example, a motion sensor attached to a front door. For more details about security add-ons, see Smart Home Security Overview.
If your motion sensors are components of a larger security system, your add-on can also implement the Alexa.ContactSensor and Alexa.SecurityPanelController interfaces for a unified customer experience.
For the list of languages that the Alexa.MotionSensor interface supports, see List of Alexa Interfaces and Supported Languages. For the definitions of the message properties, see Alexa Interface Message and Property Reference.
Properties
TheAlexa.MotionSensor interface uses detectionState as the primary property. You can use the following values for detectionState.
| Value | Description |
|---|---|
DETECTED | Motion detected. Your device and user settings determine the threshold for detecting motion. |
NOT_DETECTED | No motion detected. |
Discovery
You describe endpoints that supportAlexa.MotionSensor using the standard discovery mechanism described in Alexa.Discovery.
Set retrievable to true for the properties that you report when Alexa sends your add-on a state report request. Set proactivelyReported to true for the properties that you proactively report to Alexa in a change report.
Use MOTION_SENSOR for the display category. For the full list of display categories, see display categories.
Sensor devices must also implement Alexa.EndpointHealth.
Discover response example
The following example shows aDiscover.Response message for a motion sensor device that supports the Alexa.MotionSensor interface.
State reporting
Alexa sends aReportState directive to request information about the state of an endpoint. When Alexa sends a ReportState directive, you send a StateReport event in response. The response contains the current state of all retrievable properties in the context object. You identify your retrievable properties in your discovery response. For details about state reports, see Understand State and Change Reporting.
StateReport response example
Change reporting
You send aChangeReport event to report changes proactively in the state of an endpoint. You identify the properties that you proactively report in your discovery response. For details about change reports, see Understand State and Change Reporting.
When a motion sensor changes to DETECTED, and then changes to NOT_DETECTED, you must wait at least 30 seconds before sending the second change report.

