Alexa.SecurityPanelController.ErrorResponse Interface
If Alexa sends an Alexa.SecurityPanelController
directive to your skill and you can't handle it successfully, respond with an Alexa.SecurityPanelController.ErrorResponse
event. For more information, see Alexa.SecurityPanelController Interface.
Error response event
In the payload for the Alexa.SecurityPanelController.ErrorResponse
, specify the type of the error and include a message with information about the error. For the list of Alexa.SecurityPanelController
error types, see Error type values.
ErrorResponse event payload details
Field | Description | Type | Required |
---|---|---|---|
type |
The type of error. | String | Yes |
message |
The error message for the error. | String | Yes |
ErrorResponse event format
{
"event": {
"header": {
"namespace": "Alexa.Health",
"name": "ErrorResponse",
"messageId": "<message id>",
"payloadVersion": "1"
},
"payload": {
"type": "<error type>",
"message": "<error message>"
}
}
}
Error type values
The following table shows the valid Alexa.SecurityPanelController
error types.
Type | Description |
---|---|
AUTHORIZATION_REQUIRED |
Use this error type when the current state of the security system is ARMED_AWAY and your skill receives an Arm directive that requests to change the state to ARMED_STAY or ARMED_NIGHT . |
BYPASS_NEEDED |
The security panel has open zones that must be bypassed for the requested operation to succeed. |
NOT_READY |
The security panel is not ready for arming and disarming. Use this error type when a customer tries to control the security panel while it's in installer mode. |
UNAUTHORIZED |
The PIN code is not correct. |
UNCLEARED_ALARM |
Use this error type when the security panel has an active alarm and your skill receives an Arm directive. |
UNCLEARED_TROUBLE |
The security panel has a trouble condition. |
In addition to the Alexa.SecurityPanelController
error types, you can also use Alexa error types. For more information, see Alexa.ErrorResponse error type values.
Examples
The following example shows the error response when the customer attempts to switch directly from ARMED_AWAY
to ARMED_NIGHT
or ARMED_STAY
without disarming the system first.
Timer already running example
{
"event": {
"header": {
"namespace": "Alexa.SecurityPanelController",
"name": "ErrorResponse",
"messageId": "<message id>",
"correlationToken": "<an opaque correlation token>",
"payloadVersion": "3"
},
"endpoint": {
"scope": {
"type": "BearerToken",
"token": "<an OAuth2 bearer token>"
},
"endpointId": "<endpoint id>"
},
"payload": {
"type": "AUTHORIZATION_REQUIRED",
"message": "You must disarm the system before you can set the requested arm state."
}
}
}
The following example shows the error response when the customer attempts to arm a security system that is in an alarm state.
Timer already running example
{
"event": {
"header": {
"namespace": "Alexa.SecurityPanelController",
"name": "ErrorResponse",
"messageId": "<message id>",
"correlationToken": "<an opaque correlation token>",
"payloadVersion": "3"
},
"endpoint": {
"scope": {
"type": "BearerToken",
"token": "<an OAuth2 bearer token>"
},
"endpointId": "<endpoint id>"
},
"payload": {
"type": "UNCLEARED_ALARM",
"message": "Unable to arm or disarm the security panel because it is in alarm status."
}
}
}
Related Interfaces
Interface | Description |
---|---|
Alexa.ErrorResponse | Defines general errors for Alexa skills. |