AlexaClient¶
Outgoing Messages¶
ConnectionStatusChanged¶
Notifies the platform implementation of an AVS connection status change.
JSON Structure¶
{
"header": {
"version": "4.0",
"messageType": "Publish",
"id": {{String}},
"messageDescription": {
"topic": "AlexaClient",
"action": "ConnectionStatusChanged"
}
},
"payload": {
"status": {{ConnectionStatus}},
"reason": {{ConnectionChangedReason}}
}
}
Payload¶
Property | Type | Required | Description | Example |
---|---|---|---|---|
status | ConnectionStatus | Yes | The new AVS connection status. | |
reason | ConnectionChangedReason | Yes | The reason for the status change. |
ConnectionStatusChanged¶
Notifies a listener about changes in connection status for multiple Alexa endpoints. There are multiple connections when using Local Voice Control.
JSON Structure¶
{
"header": {
"version": "4.0",
"messageType": "Publish",
"id": {{String}},
"messageDescription": {
"topic": "AlexaClient",
"action": "ConnectionStatusChanged"
}
},
"payload": {
"status": {{ConnectionStatus}},
"reason": {{ConnectionChangedReason}},
"detailed": {{ConnectionStatusDetails}}
}
}
Payload¶
Property | Type | Required | Description | Example |
---|---|---|---|---|
status | ConnectionStatus | Yes | The Alexa connection status. This is an aggregated status for the multiple connections. | |
reason | ConnectionChangedReason | Yes | The reason for the status change. | |
detailed | ConnectionStatusDetails | Yes | A detailed breakdown of connection status info per connection type. |
DialogStateChanged¶
Notifies the platform implementation of a dialog state change.
JSON Structure¶
{
"header": {
"version": "4.0",
"messageType": "Publish",
"id": {{String}},
"messageDescription": {
"topic": "AlexaClient",
"action": "DialogStateChanged"
}
},
"payload": {
"state": {{DialogState}},
"assistantId": {{Int}}
}
}
Payload¶
Property | Type | Required | Description | Example |
---|---|---|---|---|
state | DialogState | Yes | The new dialog state. | |
assistantId | Int | Yes | The ID of the assistant that the dialog state change is associated with. The assistantId is 2 for Alexa dialog state changes; For applications using multiple assistants, the value will be an integer greater than 2, corresponding to the assistant ID in Engine configuration field "aace.coassistant.assistants[i].id" for each additional assistant. | 2 |
AuthStateChanged¶
Notifies the platform implementation of an AVS authorization state change.
JSON Structure¶
{
"header": {
"version": "4.0",
"messageType": "Publish",
"id": {{String}},
"messageDescription": {
"topic": "AlexaClient",
"action": "AuthStateChanged"
}
},
"payload": {
"state": {{AuthState}},
"error": {{AuthError}}
}
}
Payload¶
Incoming Messages¶
StopForegroundActivity¶
Notifies the Engine to stop foreground activity.
JSON Structure¶
{
"header": {
"version": "4.0",
"messageType": "Publish",
"id": {{String}},
"messageDescription": {
"topic": "AlexaClient",
"action": "StopForegroundActivity"
}
}
}
Type Definitions¶
ConnectionStatusInfo¶
JSON Structure¶
{
"status": {{ConnectionStatus}},
"reason": {{ConnectionChangedReason}}
}
Properties¶
Property | Type | Required | Description | Example |
---|---|---|---|---|
status | ConnectionStatus | No (default: ConnectionStatus::DISCONNECTED ) |
The connection status. | |
reason | ConnectionChangedReason | No (default: ConnectionChangedReason::NONE ) |
The reason for the connection status change. |
ConnectionStatusDetails¶
JSON Structure¶
{
"avs": {{ConnectionStatusInfo}},
"local": {{ConnectionStatusInfo}}
}
Properties¶
Property | Type | Required | Description | Example |
---|---|---|---|---|
avs | ConnectionStatusInfo | Yes | Describes the connection to the Alexa Voice Service. | |
local | ConnectionStatusInfo | Yes | Describes the connection to the local endpoint. |
Enums¶
DialogState¶
Values¶
Value | Description |
---|---|
"IDLE" | Alexa is idle and ready for an interaction. |
"LISTENING" | Alexa is currently listening. |
"EXPECTING" | Alexa is currently expecting a response from the user. |
"THINKING" | A user request has completed, and no more user input is being accepted. Alexa is waiting for a response from AVS. |
"SPEAKING" | Alexa is responding to a request with speech. |
"FINISHED" | Alexa has finished processing a single Speak directive. If the Speak directive is part of a speech burst, the state will transition back to SPEAKING; if the Speak directive was the last in the burst, the state will transition back to IDLE. |
ConnectionStatus¶
Values¶
Value | Description |
---|---|
"DISCONNECTED" | Not connected to AVS. |
"PENDING" | Attempting to establish a connection to AVS. |
"CONNECTED" | Connected to AVS. |
ConnectionChangedReason¶
Values¶
Value | Description |
---|---|
"NONE" | No reason specified. |
"SUCCESS" | The connection status changed due to a successful operation. |
"UNRECOVERABLE_ERROR" | The connection status changed due to an error from which there is no recovery. |
"ACL_CLIENT_REQUEST" | The connection status changed due to a client request. |
"ACL_DISABLED" | The connection attempt failed because connection was disabled. |
"DNS_TIMEDOUT" | The connection attempt failed due to a DNS resolution timeout. |
"CONNECTION_TIMEDOUT" | The connection attempt failed due to a connection timeout. |
"CONNECTION_THROTTLED" | The connection attempt failed due to excessive load on the server. |
"INVALID_AUTH" | The provided access credentials were invalid. |
"PING_TIMEDOUT" | There was a timeout sending a ping request. |
"WRITE_TIMEDOUT" | There was a timeout writing to AVS. |
"READ_TIMEDOUT" | There was a timeout reading from AVS. |
"FAILURE_PROTOCOL_ERROR" | There was an underlying protocol error. |
"INTERNAL_ERROR" | There was an internal error. |
"SERVER_INTERNAL_ERROR" | There was an internal error on the server. |
"SERVER_SIDE_DISCONNECT" | The server asked the client to reconnect. |
"SERVER_ENDPOINT_CHANGED" | The server endpoint has changed. |