Alexa.DataController– Support retrieval and deletion of customer data.Alexa.ModeController– Model properties of a device that the user can set to one of a list of values.Alexa.RangeController– Model properties of a device that the user can set to one of a range of values.Alexa.SimpleEventSource– Model stateless events on a device, such as a button press on a remote switch or smart button device. Users can connect the events to Alexa Routines.Alexa.ToggleController– Model properties of a device that the user can set to on or off.
Correspondence of specific and generic controllers
The following table lists the generic controllers, and examples of corresponding specific controllers, that you can use to model components of your devices.| Generic controller | Corresponding specific controllers |
|---|---|
Alexa.DataController | — |
Alexa.ModeController | Alexa.CookingAlexa.EqualizerControllerAlexa.LockControllerAlexa.ThermostatController |
Alexa.RangeController | Alexa.PowerLevelControllerAlexa.PercentageControllerAlexa.BrightnessControllerAlexa.EqualizerControllerAlexa.StepSpeakerAlexa.Speaker |
Alexa.SimpleEventSource | Alexa.DoorbellEventSource |
Alexa.ToggleController | Alexa.LockControllerAlexa.PowerController |
Multiple instances
When you implement a specific controller interface in the smart home add-on for your device, you can only implement one instance of the interface. When you implement a generic controller interface in your add-on, you can implement multiple instances of the controller. You specify aninstance name for each instance of the controller in the discovery response for your add-on. For details and sample code, see the documentation for each generic interface.
The following scenarios are examples of implementing multiple instances of generic controllers:
-
For a washing machine device, implement one instance of the
Alexa.ModeControllerinterface namedWasher.WashCycleto model the wash cycle. Implement a second instance of theAlexa.ModeControllerinterface namedWasher.WashTemperatureto model the water temperature. -
For a ceiling fan with a light, implement one instance of the
Alexa.RangeControllerinterface namedFan.Speedto model the fan speed. Implement a second instance of theAlexa.RangeControllerinterface namedFan.Lightto model the brightness of the light. -
For a stove with a cooktop and an oven, implement one instance of the
Alexa.ToggleControllerinterface namedOven.Lightto model the oven light. Implement a second instance of theAlexa.ToggleControllerinterface namedStovetop.ResidualHeatto model the safety feature that warns users when there is residual heat and the cooktop is too hot to touch. -
For a remote switch with three buttons, implement one instance of the
Alexa.SimpleEventSourceinterface for each button and define one or more events per button.
Utterances
Both specific and generic controllers use a pre-built voice-interaction model, which means that when you use them, the utterances that users say to Alexa are already defined for you. Usually you choose the most specific controller available to model components of your devices, because the more specific the controller, the more natural the utterances are for your user. The following table compares utterances for generic controllers and specific controllers. In these examples, a generic controller is used for the same device as a specific controller. For the generic controllers, the user must say the name of the instance, or a friendly name replacement for it, in the utterance.| Example Device | Generic Controller Utterances | Specific Controller Utterances |
|---|---|---|
| A smart thermostat with a mode named automatic. The user named the thermostat “Bedroom Thermostat” in the Alexa app. | If you model the thermostat with Alexa.ModeController: | If you model the thermostat with Alexa.ThermostatController: |
| A speaker that controls volume on a smart television. The user named the television “Living Room TV” in the Alexa app. | If you model the volume with Alexa.RangeController: | If you model the volume with Alexa.Speaker: |
| A smart plug. The user plugged a portable heater into the plug and named the plug “Desk Heater” in the Alexa app. | If you model the power with Alexa.ToggleController: | If you model the power with Alexa.PowerController: |
Semantics
Use semantics to enable additional features, such as additional user utterances and notifications when your device requires attention. To use semantics, include a semantics object in your discovery response.Semantics for user utterances
When you implement generic controllers you can optionally enable additional utterances for your users by using semantics. When you use semantics, you manually map the phrases , , , and to the directives of your controller. For example, if you have aAlexa.ToggleController for a garbage can lid, you can map the phrase to the TurnOn directive. For details and sample code, see the documentation for each generic interface.
The following examples show some user utterances that use semantics:
- English (All)
Semantics for Alexa hunches
You can use semantics to enable Alexa hunches for your device to conserve energy on behalf of users. For details about hunches, see What Are Alexa Hunches? and Enable Alexa to Proactively Act on Hunches Without Customers Needing to Ask. The semantics for Alexa hunches areAlexa.Actions.SetEcoOn, Alexa.Actions.SetEcoOff, Alexa.States.EcoOn, and Alexa.States.EcoOff. For an example discovery response that includes support for Alexa hunches, see discovery response example for a water heater.
Semantics for announcements
You can use semantics to enable announcement to the user when your device requires attention. For example, Alexa can notify a user when their washing machine cycle has completed, or when their automatic vacuum cleaner gets stuck. Before Alexa begins to send announcements to the user, the customer must opt-in to announcement notifications in the Alexa app. To enable semantics for announcements, you map the state of your device to one of the Alexa states in your discovery response. For more details about announcements and announcement format, see ProactiveNotificationSource.Restrictions
The following restrictions apply to add-ons that use generic controllers:- You can’t use generic controllers to control devices that belong to a Smart Home Device Group.
- If you use semantics for user utterances, each semantic phrase must be unique across all controller instances in your add-on.

