BT

Facilitating the Spread of Knowledge and Innovation in Professional Software Development

Write for InfoQ

Topics

Choose your language

InfoQ Homepage News Alexa Smart Home Skills Gain Flexibility with New API

Alexa Smart Home Skills Gain Flexibility with New API

This item in japanese

Bookmarks

The latest update to Amazon Smart Home Skill API, available as a preview, introduces new capabilities that can be used as building blocks to model device settings or features. Additionally, Smart Home skills have gained greater flexibility by enabling the use of custom intents.

The three new capabilities Amazon added to its Smart Home Skill API are aimed to control classes of behaviours and/or properties a device can own, such as:

  • "On/off" (Alexa.ToggleController), e.g., any behaviour that can be enabled or disabled, such as switching on or off a fan silent mode, etc.
  • A value in a continuous range (Alexa.RangeController), e.g., the temperature of a oven, or any other measurement from a sensor or actuator.
  • A list of options (Alexa.ModeController), e.g., the modes of a microwave, etc.

The above listed capabilities extend the set of already available capabilities, such as Alexa.BrightnessController and Alexa.Cooking, but they also add a significant nuance. Indeed, the three new capabilities do not try to model some kind of abstract specialised device, such a lock, a cooking appliance, etc. Rather, they model generic capabilities that are common to devices with different functions. For example, a cooking appliance can be described in terms of a switch (on/off), a control temperature (numeric), and a timer (numeric).

The key point here is the new Smart Home Skill API allows developers to combine multiple instances of those capabilities in the same device, as the following example shows. This effectively enables their use as building blocks to easily model a device's capabilities.

"endpoints": [
  {
    "endpointId": "endpoint-dishwasher",
    "friendlyName": “dishwasher”,
    ...
    "capabilities": [
      {
        "type”: "AlexaInterface",
        "interface”: "Alexa.ToggleController",
        "version”: "3",
        "instance": "SampleManufacturer.Washer.AutoDry",
        ...
      },
      {
        "type”: "AlexaInterface",
        "interface”: "Alexa.ToggleController",
        "version”: "3",
        "instance": "SampleManufacturer.Washer.Buzzer",
        ...
      }
    ]
  }
]

For more information on the new API capabilities, read how to Connect any device to Alexa.

Another change aimed to make skills work seamlessly with devices of growing complexity is the possibility of combining a custom interaction model with a Smart Home Skill. A custom interaction model allows developers to describe a more complex conversation between the user and a device controlled through Alexa. For example, using a custom interaction model you could have your skill respond with a few follow-up questions to a command to switch on an oven, such as which ventilation option to use, or for how long to set a timer. This has a significant benefit both for the user, who does not need to enable two different skills for the same device, and for developers alike, since maintaining one single skill requires less effort.

As mentioned, the new Smart Home API features are only available as a preview and developers are asked to enroll to the preview program to start using them.

Rate this Article

Adoption
Style

Hello stranger!

You need to Register an InfoQ account or or login to post comments. But there's so much more behind being registered.

Get the most out of the InfoQ experience.

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Community comments

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

BT