Alexa.InputController Interface
The InputController interface describes messages for changing the input of an entertainment device.
Directives
This control and query directives in this interface are supported in skills that target the following language:
- English (US)
See Develop Smart Home Skills in Multiple Languages for more information.
SelectInput
Request to change to the input or input device.
“Alexa, change the input to input name”
Example Request:
{
"directive": {
"header": {
"namespace": "Alexa.InputController",
"name": "SelectInput",
"messageId": "c8d53423-b49b-48ee-9181-f50acedf2870",
"correlationToken": "dFMb0z+PgpgdDmluhJ1LddFvSqZ/jCc8ptlAKulUj90jSqg==",
"payloadVersion": "3"
},
"endpoint": {
"scope": {
"type": "BearerToken",
"token":"some-access-token"
},
"endpointId": "device-001",
"cookie": { }
},
"payload": {
"input": "HDMI1"
}
}
}
Payload details
| Property | Description | Type | Required |
|---|---|---|---|
input |
The identifier for the input device the customer requested | string | Yes |
Events and Properties
For this interface, you must reply:
- Synchronously, which means you send a Response to Alexa in from the Lambda function.
When you send a Response, you should include the state of reportable properties in the context of the message
Reportable Properties
When the input state changes, send a state report containing an input property.
| Property Name | Property Type | Description |
|---|---|---|
input |
Input | String identifying the new input device such as “HDMI1”. |
Response
Send an Response when you successfully handle a SelectInput directive.
Example Response
The following example shows an Alexa response.
{
"context": {
"properties": [
{
"namespace": "Alexa.InputController",
"name": "input",
"value": "HDMI 1",
"timeOfSample": "2017-02-03T16:20:50.52Z",
"uncertaintyInMilliseconds": 0
}
]
},
"event": {
"header": {
"messageId": "30d2cd1a-ce4f-4542-aa5e-04bd0a6492d5",
"correlationToken": "dFMb0z+PgpgdDmluhJ1LddFvSqZ/jCc8ptlAKulUj90jSqg==",
"namespace": "Alexa",
"name": "Response",
"payloadVersion": "3"
},
"endpoint":{
"endpointId":"appliance-001"
},
"payload":{ }
}
}
ErrorResponse
You should reply with an error if you cannot complete the customer request for some reason. See Error.Response for more details.
Additional Sample Code
See the sample request and response messages in the Alexa smart home GitHub repo: