Alexa.InputController Interface 3
Implement the Alexa.InputController
interface in your Alexa Smart Home skill so that users can change the input of an entertainment device. For details about entertainment device skills, see Build Smart Home Skills for Entertainment Devices. For details about video skills, see Understand Video Skills.
For the list of languages that the Alexa.InputController
interface supports, see List of Alexa Interfaces and Supported Languages. For the definitions of the message properties, see Alexa Interface Message and Property Reference.
Utterances
The Alexa.InputController
interface uses the pre-built voice interaction model. The following examples show some user utterances:
Alexa, change the input to DVD on the Living Room TV.
Alexa, switch to HDMI two on the Living Room TV.
Alexa, switch to AnyCompany TV on the Kitchen TV.
Alexa, ändere den Eingang am Fernseher im Wohnzimmer auf DVD.
Alexa, schalte auf dem Fernseher im Wohnzimmer auf HDMI zwei um.
Alexa, wechsle auf dem Küchenfernseher zu Arte.
Alexa, change le port d'entrée sur DVD dans le salon.
Alexa, change la télé du salon à HDMI 2.
Alexa, change à France 2 sur la télé.
Alexa, लिविंग रूम टीवी पर इनपुट को DVD में बदलें।
Alexa, लिविंग रूम टीवी पर HDMI दो पर स्विच करें
Alexa, किचन टीवी पर AnyCompany TV पर स्विच करें।
Alexa, cambia l'ingresso in DVD sulla TV del soggiorno.
Alexa, passa a HDMI due sulla TV del soggiorno.
Alexa, passa a Rai 1 sulla TV.
アレクサ、リビングのテレビの入力をDVDに変えて
アレクサ、リビングのテレビの入力をHDMI2に切り替えて
アレクサ、キッチンのテレビをNHKに切り替えて
Alexa, mude a entrada para DVD na TV da sala de estar.
Alexa, mude a entrada para HDMI dois na TV da sala de estar.
Alexa, mude para Band na TV da cozinha.
Alexa, cambia la entrada a DVD en el televisor de la sala.
Alexa, cambia a HDMI dos en el televisor de la sala.
Alexa, cambia a Discovery en la tele de la cocina.
Alexa, verander de input van de woonkamertv naar dvd.
Alexa, switch naar HDMI twee op de woonkamertv.
Alexa, switch naar AnyCompany TV op de keukentv.
After the user says one of these utterances, Alexa sends a corresponding directive to your skill.
Properties
Reportable properties
The Alexa.InputController
interface uses the input
property as the primary property. The property values are strings.
Input property values
To indicate the inputs that your device supports, set the input
property to one of the following values:
AUX 1
, AUX 2
, AUX 3
, AUX 4
, AUX 5
, AUX 6
, AUX 7
, BLURAY
, CABLE
, CD
, COAX 1
, COAX 2
, COMPOSITE 1
, DVD
, GAME
, HD RADIO
, HDMI 1
, HDMI 2
, HDMI 3
, HDMI 4
, HDMI 5
, HDMI 6
, HDMI 7
, HDMI 8
, HDMI 9
, HDMI 10
, HDMI ARC
, INPUT 1
, INPUT 2
, INPUT 3
, INPUT 4
, INPUT 5
, INPUT 6
, INPUT 7
, INPUT 8
, INPUT 9
, INPUT 10
, IPOD
, LINE 1
, LINE 2
, LINE 3
, LINE 4
, LINE 5
, LINE 6
, LINE 7
, MEDIA PLAYER
, OPTICAL 1
, OPTICAL 2
, PHONO
, PLAYSTATION
, PLAYSTATION 3
, PLAYSTATION 4
, SATELLITE
, SMARTCAST
, TUNER
, TV
, USB DAC
, VIDEO 1
, VIDEO 2
, VIDEO 3
, XBOX
Discovery
You describe endpoints that support Alexa.InputController
by using the standard discovery mechanism described in Alexa.Discovery
.
Set retrievable
to true
for the properties that you report when Alexa sends your skill a state report request.
Set proactivelyReported
to true
for the properties that you proactively report to Alexa in a change report.
Use TV
, STREAMING_DEVICE
, GAME_CONSOLE
, or other appropriate display category. For the full list of display categories, see display categories.
To let Alexa know the health of your device, also implement the Alexa.EndpointHealth
interface.
Configuration object
In addition to the usual discovery response fields, for Alexa.InputController
, include a configuration object that contains the following fields.
Property | Description | Type | Required |
---|---|---|---|
|
Inputs that your device supports. |
Array of objects |
Yes |
|
Name of an input that your device supports. Each name must be unique across inputs for this device. |
String |
Yes |
|
List of alternate names to identify the input. Each friendly name must be unique across inputs for this device. Support |
Array of strings |
No |
Discover response example
The following example shows a Discover.Response
message for a television that supports the Alexa.InputController
and Alexa.PowerController
interfaces. For the full list of recommended interfaces for a television, see Smart Home Skill Device Templates.
{
"event": {
"header": {
"namespace": "Alexa.Discovery",
"name": "Discover.Response",
"payloadVersion": "3",
"messageId": "Unique identifier, preferably a version 4 UUID"
},
"payload": {
"endpoints": [{
"endpointId": "Unique ID of the endpoint",
"manufacturerName": "Manufacturer name of the endpoint",
"description": "Smart Television by Television Maker",
"friendlyName": "Living Room TV",
"displayCategories": ["TV"],
"cookie": {},
"capabilities": [{
"type": "AlexaInterface",
"interface": "Alexa.InputController",
"version": "3",
"properties": {
"supported": [{
"name": "input"
}],
"proactivelyReported": true,
"retrievable": true
},
"inputs": [{
"name": "HDMI 1",
"friendNames": ["AnyCompany TV"]
},
{
"name": "HDMI 2",
"friendlyNames": ["Cable", "AnyCompany Cable"]
}
]
},
{
"type": "AlexaInterface",
"interface": "Alexa.PowerController",
"version": "3",
"properties": {
"supported": [{
"name": "powerState"
}],
"proactivelyReported": true,
"retrievable": true
}
},
{
"type": "AlexaInterface",
"interface": "Alexa.EndpointHealth",
"version": "3.1",
"properties": {
"supported": [{
"name": "connectivity"
}],
"proactivelyReported": true,
"retrievable": true
}
},
{
"type": "AlexaInterface",
"interface": "Alexa",
"version": "3"
}
]
}]
}
}
}
AddOrUpdateReport
You must proactively send an Alexa.Discovery.AddOrUpdateReport
message if the feature support of your endpoint changes after your initial discovery response. For example, if the inputs that your device supports changes, notify Alexa by sending an AddOrUpdateReport
message. For details, see AddOrUpdateReport
.
AddOrUpdateReport event example
The following example shows additional inputs for the endpoint.
{
"event": {
"header": {
"namespace": "Alexa.Discovery",
"name": "AddOrUpdateReport",
"payloadVersion": "3",
"messageId": "Unique identifier, preferably a version 4 UUID"
},
"payload": {
"endpoints": [{
"endpointId": "Unique ID of the endpoint",
"manufacturerName": "Manufacturer of the endpoint",
"description": "Smart Television by Television Maker",
"friendlyName": "Living Room TV",
"displayCategories": ["TV"],
"cookie": {},
"capabilities": [{
"type": "AlexaInterface",
"interface": "Alexa.InputController",
"version": "3",
"properties": {
"supported": [{
"name": "input"
}],
"proactivelyReported": true,
"retrievable": true
},
"inputs": [{
"name": "HDMI 1",
"friendNames": ["AnyCompany TV"]
},
{
"name": "HDMI 2",
"friendlyNames": ["Cable", "AnyCompany Cable"]
},
{
"name": "AUX 1",
"friendlyNames": ["DVD Player"]
},
{
"name": "AUX 2"
}
]
},
{
"type": "AlexaInterface",
"interface": "Alexa.PowerController",
"version": "3",
"properties": {
"supported": [{
"name": "powerState"
}],
"proactivelyReported": true,
"retrievable": true
}
},
{
"type": "AlexaInterface",
"interface": "Alexa",
"version": "3"
}
]
}]
}
}
}
Directives
Alexa sends the following Alexa.InputController
interface directives to your skill.
SelectInput directive
Support the SelectInput
directive so that users can change the input on a device.
The following examples show user utterances:
Alexa, change the input to HDMI one on the Living Room TV.
Alexa, ändere den Eingang am Fernseher im Wohnzimmer auf HDMI eins.
Alexa, ändere den Eingang auf HDMI eins auf dem Wohnzimmerfernseher.
Alexa, change le port d'entrée sur HDMI 1 sur le téléviseur du salon.
Alexa, लिविंग रूम टीवी पर इनपुट को HDMI एक में बदलें।
Alexa, cambia l'ingresso HDMI sulla TV del soggiorno.
アレクサ、リビングのテレビの入力をHDMI1に変えて
Alexa, mude a entrada para HDMI um na TV da sala de estar.
Alexa, cambia la entrada a HDMI 1 en el televisor de la sala.
Alexa, verander de input naar HDMI een op de woonkamertv.
SelectInput directive example
The following example shows a SelectInput
directive that Alexa sends to your skill.
{
"directive": {
"header": {
"namespace": "Alexa.InputController",
"name": "SelectInput",
"messageId": "Unique version 4 UUID",
"correlationToken": "Opaque correlation token",
"payloadVersion": "3"
},
"endpoint": {
"scope": {
"type": "BearerToken",
"token": "OAuth2.0 bearer token"
},
"endpointId": "Endpoint ID",
"cookie": {}
},
"payload": {
"input": "HDMI 1"
}
}
}
SelectInput directive payload
The following table shows the payload details for the SelectInput
directive.
Property | Description | Type | Required |
---|---|---|---|
|
Indicates the |
String |
Yes |
SelectInput response
If you handle a SelectInput
directive successfully, respond with an Alexa.Response event. In the context object, include the values of all properties that changed.
The following example shows a SelectInput
response.
{
"event": {
"header": {
"namespace": "Alexa",
"name": "Response",
"messageId": "Unique identifier, preferably a version 4 UUID",
"correlationToken": "Opaque correlation token that matches the request",
"payloadVersion": "3"
},
"endpoint": {
"endpointId": "Endpoint ID"
},
"payload": {}
},
"context": {
"properties": [{
"namespace": "Alexa.InputController",
"name": "input",
"value": "HDMI 1",
"timeOfSample": "2017-02-03T16:20:50.52Z",
"uncertaintyInMilliseconds": 0
},
{
"namespace": "Alexa.PowerController",
"name": "powerState",
"value": "ON",
"timeOfSample": "2017-02-03T16:18:40.12Z",
"uncertaintyInMilliseconds": 500
},
{
"namespace": "Alexa.EndpointHealth",
"name": "connectivity",
"value": {
"value": "OK"
},
"timeOfSample": "2017-02-03T16:15:40.12Z",
"uncertaintyInMilliseconds": 0
}
]
}
}
SelectInput directive error handling
If you can't handle a SelectInput
directive successfully, respond with an Alexa.ErrorResponse event.
State reporting
Alexa sends a ReportState
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 the 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
{
"event": {
"header": {
"namespace": "Alexa",
"name": "StateReport",
"messageId": "Unique identifier, preferably a version 4 UUID",
"correlationToken": "Opaque correlation token that matches the request",
"payloadVersion": "3"
},
"endpoint": {
"scope": {
"type": "BearerToken",
"token": "OAuth2.0 bearer token"
},
"endpointId": "Endpoint ID"
},
"payload": {}
},
"context": {
"properties": [{
"namespace": "Alexa.InputController",
"name": "input",
"value": "HDMI 1",
"timeOfSample": "2017-02-03T16:20:50.52Z",
"uncertaintyInMilliseconds": 0
},
{
"namespace": "Alexa.PowerController",
"name": "powerState",
"value": "ON",
"timeOfSample": "2017-02-03T16:20:50.52Z",
"uncertaintyInMilliseconds": 500
},
{
"namespace": "Alexa.EndpointHealth",
"name": "connectivity",
"value": {
"value": "OK"
},
"timeOfSample": "2017-02-03T16:20:50Z",
"uncertaintyInMilliseconds": 0
}
]
}
}
Change reporting
You send a ChangeReport
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.
ChangeReport event example
{
"event": {
"header": {
"namespace": "Alexa",
"name": "ChangeReport",
"messageId": "Unique identifier, preferably a version 4 UUID",
"payloadVersion": "3"
},
"endpoint": {
"scope": {
"type": "BearerToken",
"token": "OAuth2.0 bearer token"
},
"endpointId": "Endpoint ID"
},
"payload": {
"change": {
"cause": {
"type": "VOICE_INTERACTION"
},
"properties": [{
"namespace": "Alexa.InputController",
"name": "input",
"value": "HDMI 2",
"timeOfSample": "2017-02-03T16:40:50.52Z",
"uncertaintyInMilliseconds": 0
}]
}
}
},
"context": {
"properties": [{
"namespace": "Alexa.PowerController",
"name": "powerState",
"value": "ON",
"timeOfSample": "2017-02-03T16:18:40.12Z",
"uncertaintyInMilliseconds": 500
}, {
"namespace": "Alexa.EndpointHealth",
"name": "connectivity",
"value": {
"value": "OK"
},
"timeOfSample": "2017-02-03T16:15:40.12Z",
"uncertaintyInMilliseconds": 0
}]
}
}
Related topics
Last updated: Aug 23, 2024