Understand the technologies used and how to best expose voice experiences to users through Alexa. This session covers custom Alexa skills and building a home automation control from the ground up using Alexa and AWS IoT.
Speaker: Rodney Haywood, Solutions Architect Manager, Amazon Web Services
4. Natural Voice Control
Automatic speech recognition (ASR)
and natural language understanding
(NLU) engines.
Always Getting Smarter
New capabilities and services through
machine learning, regular API updates,
feature launches.
Free, Easy Integration
Programming language agnostic service
that makes it easy to integrate Alexa into
your devices, services, and applications.
Best of all, it’s free.
5.
6. Let’s voice enable my
home with Alexa and
AWS IoT by giving her
a new skill.
38. Handle “Is the door locked?” query
Alexa.ConnectedHome.Query
42 function handleQuery(event, context) {
43
44 if (event.header.name === 'GetLockStateRequest') {
45
46 // The payload contains our IoT device details in the appliance which were supplied in the original device discovery
47 var IOTdevicename = event.payload.appliance.applianceId;
48 var IOTendpoint = event.payload.appliance.additionalApplianceDetails.IOT_Endpoint;
49 var IOTregion = event.payload.appliance.additionalApplianceDetails.IOT_Region;
50
51 var AWS = require('aws-sdk');
52 var iotdata = new AWS.IotData({endpoint: IOTendpoint, region: IOTregion});
53 var params = { "thingName" : IOTdevicename};
54
55 iotdata.getThingShadow(params, function (err, data) {
56 if (err) {
57 // Build an error response here.
58 context.fail(result);
59 } else {
60
39. Prepare to read the
IoT Device Shadow
Alexa.ConnectedHome.Query
42 function handleQuery(event, context) {
43
44 if (event.header.name === 'GetLockStateRequest') {
45
46 // The payload contains our IoT device details in the appliance which were supplied in the original device discovery
47 var IOTdevicename = event.payload.appliance.applianceId;
48 var IOTendpoint = event.payload.appliance.additionalApplianceDetails.IOT_Endpoint;
49 var IOTregion = event.payload.appliance.additionalApplianceDetails.IOT_Region;
50
51 var AWS = require('aws-sdk');
52 var iotdata = new AWS.IotData({endpoint: IOTendpoint, region: IOTregion});
53 var params = { "thingName" : IOTdevicename};
54
55 iotdata.getThingShadow(params, function (err, data) {
56 if (err) {
57 // Build an error response here.
58 context.fail(result);
59 } else {
60
40. Call
Alexa.ConnectedHome.Query
42 function handleQuery(event, context) {
43
44 if (event.header.name === 'GetLockStateRequest') {
45
46 // The payload contains our IoT device details in the appliance which were supplied in the original device discovery
47 var IOTdevicename = event.payload.appliance.applianceId;
48 var IOTendpoint = event.payload.appliance.additionalApplianceDetails.IOT_Endpoint;
49 var IOTregion = event.payload.appliance.additionalApplianceDetails.IOT_Region;
50
51 var AWS = require('aws-sdk');
52 var iotdata = new AWS.IotData({endpoint: IOTendpoint, region: IOTregion});
53 var params = { "thingName" : IOTdevicename};
54
55 iotdata.getThingShadow(params, function (err, data) {
56 if (err) {
57 // Build an error response here.
58 context.fail(result);
59 } else {
60