Weitere ähnliche Inhalte Ähnlich wie Alexa + IoT - SVC203 - New York AWS Summit (20) Mehr von Amazon Web Services (20) Alexa + IoT - SVC203 - New York AWS Summit1. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T
Alexa + IoT
Massimiliano Angelino
IoT Specialist Solutions Architect
AWS
S V C 2 0 3
2. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T
What you will learn today
▪ Connected home market and use cases
▪ Reference architectures
▪ Alexa Skills Kit
▪ How to use Alexa Voice Service (AVS) to build a voice-enabled product
3. S U M M I T © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
4. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T
Connected home market
433 million
smart home devices were
shipped worldwide in 2017
from the previous year
27.6%
18.5%
IDC estimates a CAGR of
devices shipped in 2022
940million
as the market grows to
5. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T
Connected home market: Challenges & opportunities
Hard to differentiate in a
crowded market
Hard to improve customer
experiences while keeping
costs low
Hard to maintain interoperability
between multi-vendor devices
Lack of a reliable & scalable cloud
infrastructure platform
Edge-based computing can help
build innovative products
Need to ensure secure connections
6. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T
Connected home market
Use cases
Home automation Home security & monitoring
Wi-Fi routers & modems Cable set-top boxes
Home networking
Lighting systems
Media & entertainment
White goods & appliances
Small appliances
Home assistants
Soundbars
TVs
Vacuum robots
Door locks
Smart meters
Security cameras
Water leak detectors
Thermostat
7. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T
Home automation
Example
AWS IoT Greengrass can
run on a home gateway such
as a router so that the lighting
system, TV, and Echo continue
to operate even if connection
to the cloud is lost
Smart TVs can connect
to AWS IoT Core to take
advantage of a fully scalable
cloud backend that provides easy
integration with Alexa
Amazon FreeRTOS provides
security, connectivity, and
updateability for devices
running on microcontrollers, like
a light bulb so it can respond to
voice commands
AWS IoT Device Management,
AWS IoT Device Defender,
and AWS IoT Analytics
provide added benefits such as
remote device management,
monitoring, security, and insights
into device usage
8. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T
Home security & monitoring
Example
AWS IoT Greengrass ML Inference
brings machine learning capabilities to
a camera,
like being able to detect an intruder
in real time
AWS IoT Greengrass allows the
security camera, door lock, and
even outdoor lighting to continue
operating even when cloud
connection is lost. It can also take
actions locally, avoiding a costly
and timely round trip to the cloud
Amazon FreeRTOS provides security,
connectivity, and updateability for
devices running on microcontrollers,
like a connected door lock or video door
bell
AWS IoT Device Management,
AWS IoT Device Defender,
and AWS IoT Analytics
provide added benefits such as
remote device management,
monitoring, security, and insights
into device usage
IoT Things Graph
makes it easy to build
a home security solution
that integrates motion
sensors, smoke detectors,
and cameras with facial recognition
services so that you
can spot an intruder and generate
alerts
9. S U M M I T © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
10. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T
Security
system
AWS IoT
Greengrass
Amazon
Rekognition
Amazon Kinesis
Video Streams
Kinesis Video Streams and ML/AI
Lambda
function
Amazon
Pinpoint
IoT shadow
SMS | APNS | GCM
IntegrationsConsumer home Cloud
IoT
camera
Amazon Kinesis
Connectedhome – Home security
Homesecurity&monitoringend-to-endsolution
IoT
lightbulb
IoT
doorlock
IoT
thermostat
Mobile user
Amazon API
Gateway
Rest API
Amazon S3
Amazon
SageMaker
Amazon
Athena
Amazon
Redshift
Internal
Applications
Amazon
DynamoDB
Amazon ES
Databases
compute
Temporary
security
credential
AWS IoT
Amazon
Cognito
MQTT
AWS IoT, Kinesis,
AWS Lambda
Analytics, ML
AWS
Identity
and
Access
Management
Lambda
function
Storage
Consumers
AWS Console
Administrator
3rd-party API
Alerting
11. S U M M I T © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
12. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T
Alexa Skills Kit
The Alexa Skills Kit (ASK) lets you teach Alexa new skills
It contains the documentation, tools, and sample code needed to build Alexa
skills
https://developer.amazon.com/ask
13. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T
Types of Alexa skill models
Custom
Smart home
Flash briefing
Video
List
For crafting unique game or app experiences
For providing flash briefing content
For providing video playback of content
For using and maintaining lists
For controlling a smart home and devices
14. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T
Alexa Skills Kit
Directive
Audio
Cards
Speech recognition
Machine learning
Natural language understanding
Text to speech
Event
Skill
Service
Alexa Skills Kit
15. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T
Smart home capability interface examples
Interface Capability
Alexa.Discovery Discover and describe endpoints
Alexa.PowerController Turning on or off
Alexa.PercentageController Sets a percentage
(Percentage, intensity, speed, and more)
Alexa.ColorController Change and report the color
(Hue, saturation, brightness)
Alexa.PlaybackController Control playback
(Play, pause, rewind, and more)
Alexa.ThermostatController Set a temperature or point or range
16. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T
Smart home capability interface examples (new)
Interface Capability
Alexa.ModeController Describe ordered or unordered modes
(Low, high, medium, and more vs. normal, delicates, and more)
Alexa.RangeController Set a numeric value within a range
(Speed, temperature, measurement, and more)
Alexa.ToggleController Toggles an off/on setting
(Start, enable, turn off/on, and more)
17. S U M M I T © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
18. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T
Alexa cloud
Endpoint cloud
Skill service
Directives
Events
Alexa event gateway
Log in with Amazon
Amazon Web Services (AWS)
Lambda
Home network
Internet
Account linking/OAuth
Proactive updates
Asynchronous responses
Smart home skill API
Endpoints
Alexa application & devices
19. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T
Alexa Cloud
API Gateway
Skill service
Directives
Events
Alexa event gateway
Log in
with
Amazon
Amazon Web Services (AWS)
Lambda
Home network
Internet
Account linking/OAuth
Proactive updates
Asynchronous responses
Smart home skill API
Alexa application & devices
Endpoints
AWS IoTDynamoDB
API service
Lambda
20. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T
Connectedhome – Commandand control
IntegrateAlexawithyourconnectedhomedevices
IoT Core ShadowTopic
Connected devices
Pass to IoT Core
Lambda
authentication
API GatewayAlexa event
handlerAVS
Alexa-enabled
device
DynamoDB
Command with Alexa-enabled devices
Directive
request from
skill
Check AuthZ
Update
desired state
Publish
command to
devicesHandle Alexa
invocation
21. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T
Connectedhome – Commandand control
IntegrateAlexawithyourconnectedhomedevices
Control & notify
Change
notification
AVS
Alexa-enabled
device
ShadowTopicIoT Core
Connected devices
KinesisRule
Publish
changes to
AWS IoT
Update
reported
state
Capture data
changes
Create Alexa
change
report
22. S U M M I T © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
23. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T
Alexa service infrastructure
Alexa Smart
Home Skill
Sample-Smart-Home-Backend
Alexa-
enabled
device
Amazon API Gateway
AWS IoTAWS Lambda
Amazon DynamoDB Amazon S3
AWS CloudFormation
AWS IAM
24. S U M M I T © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
25. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T
Key points
Amazon API Gateway
Message router
Inbound: Directive and endpoint abstraction with JSON messaging data
Outbound: Helps handle proactive state updates
AWS Lambda
Logical router
Handles compute / processing for API and skill services
AWS IoT
State arbiter
From Alexa (directives)
From the device cloud (device state changes)
Amazon DynamoDB
Data provider
Referential information that may not change (SKUs, descriptions, and more)
26. S U M M I T © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
27. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T
Alexa anywhere, for anyone
Home audio
Smart home
Automobiles
PCs
Wearables
Toys
Smartphones
Home appliancesHome security
TV/video
28. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T
AVS is Amazon’s cloud-based voice service that allows developers to voice-enable any connected product with a
microphone and speaker
Natural voice control Always getting smarter Easy to integrate, free to use
Alexa Voice Service (AVS)
29. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T
AVS integration
HTTP/2 persisted
connection
Alexa initiated directives
Downchannel stream
Event streams
Device event
Directives for event
Alexa-enabled
device AVS
30. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T
Voice-enabled
AVS only
Smart home
control only
Voice-enabled
smart home device
Integration variations with Alexa and AVS
AVS AVS &
Smart
Home Skill
AWS Cloud AWS Cloud
Alexa-enabled
device
Alexa-enabled
device
Alexa-enabled
device
Alexa Smart
Home Skill
31. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T
Alexa and AWS IoT for telemetry
AVS
Alexa-enabled
device
Shadow
Rule Admin
Rule
32. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T
Alexa and AWS IoT for IoT operations
AVS
Alexa-enabled
device
Shadow
Admin
Dynamic thing
group
connectivity.connected:true AND
attributes.softwareVersion:5
33. S U M M I T © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
34. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T
Voice-enabled devices (AVS)
• Device management
• Device registry
• Device -> Cloud security Device -
> Cloud messaging
AWS integrations for Alexa customers
Smart home skill devices
• Device management
• Device registry
• Device -> Cloud security
• Device -> Cloud messaging
• LWA + Amazon Cognito
• Amazon Elastic Compute Cloud
(Amazon EC2) or AWS Lambda +
API Gateway
35. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T
Customer cloud
Lambda + API
Gateway or EC2
Alexa services
Customer
Smart Home
Skill Lambda
Oauth2
provider
Customer
profile
Directive
handling
Device
registry and
search
Device
state
Outbound
device
messaging
Inbound
device
messaging
Customer
credential
store
API
Event
handling
Smart home device
Cloud message
handling
Directive
handling
Event handling
Credential
management
Local device
control
Log in with Amazon
AlexaAPIs
Alexa
OTA
management
Telemetry
Overall AWS services Amazon Cognito + LWA
36. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T
Where do you start?
Alexa custom skill Alexa smart home skill Alexa voice service
• AWS Cloud
• Customer defines intents
• Lambda (preferred) or web
service
• Account linking optional
• Brownfield devices
• AWS Cloud
• Alexa defines intents
• Lambda required
• Account linking required
• Brownfield devices
• Build a voice-enabled product
• Requires hardware (mic-array,
speaker)
• Requires AVS SDK
• Greenfield products
37. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T
Summary
• How to get started with smart home skills and AWS
• How to leverage AWS to build the endpoint cloud for your SmartHome skills
• Expanding IoT and voice using AVS, AWS IoT Core, and mobile services
38. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T
Resources
Sign up to get the latest Amazon Alexa news delivered straight to your inbox
https://alexa.design/AWS_GetAlexaNews
Smart home portal
https://alexa.design/smarthome
https://aws.amazon.com/iot/solutions/connected-home/
Smart home code
https://github.com/alexa/alexa-smarthome
Developer Slack channel
Invite Link: https://alexa.design/smarthome-invite-slack (https://alexasmarthome.slack.com)
Sample backend
https://github.com/alexa/alexa-smarthome
Getting started with AWS IoT Core
https://docs.aws.amazon.com/iot/latest/developerguide/what-is-aws-iot.html
AWS IoT services
https://aws.amazon.com/iot-device-management/
https://aws.amazon.com/greengrass/
https://aws.amazon.com/iot-analytics/
39. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T
Thank you!
S U M M I T © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Massimiliano Angelino
angmas@amazon.com
40. S U M M I T © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
41. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T
Connectedhome – Home automation
ControldevicesviaAlexa
Directive
request
from skill
Alexa change
report
Retrieve Alexa
access token
IoT rule
Cognito user pool
custom
Register user
and create IoT policy
Update
reported
shadow state
Reportable properties
cache
Update Alexa
with new state
report
API Gateway regional
endpoint
Update desired state
Publish
command to
Alexa device
Publish state
change to AWS
IoT
Real-time updates
to mobile application
Update
properties
in cache
Check for online
status
Mobile IoT policy
User/device
pairing table
Alexa Services
AlexaAPIs
Alexa