Alexa.RangeController interface in your Alexa add-on so that users can control the device settings represented by numbers within a minimum and maximum range. You can use the Alexa.RangeController interface to model properties of a device that the user can set to one of a range of values, such as the speed settings on a blender or a fan. The Alexa.RangeController interface is a generic controller interface.
The Alexa.RangeController 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.PowerLevelControllerAlexa.PercentageControllerAlexa.BrightnessControllerAlexa.EqualizerControllerAlexa.StepSpeakerAlexa.Speaker
Alexa.RangeController 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.RangeController 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:
- Dutch
- English (All)
- French (All)
- German
- Hindi
- Italian
- Japanese
- Portuguese
- Spanish (All)
- Dutch
- English (All)
- French (All)
- German
- Hindi
- Italian
- Japanese
- Portuguese
- Spanish (All)
Properties and objects
TheAlexa.RangeController interface defines the following properties and objects.
RangeValue property
TheAlexa.RangeController interface uses the rangeValue property as the primary property. The property values are numbers, and you specify the minimum value, maximum value, and precision in your discovery response. If you use the rangeValue property to represent a change, valid values include negative numbers.
An endpoint can support multiple range controllers. To distinguish between range controllers, you must always include the instance attribute for a rangeValue property. You identify your instance names in your discovery response.
The following example shows an instance of fan speed with a range.
Preset object
ThePreset object represents a preset value for a range. Preset values must be divisible by precision. For example, for a range of 0–10 with precision of 5, the valid presets values are 0, 5, 10.
The following example shows three Preset objects in a presets array. The presets represent low, medium, and high values for a range of 0–10.
| Property | Description | Type | Required |
|---|---|---|---|
rangeValue | Value in the range for the preset. Valid values: minimum range value + (n × precision) where n is an integer. | Integer | Yes |
presetResources | Friendly names that users can use to interact with the preset value. | PresetResources object | Yes |
PresetResources object
Use thePresetResources object to provide a set of friendly names that users can use to interact with preset 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 preset resources for the high setting on a fan. 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.RangeController interface, the voice interaction model is already built for you. Users can interact with your device by saying the standard Alexa.RangeController 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.RangeController directives SetRangeValue and AdjustRangeValue. For example, if you have a controller for a window shade, you can map the phrase to the AdjustRangeValue 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>'s <instance friendly name> is <state>. For example, when the bin of their automatic vacuum cleaner is full, 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 rangeValue property to one of the Alexa.States values, such as Alexa.States.Full. 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.RangeController 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. Set nonControllable to true for range controller properties that you want to report to the user, but don’t want the user to change.
For each Alexa.RangeController 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 array
In addition to the usual discovery response fields, for eachAlexa.RangeController entry in the capabilities array, include the following fields.
| Property | Description | Type | Required |
|---|---|---|---|
instance | Name of the range. For example: Fan.Speed, Camera.Pan, Camera.Tilt, Camera.Zoom. | String | Yes |
capabilityResources | Friendly names that users can use to interact with the range. If you enable announcements for the instance friendly name, include @type set to text. | CapabilityResources object | Yes |
configuration | Defines the range and presets. | Object | Yes |
configuration.supportedRange | Defines the range. | Object | Yes |
configuration.supportedRange.minimumValue | Minimum value for the range. | Number | Yes |
configuration.supportedRange.maximumValue | Maximum value for the range. | Number | Yes |
configuration.supportedRange.precision | Amount by which the values change when moving through the range. This property also serves as the default when a user asks to change the value but doesn’t specify by how much. The preset values must be divisible by precision. For example, for a minimum range of 0 and a maximum range of 100 with precision of 5, valid presets values are 0, 5, 10, 15 … 95, 100. | Number | Yes |
configuration.unitOfMeasure | Unit of measure for the range. | Units of measure string | No |
configuration.presets | Named options that users can specify instead of numbers, such as “medium” or “maximum”. | Array of Preset objects | No |
Discovery response examples
Fan example
The following example shows aDiscover.Response message for a fan that supports the Alexa.RangeController and Alexa.PowerController interfaces.
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.RangeController interface and uses semantics. Use the Alexa.RangeController interface for blinds that can raise and lower to a range of positions. If your blinds only fully open and fully close, use the ModeController interface instead.
You can use the Alexa.RangeController interface for your add-ons that control blinds in the following locales: de-DE, en-AU, en-CA, en-GB, en-IN, en-US, es-ES, es-MX, es-US, fr-CA, fr-FR, hi-IN, it-IT, ja-JP, pt_BR.
Show/hide discovery response
Show/hide discovery response
Range and toggle controllers example
The following example shows aDiscover.Response message for a fan that supports the PowerController interface and both the Alexa.RangeController and ToggleController interfaces.
Show/hide discovery response
Show/hide discovery response
Directives
Alexa sends the followingAlexa.RangeController interface directives to your add-on.
SetRangeValue directive
Support theSetRangeValue directive so that users can set the level of features on devices.
The following examples show user utterances:
- Dutch
- English (All)
- French (All)
- German
- Hindi
- Italian
- Japanese
- Portuguese
- Spanish (All)
SetRangeValue directive example
The following example shows aSetRangeValue directive that Alexa sends to your add-on.
SetRangeValue directive payload
| Property | Description | Type | Required |
|---|---|---|---|
rangeValue | Value to set the feature of the device to. | Number | Yes |
SetRangeValue response
If you handle aSetRangeValue directive successfully, respond with an Alexa.Response event. A successful response confirms that the endpoint completed the requested action.
You can respond synchronously from your Lambda function or asynchronously through the Alexa event gateway. If you choose to respond asynchronously, include a correlation token and a scope with an authorization token. For details about both response types, see Alexa.Response.
In the context object, include the values of all properties that changed.
SetRangeValue directive error handling
If you can’t handle aSetRangeValue directive successfully, respond with an Alexa.ErrorResponse event. If your error is safety related, respond with an Alexa.Safety.ErrorResponse.
AdjustRangeValue directive
Support theAdjustRangeValue directive so that users can adjust the level of features on devices.
The following examples show user utterances:
- Dutch
- English (All)
- French (All)
- German
- Hindi
- Italian
- Japanese
- Portuguese
- Spanish (All)
AdjustRangeValue directive example
The following example shows anAdjustRangeValue directive that Alexa sends to your add-on.
AdjustRangeValue directive payload
| Property | Description | Type | Required |
|---|---|---|---|
rangeValueDelta | Amount by which to change the feature of the device. If the user doesn’t specify the amount, the value defaults to precision. | Number | Yes |
rangeValueDeltaDefault | Set to false, if the user specified the amount of the change. | Boolean | Yes |
AdjustRangeValue response event
If you handle anAdjustRangeValue directive successfully, respond with an Alexa.Response event. A successful response confirms that the endpoint completed the requested action.
You can respond synchronously from your Lambda function or asynchronously through the Alexa event gateway. If you choose to respond asynchronously, include a correlation token and a scope with an authorization token. For details about both response types, see Alexa.Response.
In the context object, include the values of all properties that changed.
AdjustRangeValue directive error handling
If you can’t handle anAdjustRangeValue 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. 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.
Support the ReportState directive so that users can ask about the features of their devices.
The following examples show some user utterances:
- Dutch
- English (All)
- French (All)
- German
- 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. You identify the properties that you proactively report in your discovery response. For details about change reports, see Understand State and Change Reporting.

