Last fall we introduced toggle, mode, and range building block APIs to enable seamless voice control of any feature of any device. Since then, device makers have used building block APIs to build new devices with more features than ever that are easy to control with Alexa, from Moen's U by Moen smart shower to Dyson's Pure Hot + Cool purifying fans. Today, we are excited to announce three updates to these building block APIs. Starting today, you can use the APIs to define non-controllable device states that customers can query, but not control. Coming soon, you will be able to use building block APIs in Australia, Canada, France, Germany, India, Italy, Mexico, Spain and UK as well as the US. Finally, coming soon, you will also be able to use semantic extensions in English and German that enable customers to use “open,” “close,” “raise,” and “lower” commands to control your toggle, mode, and range settings. This update will give you access to a wider range of Alexa customers looking for smart devices, and higher customer satisfaction from customers who already own one of your devices.
Now, you can use the nonControllable property with building block APIs to define device states that customers can inquire about, but not control. For example, you could enable customers to ask, “Alexa, what is the surface temperature on the kitchen stove?” “Alexa, what is the wash cycle on the washing machine?” and “Alexa, what scent is my air freshener?” Hamilton Beach is using the mode capability along with non-controllable states for the Alexa Enabled Smart Coffee Maker to let customers know the approximate time since the coffee was brewed.
The code snippet below shows how easy it is to add a state that indicates a device needs to be cleaned. This example indicates that the coffee machine can report on a non-controllable mode called CleaningState. Customers can ask, “Alexa, what is the cleaning state of my coffee machine?” and they will receive a response such as, “the coffee machine is set to needs cleaning.” If customers try to control the cleaning state, Alexa will notify them that their device does not support that functionality. You will not have to handle an unnecessary control directive.
{ "interface": "Alexa.ModeController", "instance": "CoffeeMachine.CleaningState", "properties": { "supported": [ { "name": "Clean to Use" … } ], … "nonControllable": true } }
Get started with voice query support today for non-controllable states by reviewing the documentation for mode, range and toggle building block APIs.
Today, the building block APIs are available using English in the US. Coming soon, we will expand English language support for these APIs in four new countries (Canada, India, UK and Australia), as well as launch support for Spanish (in Spain and Mexico), German, French and Italian. For example, your customers who speak German will be able to say “Alexa, Setze geschwindigkeit auf maximum” (“Alexa, Set the speed to maximum”) and your customers who speak Italian will be able to say “Alexa, imposta la lavatrice a modalità delicata” (“Alexa, Set washing machine to delicate mode”). To make it easier for you to extend your skills to new languages and countries, we’ve localized the asset names we include in our global Alexa catalog so you don’t have to localize the names of your device settings for each language you want to support. Simply declare Alexa.Setting.FanSpeed as a friendlyName and your customers can refer to your setting as “vitesse” in French and ”Flujo de aire” in Spanish. The Pure Hot + Cool purifying fans from Dyson will be Alexa enabled in Canada, Germany, UK, India and Australia by utilizing new country and language support.
To add support for additional languages, simply update the language settings for your smart home skill on the Alexa Developer Console by 1) selecting the languages you want your device to support 2) configuring the settings for each language on the Build and Distribution pages 3) deploying lambda function to multiple regions 4) submitting skill for certification review. For detailed instructions please visit our developer website.
We introduced toggle, range, and mode, each with their own general voice model, to give developers building blocks to easily model a wide range of device functionality. Now we are adding semantic extensions (coming soon) that give you the ability to map these building blocks to specific voice models that better fit your device’s functionality. The first semantic extensions (coming soon) enable you to support utterances that use “open”, “close,” “raise,” and “lower” commands such as “Alexa, open the window” and “Alexa, lower the movie screen”. These new semantic extensions (coming soon) can be used to deliver natural control of devices such as projector screens, windows, water valves, closets, drawers, garage doors, gates, curtains, shades, blinds, awnings, and more.
Smart shades from Lutron, Schellenberg and IKEA will be Alexa-enabled, designed to use the open, close, raise and lower semantic extensions (coming soon). This enables them to support phrases such as “Alexa, open the shades”, and “Alexa, raise the shades halfway”. Garage door openers from Nexx and beam Home will be Alexa-enabled, designed using the mode controller, along with open and close semantic extensions (coming soon) to support phrases such as “Alexa, close the garage door”.
The example below shows how to map semantic extensions (coming soon) to specific mode settings using the Smart Home Skill API. Customers can say “Alexa, open the trash can” freeing their hands for disposal. Since the trash can’s lid can be opened or closed, we used the mode capability, by specifying the interface Alexa.ModeController. We then added the semantic mappings to the SetMode directive, by annotating Alexa.Actions.Open to with the OPEN payload, and Alexa.Actions.Close with the CLOSE payload.
{ "interface": "Alexa.ModeController", "configuration": { "semantics": { "actionMappings": [ { "@type": "ActionsToDirective", "actions": [ "Alexa.Actions.Open" ], "directive": { "name": "SetMode", "payload": { "mode": "OPEN" } } }, { "@type": "ActionsToDirective", "actions": [ "Alexa.Actions.Close" ], "directive": { "name": "SetMode", "payload": { "mode": "CLOSE" } } } ] } } }
While the above example focuses on the mode interface, you can also integrate other types of devices that support numerical or binary values. For instance, you can map Alexa.Actions.Open to setRangeValue 100 for a projector screen to support “Alexa, open the projector screen”. You can also map Alexa.Actions.Raise to AdjustRangeValue to support the phrase “Alexa, raise the screen”.
The update will give you access to a wider range of Alexa customers looking for smart devices, and higher customer satisfaction from customers who already own one of your devices. Get started with voice query support today for non-controllable states by reviewing the documentation for mode, range and toggle building block APIs. Semantic extensions and new languages are coming soon. Sign up here to be notified when more information is available.