Más contenido relacionado La actualidad más candente (20) Similar a AWS IoT in the Connected Home - AWS Online Tech Talks (20) Más de Amazon Web Services (20) AWS IoT in the Connected Home - AWS Online Tech Talks1. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential
Introduction To The
Connected Home
AWS IoT + Amazon Alexa
Martin Sirull
06.22.18
2. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential
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
940 million
as the market grows to
3. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential
Challenges in the Market
Differentiation in a
crowded market
Slow incubation to
production cycle
Inconsistent platforms
across BUs
Need of a reliable
& scalable cloud
infrastructure
Edge-based computing
need for local connectivity
Secure connection
4. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential
Home Automation
Trends
Integration with
voice control
Interoperability
between devices
Exciting & new
customer experience
Customer
ease of use
Quick
response time
Energy
management
5. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential
Home Automation
Why Use AWS IoT Cloud Services?
Reliable & persistent communication
Responsiveness
Device management
Device insights
Low total cost of ownership
AWS IoT
Core
AWS IoT
Device
Management
AWS IoT
Analytics
6. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential
7. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
About Hunter Douglas
• World leader in custom window
treatments
• >50% market share
• Luxury brand
• Family owned and operated
• >65 years of innovations in window
fashions
• 15+ years of motorized shades
8. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
PowerView® Motorized Shades
• Launched 2015
• Smart and Integrated
• IoT Connected
• Provide:
• Comfort
• Convenience
• Security
• Energy savings
Evolution of motorized shades:
IR remote > RF remote > Local app >
remote app > cloud integration and voice control
9. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Initial Design
In the home
Initial Concept
User in their home using their Smart phone to:
• Control their shades
• Create scenes
• Set scene schedules
10. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Initial Design
Outside the home
• Hub checks into Remote Server on an
interval.
• Smart phone sends request to
Remote Server.
https
https
Remote Server
11. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
IoT to the Rescue
Outside the home
Using Amazon IoT
services and MQTT client,
we have reduced server
load and increased
response times.
Remote Server
AWS IoT Core
12. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Registration
Generate CertificateRequest Certificates
Create
Certificate API
Add device to user profile
Return Certificate
Validate Device Ownership
Create Thing/Policy
and Attach Certificate
Update Certificate ID
Device without pre-installed
CA-signed certificate
IoT Core
Mobile App
RDS Database
for User Profile
IoT
Policy
IoT
Certificate
IoT
Thing
& &
Remote
Server
Register User / Authenticate to HD Cloud
13. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Registration
1
2
3
4
3. Create Thing
Create Certificate
Link Certificate
Link Policy
Remote Server AWS IoT Core
1. App Send Registration
Request
5
2. Hub Sends Request
4. Return Certificate5. Return Certificate
14. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Registration – Instantiate AWS IoT Client
//Get HTTP IoT Client
public AWSIotClient getHTTPIoTClient(){
ClientConfiguration clientConfig = new ClientConfiguration();
clientConfig.setProtocol(Protocol.HTTPS);
BasicAWSCredentials awsCreds = new BasicAWSCredentials(iamAccessKeyId, iamSecretKey);
AWSIotClient iotHTTPClient = (AWSIotClient) AWSIotClientBuilder.standard()
.withClientConfiguration(clientConfig)
.withCredentials(new AWSStaticCredentialsProvider(awsCreds))
.withRegion(awsRegionId).build();
return iotHTTPClient;
}
15. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Registration – Create IoT Thing
//Create IoT Thing
CreateThingRequest createThingRequest = new CreateThingRequest().withThingName(deviceSerial);
CreateThingResult createThingResult = iotHTTPClient.createThing(createThingRequest);
/*
Successfully created thing with name: createThingResult.getThingName()
with arn: createThingResult.getThingArn()
*/
16. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Registration – Generate Certs For Thing
//Generate x.509 certificates for device authentication
//Set flag to create active certificate.
CreateKeysAndCertificateRequest ckacreq = new CreateKeysAndCertificateRequest().withSetAsActive(true);
CreateKeysAndCertificateResult ckacres = iotHTTPClient.createKeysAndCertificate(ckacreq);
//Never expose these values in logs outside of demo purposes!
System.out.println("Certificate for " + deviceSerial);
System.out.println("PEM: " + ckacres.getCertificatePem());
System.out.println("Private Key: " + ckacres.getKeyPair().getPrivateKey());
System.out.println("Public Key: " + ckacres.getKeyPair().getPublicKey());
17. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Registration – Pre Defined Policy
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": "iot:Connect",
"Resource": "arn:aws:iot:us-east-1:434312738679:client/${iot:Connection.Thing.ThingName}"
},
{
"Effect": "Allow",
"Action": "iot:Subscribe",
"Resource": "arn:aws:iot:us-east-1:434312738679:topicfilter/actions/${iot:Connection.Thing.ThingName}"
},
{
"Effect": "Allow",
"Action": "iot:Publish",
"Resource": "arn:aws:iot:us-east-1:434312738679:topic/actionStatus/${iot:Connection.Thing.ThingName}"
},
{
"Effect": "Allow",
"Action": "iot:Receive",
"Resource": "arn:aws:iot:us-east-1:434312738679:topic/actions/${iot:Connection.Thing.ThingName}"
}
]
}
18. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Registration – Attach Policy to Certificate
//Attach connection/publish/subscribe policy to this certificate to ensure that device can only
//connect as the attached user and can only talk/listen on designated channels
AttachPrincipalPolicyRequest appreq = new AttachPrincipalPolicyRequest()
.withPolicyName(devicePolicyName)
.withPrincipal(ckacres.getCertificateArn());
iotHTTPClient.attachPrincipalPolicy(appreq);
19. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Registration – Attach Certs to Thing
//Attach thing to generated certificate ARN
AttachThingPrincipalRequest atpreq = new AttachThingPrincipalRequest()
.withThingName(deviceSerial)
.withPrincipal(ckacres.getCertificateArn());
iotHTTPClient.attachThingPrincipal(atpreq);
20. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Operation
Hub Subscribes to an Actions Topic and
publishes to an Action Status Topic
Server Subscribes to all Actions Status Topics
and publishes to all Action Topics
Existing REST
Remote Server
AWS IoT Core
21. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Operation – Receive Message
//Create a topic object
public class DemoIoTActionTopic extends AWSIotTopic{
public DemoIoTActionTopic(String topic, AWSIotQos qos){
super(topic, qos);
}
//this callback runs when a message comes in on the subscribed topic
@Override
public void onMessage(AWSIotMessage message) {
System.out.println("got action message: " + message);
}
}
22. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Operation – Subscribe to Topic
//Subscribe to actions topic
public static void subscribeToAWSIoTTopic(){
String subscriptionTopicURI = "/actions/" + deviceSerial;
try {
//Build Topic Object to subscribe to, with QOS1 (guaranteed delivery at least 1 time)
DemoIoTActionTopic subscriptionTopic = new DemoIoTActionTopic(subscriptionTopicURI, AWSIotQos.QOS1);
//subscribe to this topic
getMQTTClient().subscribe(subscriptionTopic);
} catch (AWSIotException e) {
System.err.println("error subscribing to topic: " + subscriptionTopicURI);
e.printStackTrace();
}
}
public AWSIotMqttClient getMQTTClient(){
AWSIotMqttClient iotMqttClient = new AWSIotMqttClient(
awsRegionEndpointURL, mqttClientIdm, iamAccessKeyId, iamSecretKey);
return iotMqttClient;
}
23. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Operation – Message Publishing
//Publish a Message
public static void publishIoTMessage(String topicURI, String payload){
try {
AWSIotMessage message = new AWSIotMessage(topicURI, AWSIotQos.QOS1, payload);
getMQTTClient().publish(message);
} catch (AWSIotException e) {
System.err.println("error publishing to topic: [" + topicURI + "] json: [" + payload + "]" );
e.printStackTrace();
}
}
24. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
3rd Party Integrations
Hub Subscribes to an Actions Topic and
publishes to an Action Status Topic
Server Subscribes to all Actions Status Topics
and publishes to all Action Topics
AWS IoT Core
Remote Server
25. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
3rd Party Integrations - Alexa
Directive Request from
Skill
Device
AWS IoT
Core
Alexa
Services
Remote
Server
Lamda
Function
RDS Database
Publish to Action Topics and
Subscribe to Action Status Topics
Subscribe to Action Topics Publish
to Action Status Topics
26. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
3rd Party Integrations - Alexa
Alexa Smart
Home Service
Remote Server
AWS IoT Core
Lambda
27. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Benefits of Using AWS IoT
• Improved Performance
• Lower Latency
• Reduced Infrastructure
• Lower Cost
• Scalability
28. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Home Automation
Why Use AWS IoT Edge Services?
Built-in connectivity
Device security
Local communication
Offline communication
Over-the-air updates
Local Compute
29. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Home Automation
Example
AWS Greengrass can
run on a home gateway
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 once
devices are connected.
30. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential
AWS IoT in the Connected Home
31. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential
Why AWS IoT for Connected Home—Summary
Deep edge services
Scalable, responsive, and reliable
Device management & data-driven insights
Built-in security and anomaly detection
Pay as you go pricing
1
2
3
Seamless Integration with Amazon/AWS Services
32. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential
Thank you!