Alexa.ModeController interface in your Alexa add-on so that users can control the mode settings of a device. You can use the Alexa.ModeController interface to model properties of a device that the user can set to one of a list of values, such as the wash cycle mode of a washing machine. The list of values can have an order, but that’s not required. The Alexa.ModeController interface is a generic controller interface.
The Alexa.ModeController interface is highly configurable and enables you to model many different kinds of settings for many different kinds of devices. Use one of the following more specific interfaces if it’s appropriate for your device:
Alexa.CookingandCookingModeAlexa.EqualizerControllerandModeAlexa.LockControllerandLockStateAlexa.ThermostatControllerandThermostatMode
Alexa.ModeController 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
TheAlexa.ModeController interface uses the pre-built voice interaction model. After the user says one of the following utterances, Alexa sends a corresponding directive to your add-on.
The following examples show some user utterances:
- English (All)
- German
- French (All)
- Hindi
- Italian
- Japanese
- Portuguese
- Spanish (All)
- English (All)
- German
- French (All)
- Hindi
- Italian
- Japanese
- Portuguese
- Spanish (All)
Properties and objects
TheAlexa.ModeController interface defines the following properties and objects.
Mode property
TheAlexa.ModeController interface uses the mode property as the primary property. The property values are strings. The Mode object defines the acceptable values for the mode.
An endpoint can support multiple modes. To distinguish modes, you must always include the instance attribute. This attribute defines the name of the mode. You identify your instance names in your discovery response.
Mode property example
Mode object
TheMode object represents an acceptable value for a mode. You include at least two Mode objects in the supportedModes array in your discovery response.
The following example shows two Mode objects in a supportedModes array.
Mode object.
| Field | Description | Type |
|---|---|---|
value | Name of the mode value. | String |
modeResources | Friendly names that users can use to interact with the mode value. | ModeResources object |
ModeResources object
Use theModeResources object to provide a set of friendly names that users can use to interact with mode values. The first friendly name is the name that appears in the Alexa app. For details, see Resources and Assets.
The following example shows the mode resources for the delicate wash cycle of a washing machine. Users can say phrases like
Semantics
Use semantics to enable additional features, such as additional user utterances and announcements when your device requires attention. To use semantics, include a semantics object in your discover response as described in the discovery section.Use semantics to enable additional utterances
When you use theAlexa.ModeController interface, the voice interaction model is already built for you. Users can interact with your device by saying the standard Alexa.ModeController utterances. For details, see utterances.
You can optionally enable additional utterances by using semantics. When you use semantics, you manually map the phrases , , , and to the Alexa.ModeController directives SetMode and AdjustMode. For example, if you have a controller for a garage door opener, you can map the phrase to the SetMode directive.
Use semantics to enable announcements
You can use semantics to enable announcements to the user when your device requires attention. Announcements take the form,Your <device friendly name> is <state>. For example, when their automatic vacuum cleaner gets stuck, Alexa notifies the user with the following announcement:
To enable announcements, implement the Alexa.ProactiveNotificationSource interface in your Alexa add-on. To indicate the states that you support, include a semantics object in your discovery response to map the mode property to one of the Alexa.States values, such as Alexa.States.Stuck. You trigger announcements by sending an Alexa.ChangeReport to report a change in the device state. For more details about announcement text, see Alexa.ProactiveNotificationSource.
Discovery
You describe endpoints that supportAlexa.ModeController by 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.
You can model properties of an endpoint that users can’t change by setting nonControllable to true. For example, when a washing machine automatically goes from wash, to rinse, to spin, you can report the current wash cycle to the user without allowing them to change it.
For each Alexa.ModeController entry in the capabilities array, you can optionally include a semantics object. For details, see use semantics to enable additional utterances and use semantics to enable announcements.
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.
Capabilities object
In addition to the usual discovery response fields, for eachAlexa.ModeController entry in the capabilities array, include the following fields.
| Field | Description | Type |
|---|---|---|
instance | Name of the mode, for example Washer.WashCycle or Washer.WashTemperature. | String |
capabilityResources | Friendly names that users can use to interact with the mode. If you enable announcements for the instance friendly name, include @type set to text. | CapabilityResources object |
configuration.ordered | Set to true, if the mode values have an order; otherwise, set to false. For example, a wash temperature mode could have values ordered from cold, to warm, to hot.Modes that have an order support the AdjustMode directive. | Boolean |
configuration.supportedModes | Specifies the list of accepted mode values. You must include a minimum of two mode objects. List ordered mode values in increasing order in the array. | Array of Mode objects |
Discovery response examples
Washing machine example
The following example shows aDiscover.Response message for a washing machine that supports three modes defined by three instances: Washer.WashCycle, Washer.CurrentWashCycle, and Washer.WashTemperature.
Show/hide discovery response
Show/hide discovery response
Semantics for blinds example
The following example shows aDiscover.Response message for blinds that support the Alexa.ModeController interface and uses semantics. Use the Alexa.ModeController interface for blinds that only fully open and fully close. If your blinds can raise and lower to a range of positions, use the RangeController interface instead.
You can use the Alexa.ModeController interface for your add-ons that control blinds in the following locales: de-DE, en-AU, en-GB, en-IN, en-US, es-ES, es-MX, es-US, it-IT, ja-JP.
Show/hide discovery response
Show/hide discovery response
Semantics for a garage door opener example
The following example shows aDiscover.Response message for a garage door opener that supports the Alexa.ModeController interface and uses semantics. If your device is a garage door opener, you must use both the Alexa.ModeController interface and the GARAGE_DOOR display category.
For a garage door device, after the user asks to open the garage door, Alexa asks before opening the garage door.
You can use the Alexa.ModeController interface for your add-ons that control a garage door in the following locales: de-DE, en-GB, en-US, es-ES, es-US, fr-FR, it-IT.
Show/hide discovery response
Show/hide discovery response
Directives
Alexa sends the followingAlexa.ModeController interface directives to your add-on.
SetMode directive
Support theSetMode directive so that users can set the mode of a device.
The following examples show user utterances:
- English (All)
- German
- French (All)
- Hindi
- Italian
- Japanese
- Portuguese
- Spanish (All)
SetMode directive example
The following example shows aSetMode directive that Alexa sends to your add-on.
SetMode directive payload
| Property | Description | Type | Required |
|---|---|---|---|
mode | Mode to set for the device. | String | Yes |
SetMode response
If you handle aSetMode directive successfully, respond with an Alexa.Response event. You can respond synchronously or asynchronously. If you respond asynchronously, include a correlation token and a scope with an authorization token.
In the context object, include the values of all properties that changed. You must include the instance for each mode property that you report.
The following example reports that the Washer.WashCycle mode value changed.
SetMode directive error handling
If you can’t handle aSetMode directive successfully, respond with an Alexa.ErrorResponse event. If your error is safety related, respond with an Alexa.Safety.ErrorResponse.
AdjustMode directive
For modes that have an order, support theAdjustMode directive so that users can adjust the mode of a device.
When you set configuration.ordered to true in the discovery response, with this directive, users can increase or decrease the mode by a specified delta. This directive doesn’t restrict requests based on the current mode. That means you can support wrapped modes by appropriately handling requests to increase and decrease the mode.
The following examples show user utterances:
- English (All)
- German
- French (All)
- Hindi
- Italian
- Japanese
- Portuguese
- Spanish (All)
AdjustMode directive example
The following example shows anAdjustMode directive that Alexa sends to your add-on.
AdjustMode directive payload
| Property | Description | Type | Required |
|---|---|---|---|
modeDelta | The amount by which to change the mode. The default is 1. | Integer | No |
AdjustMode response
If you handle anAdjustMode directive successfully, respond with an Alexa.Response event. You can respond synchronously or asynchronously. If you respond asynchronously, include a correlation token and a scope with an authorization token.
In the context object, include the values of all properties that changed. You must include the instance for each mode property that you’re reporting.
The following example shows an AdjustMode response.
AdjustMode directive error handling
If you can’t handle anAdjustMode directive successfully, respond with an Alexa.ErrorResponse event. If your error is safety related, respond with an Alexa.Safety.ErrorResponse.
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. For details about state reports, see Understand State and Change Reporting.
The response contains the current state of all the retrievable properties in the context object. You must include the instance for each mode property that you report. You identify the retrievable properties and instance names in your discovery response.
When a mode isn’t set, for example, when the device is off, report null for the mode property.
Support the ReportState directive so that users can ask about the features of their devices.
The following examples show some user utterances:
- English (All)
- German
- French (All)
- Hindi
- Italian
- Japanese
- Portuguese
- Spanish (All)
StateReport response example
Change reporting
You send aChangeReport event to report changes proactively in the state of an endpoint. For details about change reports, see Understand State and Change Reporting.
The ChangeReport contains the value of all properties that changed in the payload object. You must include the instance for each mode property that you report. You identify the properties that you proactively report and the instance names in your discovery response.

