SlideShare a Scribd company logo
1 of 30
Download to read offline
AWS IoTで
家庭内IoTやってみた
土持 昌志
自己紹介
• 土持昌志
• @pampitter
• 株式会社鈴木商店
• JAWS-UG大阪
• 好きなAWSサービス:Lambda、S3
AWS IoTをやってみたきっかけ
AWS IoTをやってみたきっかけ
• 2015年10月に子供が生まれました
• 2015年10月のre:InventでAWS IoT発表
• 風邪・インフルエンザ対策に湿度データを収
集してみよう
AWS IoTの概要
Device Gateway
Device
Gateway
(Broker)
Publisher Subscriber
Publisher
Publisher Subscriber
Subscriber
MQTT
HTTP
WebSocket
MQTT
HTTP
WebSocket
Rule Engine
Action
SELECT humidity
FROM '#'
WHERE humidity <= 40
Rule Query
Device
Gateway
{"temp": 20.0}
{"humidity": 40.0}
{"temp": 22.0}
{"humidity": 70.0}
{"temp": 21.0}
{"humidity": 20.0}
{"humidity": 40.0}
{"humidity": 20.0}
Demo 1
湿度センサー
MQTT
Rule EngineTopic
センサーデータを収集
# -*- coding: utf-8 -*-
from __future__ import division
from __future__ import absolute_import
from __future__ import print_function
from __future__ import unicode_literals
from sense_hat import SenseHat
import datetime
import json
sense = SenseHat()
hum = sense.get_humidity()
now = datetime.datetime.now()
hum_json = {
'timestamp': now.strftime("%Y-%m-%d %H:%M:%S"),
'humidity': hum
}
print(json.dumps(hum_json))
var execSync = require('child_process').execSync;
module.exports = {
sensor: function() {
var data = "" + execSync('python ' + __dirname + '/sensor.py');
return JSON.parse(data);
}
}
NodeからPythonへのブリッジ
var awsIot = require('aws-iot-device-sdk');
var bridge = require('./bridge.js');
var device = awsIot.device({
keyPath: './certs/private.pem.key',
certPath: './certs/certificate.pem.crt',
caPath: './certs/root-CA.crt',
clientId: 'pi2_01',
region: 'ap-northeast-1'
});
device
.on('connect', function() {
console.log('connect');
setInterval(function() {
var humidity = bridge.sensor();
console.log(humidity)
device.publish('pi2_01', JSON.stringify(humidity));
}, 1000);
});
AWS IoTにパブリッシュ
Demo 1
Device Shadow
Device Device Shadow
App
• desired:管理アプリなどから指定されたあるべき状態
• reported:デバイスが報告した現在の状態
• delta:desiredとreportedの差分
Device Shadow
{
"desired": {
"color": "white"
},
"reported": {
"color": "white"
}
}
{
"desired": {
"color": "red"
},
"reported": {
"color": "red"
}
}
{
"desired": {
"color": "red"
},
"reported": {
"color": "white"
},
"delta": {
"color": "red"
}
}
Demo 2
LED
Device Shadow Console
LEDを点灯
# -*- coding: utf-8 -*-
from __future__ import division
from __future__ import absolute_import
from __future__ import print_function
from __future__ import unicode_literals
from sense_hat import SenseHat
import sys
sense = SenseHat()
argv = sys.argv
colors = {
"red": (255, 0, 0),
"yellow": (255, 215, 0),
"green": (50, 205, 50),
"blue": (0, 0, 255),
"light_blue": (91, 192, 222),
"white": (255, 255, 255),
"black": (0, 0, 0)
}
if colors.has_key(argv[1]):
color = colors[argv[1]]
else:
color = colors['black']
pixels = []
for pix in range(0, 64) :
pixels.append(color)
sense.set_pixels(pixels)
var execSync = require('child_process').execSync;
module.exports = {
sensor: function() {
var data = "" + execSync('python ' + __dirname + '/sensor.py');
return JSON.parse(data);
},
led: function(color) {
execSync('python ' + __dirname + '/led.py ' + color);
return;
}
}
NodeからPythonへのブリッジ
var awsIot = require('aws-iot-device-sdk');
var bridge = require('./bridge.js');
var thingShadows = awsIot.thingShadow({
keyPath: './certs/private.pem.key',
certPath:
'./certs/certificate.pem.crt',
caPath: './certs/root-CA.crt',
clientId: 'pi2_01',
region: 'ap-northeast-1'
});
var clientTokenGet;
var clientTokenUpdate;
thingShadows.on('connect', function() {
thingShadows.register('pi2_01');
setTimeout(function() {
clientTokenGet =
thingShadows.get('pi2_01');
}, 2000);
});
Device ShadowからLEDを操作
thingShadows.on('status', function(thingName, stat,
clientToken, stateObject) {
console.log('received ' + stat + ' on ' + thingName +
': ' + JSON.stringify(stateObject));
if('delta' in stateObject.state && 'color' in
stateObject.state.delta){
var delta_state = stateObject.state.delta.color;
bridge.led(delta_state);
console.log('received delta ' + ' on ' + thingName
+ ': ' + JSON.stringify(stateObject));
clientTokenUpdate = thingShadows.update('pi2_01',
{ "state": { "reported": { "color": delta_state } } });
}
});
thingShadows.on('delta', function(thingName, stateObject)
{
var state = stateObject.state.color;
bridge.led(state);
console.log('received delta ' + ' on ' + thingName +
': ' + JSON.stringify(stateObject));
clientTokenUpdate = thingShadows.update('pi2_01', {
"state": { "reported": { "color": state } } });
});
thingShadows.on('timeout', function(thingName,
clientToken) {
console.log('received timeout ' + ' on ' + operation +
': ' + clientToken);
});
Demo 2
Demo 3
湿度センサー
Rule EngineTopic
LED
Device Shadow
var awsIot = require('aws-iot-device-sdk');
var bridge = require('./bridge.js');
var thingShadows = awsIot.thingShadow({
keyPath: './certs/private.pem.key',
certPath: './certs/certificate.pem.crt',
caPath: './certs/root-CA.crt',
clientId: 'pi2_01',
region: 'ap-northeast-1'
});
var clientTokenGet;
var clientTokenUpdate;
thingShadows.on('connect', function() {
thingShadows.register( 'pi2_01' );
setTimeout( function() {
clientTokenGet = thingShadows.get('pi2_01');
}, 2000 );
setInterval(function() {
var humidity = bridge.sensor();
console.log(humidity)
thingShadows.publish('pi2_01',
JSON.stringify(humidity));
}, 1000);
});
センサーデータを収集/
Device ShadowからLEDを操作
thingShadows.on('status', function(thingName, stat,
clientToken, stateObject) {
console.log('received ' + stat + ' on ' + thingName +
': ' + JSON.stringify(stateObject));
if('delta' in stateObject.state && 'color' in
stateObject.state.delta){
var delta_state = stateObject.state.delta.color;
bridge.led(delta_state);
console.log('received delta ' + ' on ' + thingName
+ ': ' + JSON.stringify(stateObject));
clientTokenUpdate = thingShadows.update('pi2_01',
{ "state": { "reported": { "color": delta_state } } });
}
});
thingShadows.on('delta', function(thingName, stateObject)
{
var state = stateObject.state.color;
bridge.led(state);
console.log('received delta ' + ' on ' + thingName +
': ' + JSON.stringify(stateObject));
clientTokenUpdate = thingShadows.update('pi2_01', {
"state": { "reported": { "color": state } } });
});
thingShadows.on('timeout', function(thingName,
clientToken) {
console.log('received timeout ' + ' on ' + operation +
': ' + clientToken);
});
センサーデータを収集/
Device ShadowからLEDを操作
// データの送受信のみの場合はdevice.publish
device.publish('pi2_01', JSON.stringify(humidity));
// DeviceShadow使用時はthingShadows.publish
thingShadows.publish('pi2_01', JSON.stringify(humidity));
# -*- coding: utf-8 -*-
from __future__ import print_function
from __future__ import unicode_literals
from __future__ import absolute_import
from __future__ import division
import json
import boto3
print('Loading function')
iot = boto3.client('iot-data')
def lambda_handler(event, context):
print("Received event: " + json.dumps(event))
humidity = event['humidity']
if humidity < 40:
color = 'blue'
elif humidity >= 40 and humidity <= 70:
color = 'green'
else :
color = 'red'
DeviceShadowを操作する
Lambda Function
try:
shadow_stream = response = iot.get_thing_shadow(
thingName='pi2_01'
)
shadow_string =
shadow_stream['payload'].read().decode('utf-8')
shadow = json.loads(shadow_string)
desired_color = shadow['state']['desired']['color']
if color != desired_color:
payload = {
"state": {
"desired": {
"color": color,
}
}
}
iot.update_thing_shadow(
thingName='pi2_01',
payload=json.dumps(payload)
)
print('Update DeviceShadow delta:
{}'.format(color))
else:
print('DeviceShadow has been updated')
return
except Exception as e:
print(e)
print('Error')
raise e
Demo 3
気をつけたいところ
• DynamoDBにデータが入らない!?
• AWS SDKにIoT関連のものが2つある
DynamoDBにデータが入らない!?
DynamoDBにデータが入らない!?
• Python
• Node.js
• Java
AWS SDKにIoT関連のものが2つある
まとめ
• AWS IoTで簡単にセンサーデータをアップで
きるようになった。
• Device Shadowでリモートからのデバイス制
御がやりやすくなった。
• この冬は風邪を引かなかった!
まとめ
• 家庭の課題解決からIoTを始めよう!

More Related Content

What's hot

Log Analytics with Amazon Elasticsearch Service - September Webinar Series
Log Analytics with Amazon Elasticsearch Service - September Webinar SeriesLog Analytics with Amazon Elasticsearch Service - September Webinar Series
Log Analytics with Amazon Elasticsearch Service - September Webinar SeriesAmazon Web Services
 
Building a Sustainable Data Platform on AWS
Building a Sustainable Data Platform on AWSBuilding a Sustainable Data Platform on AWS
Building a Sustainable Data Platform on AWSSmartNews, Inc.
 
Getting Started with AWS IoT - September 2016 Webinar Series
Getting Started with AWS IoT - September 2016 Webinar SeriesGetting Started with AWS IoT - September 2016 Webinar Series
Getting Started with AWS IoT - September 2016 Webinar SeriesAmazon Web Services
 
Containers and the Evolution of Computing
Containers and the Evolution of ComputingContainers and the Evolution of Computing
Containers and the Evolution of ComputingAmazon Web Services
 
Zero to Sixty: AWS CloudFormation (DMG201) | AWS re:Invent 2013
Zero to Sixty: AWS CloudFormation (DMG201) | AWS re:Invent 2013Zero to Sixty: AWS CloudFormation (DMG201) | AWS re:Invent 2013
Zero to Sixty: AWS CloudFormation (DMG201) | AWS re:Invent 2013Amazon Web Services
 
Scalable and Fault-Tolerant Apps with AWS
Scalable and Fault-Tolerant Apps with AWSScalable and Fault-Tolerant Apps with AWS
Scalable and Fault-Tolerant Apps with AWSFernando Rodriguez
 
AWS APAC Webinar Week - Securing Your Business on AWS
AWS APAC Webinar Week - Securing Your Business on AWSAWS APAC Webinar Week - Securing Your Business on AWS
AWS APAC Webinar Week - Securing Your Business on AWSAmazon Web Services
 
AWS CloudTrail to Track AWS Resources in Your Account (SEC207) | AWS re:Inven...
AWS CloudTrail to Track AWS Resources in Your Account (SEC207) | AWS re:Inven...AWS CloudTrail to Track AWS Resources in Your Account (SEC207) | AWS re:Inven...
AWS CloudTrail to Track AWS Resources in Your Account (SEC207) | AWS re:Inven...Amazon Web Services
 
AWS July Webinar Series - Troubleshooting Operational and Security Issues in ...
AWS July Webinar Series - Troubleshooting Operational and Security Issues in ...AWS July Webinar Series - Troubleshooting Operational and Security Issues in ...
AWS July Webinar Series - Troubleshooting Operational and Security Issues in ...Amazon Web Services
 
Introducing AWS IoT - Interfacing with the Physical World - Technical 101
Introducing AWS IoT - Interfacing with the Physical World - Technical 101Introducing AWS IoT - Interfacing with the Physical World - Technical 101
Introducing AWS IoT - Interfacing with the Physical World - Technical 101Amazon Web Services
 
February 2016 Webinar Series - Best Practices for IoT Security in the Cloud
February 2016 Webinar Series - Best Practices for IoT Security in the CloudFebruary 2016 Webinar Series - Best Practices for IoT Security in the Cloud
February 2016 Webinar Series - Best Practices for IoT Security in the CloudAmazon Web Services
 
Closing the Loop in Extended Reality with Kafka Streams and Machine Learning ...
Closing the Loop in Extended Reality with Kafka Streams and Machine Learning ...Closing the Loop in Extended Reality with Kafka Streams and Machine Learning ...
Closing the Loop in Extended Reality with Kafka Streams and Machine Learning ...confluent
 
(SEC306) Turn on CloudTrail: Log API Activity in Your AWS Account | AWS re:In...
(SEC306) Turn on CloudTrail: Log API Activity in Your AWS Account | AWS re:In...(SEC306) Turn on CloudTrail: Log API Activity in Your AWS Account | AWS re:In...
(SEC306) Turn on CloudTrail: Log API Activity in Your AWS Account | AWS re:In...Amazon Web Services
 
Building Android apps with Parse
Building Android apps with ParseBuilding Android apps with Parse
Building Android apps with ParseDroidConTLV
 
Cloud Security @ Netflix
Cloud Security @ NetflixCloud Security @ Netflix
Cloud Security @ NetflixJason Chan
 
AWS re:Invent 2016: Workshop: Adhere to the Principle of Least Privilege by U...
AWS re:Invent 2016: Workshop: Adhere to the Principle of Least Privilege by U...AWS re:Invent 2016: Workshop: Adhere to the Principle of Least Privilege by U...
AWS re:Invent 2016: Workshop: Adhere to the Principle of Least Privilege by U...Amazon Web Services
 
(SEC315) NEW LAUNCH: Get Deep Visibility into Resource Configurations | AWS r...
(SEC315) NEW LAUNCH: Get Deep Visibility into Resource Configurations | AWS r...(SEC315) NEW LAUNCH: Get Deep Visibility into Resource Configurations | AWS r...
(SEC315) NEW LAUNCH: Get Deep Visibility into Resource Configurations | AWS r...Amazon Web Services
 

What's hot (20)

Log Analytics with Amazon Elasticsearch Service - September Webinar Series
Log Analytics with Amazon Elasticsearch Service - September Webinar SeriesLog Analytics with Amazon Elasticsearch Service - September Webinar Series
Log Analytics with Amazon Elasticsearch Service - September Webinar Series
 
Getting Started with AWS IoT
Getting Started with AWS IoTGetting Started with AWS IoT
Getting Started with AWS IoT
 
Building a Sustainable Data Platform on AWS
Building a Sustainable Data Platform on AWSBuilding a Sustainable Data Platform on AWS
Building a Sustainable Data Platform on AWS
 
Getting Started with AWS IoT - September 2016 Webinar Series
Getting Started with AWS IoT - September 2016 Webinar SeriesGetting Started with AWS IoT - September 2016 Webinar Series
Getting Started with AWS IoT - September 2016 Webinar Series
 
Orchestrating the Cloud
Orchestrating the CloudOrchestrating the Cloud
Orchestrating the Cloud
 
Containers and the Evolution of Computing
Containers and the Evolution of ComputingContainers and the Evolution of Computing
Containers and the Evolution of Computing
 
Zero to Sixty: AWS CloudFormation (DMG201) | AWS re:Invent 2013
Zero to Sixty: AWS CloudFormation (DMG201) | AWS re:Invent 2013Zero to Sixty: AWS CloudFormation (DMG201) | AWS re:Invent 2013
Zero to Sixty: AWS CloudFormation (DMG201) | AWS re:Invent 2013
 
Scalable and Fault-Tolerant Apps with AWS
Scalable and Fault-Tolerant Apps with AWSScalable and Fault-Tolerant Apps with AWS
Scalable and Fault-Tolerant Apps with AWS
 
AWS APAC Webinar Week - Securing Your Business on AWS
AWS APAC Webinar Week - Securing Your Business on AWSAWS APAC Webinar Week - Securing Your Business on AWS
AWS APAC Webinar Week - Securing Your Business on AWS
 
AWS CloudTrail to Track AWS Resources in Your Account (SEC207) | AWS re:Inven...
AWS CloudTrail to Track AWS Resources in Your Account (SEC207) | AWS re:Inven...AWS CloudTrail to Track AWS Resources in Your Account (SEC207) | AWS re:Inven...
AWS CloudTrail to Track AWS Resources in Your Account (SEC207) | AWS re:Inven...
 
AWS July Webinar Series - Troubleshooting Operational and Security Issues in ...
AWS July Webinar Series - Troubleshooting Operational and Security Issues in ...AWS July Webinar Series - Troubleshooting Operational and Security Issues in ...
AWS July Webinar Series - Troubleshooting Operational and Security Issues in ...
 
Introducing AWS IoT - Interfacing with the Physical World - Technical 101
Introducing AWS IoT - Interfacing with the Physical World - Technical 101Introducing AWS IoT - Interfacing with the Physical World - Technical 101
Introducing AWS IoT - Interfacing with the Physical World - Technical 101
 
February 2016 Webinar Series - Best Practices for IoT Security in the Cloud
February 2016 Webinar Series - Best Practices for IoT Security in the CloudFebruary 2016 Webinar Series - Best Practices for IoT Security in the Cloud
February 2016 Webinar Series - Best Practices for IoT Security in the Cloud
 
Closing the Loop in Extended Reality with Kafka Streams and Machine Learning ...
Closing the Loop in Extended Reality with Kafka Streams and Machine Learning ...Closing the Loop in Extended Reality with Kafka Streams and Machine Learning ...
Closing the Loop in Extended Reality with Kafka Streams and Machine Learning ...
 
(SEC306) Turn on CloudTrail: Log API Activity in Your AWS Account | AWS re:In...
(SEC306) Turn on CloudTrail: Log API Activity in Your AWS Account | AWS re:In...(SEC306) Turn on CloudTrail: Log API Activity in Your AWS Account | AWS re:In...
(SEC306) Turn on CloudTrail: Log API Activity in Your AWS Account | AWS re:In...
 
Building Android apps with Parse
Building Android apps with ParseBuilding Android apps with Parse
Building Android apps with Parse
 
Masting Access Control Policies
Masting Access Control PoliciesMasting Access Control Policies
Masting Access Control Policies
 
Cloud Security @ Netflix
Cloud Security @ NetflixCloud Security @ Netflix
Cloud Security @ Netflix
 
AWS re:Invent 2016: Workshop: Adhere to the Principle of Least Privilege by U...
AWS re:Invent 2016: Workshop: Adhere to the Principle of Least Privilege by U...AWS re:Invent 2016: Workshop: Adhere to the Principle of Least Privilege by U...
AWS re:Invent 2016: Workshop: Adhere to the Principle of Least Privilege by U...
 
(SEC315) NEW LAUNCH: Get Deep Visibility into Resource Configurations | AWS r...
(SEC315) NEW LAUNCH: Get Deep Visibility into Resource Configurations | AWS r...(SEC315) NEW LAUNCH: Get Deep Visibility into Resource Configurations | AWS r...
(SEC315) NEW LAUNCH: Get Deep Visibility into Resource Configurations | AWS r...
 

Viewers also liked

[AWS初心者向けWebinar] AWSではじめよう、IoTシステム構築
[AWS初心者向けWebinar] AWSではじめよう、IoTシステム構築[AWS初心者向けWebinar] AWSではじめよう、IoTシステム構築
[AWS初心者向けWebinar] AWSではじめよう、IoTシステム構築Amazon Web Services Japan
 
AWS Black Belt Tech シリーズ 2015 - AWS IoT
AWS Black Belt Tech シリーズ 2015 - AWS IoTAWS Black Belt Tech シリーズ 2015 - AWS IoT
AWS Black Belt Tech シリーズ 2015 - AWS IoTAmazon Web Services Japan
 
5分でわかるAWS IoT! - あなたも今日からIoT生活 -
5分でわかるAWS IoT! - あなたも今日からIoT生活 -5分でわかるAWS IoT! - あなたも今日からIoT生活 -
5分でわかるAWS IoT! - あなたも今日からIoT生活 -Toshiaki Enami
 
AWS歴2週間で IoT に挑戦してみた。
AWS歴2週間で IoT に挑戦してみた。AWS歴2週間で IoT に挑戦してみた。
AWS歴2週間で IoT に挑戦してみた。Shogo Matsuda
 
IoT Getting Started with AWS and Raspberry Pi
IoT Getting Started with AWS and Raspberry PiIoT Getting Started with AWS and Raspberry Pi
IoT Getting Started with AWS and Raspberry PiYukihito Kataoka
 
JAWS DAYS | IoTプラットフォーム”SORACOM”最新動向
JAWS DAYS | IoTプラットフォーム”SORACOM”最新動向JAWS DAYS | IoTプラットフォーム”SORACOM”最新動向
JAWS DAYS | IoTプラットフォーム”SORACOM”最新動向SORACOM,INC
 
IoTデザインパターン 2015 JAWS沖縄
IoTデザインパターン 2015 JAWS沖縄IoTデザインパターン 2015 JAWS沖縄
IoTデザインパターン 2015 JAWS沖縄Toshiaki Enami
 
20160312 JAWS DAYS JAWS-UG関西女子会 全国の女子たちが支えるプロジェクト
20160312 JAWS DAYS  JAWS-UG関西女子会 全国の女子たちが支えるプロジェクト20160312 JAWS DAYS  JAWS-UG関西女子会 全国の女子たちが支えるプロジェクト
20160312 JAWS DAYS JAWS-UG関西女子会 全国の女子たちが支えるプロジェクトJAWS-UG関西女子会
 
2016/03/12 JAWS DAYS 2016 Keynote
2016/03/12 JAWS DAYS 2016 Keynote2016/03/12 JAWS DAYS 2016 Keynote
2016/03/12 JAWS DAYS 2016 KeynoteToshiyuki Konparu
 
AWS Black Belt Online Seminar 2017 IoT向け最新アーキテクチャパターン
AWS Black Belt Online Seminar 2017 IoT向け最新アーキテクチャパターンAWS Black Belt Online Seminar 2017 IoT向け最新アーキテクチャパターン
AWS Black Belt Online Seminar 2017 IoT向け最新アーキテクチャパターンAmazon Web Services Japan
 
SORACOMとつながるIoTデバイス - 日経ITpro Expoデバイス展示資料
SORACOMとつながるIoTデバイス - 日経ITpro Expoデバイス展示資料SORACOMとつながるIoTデバイス - 日経ITpro Expoデバイス展示資料
SORACOMとつながるIoTデバイス - 日経ITpro Expoデバイス展示資料SORACOM,INC
 
AWSの提供するioTソリューションと実例
AWSの提供するioTソリューションと実例AWSの提供するioTソリューションと実例
AWSの提供するioTソリューションと実例Takashi Koyanagawa
 
Robomec2014 rtm講習会第1部(その1)
Robomec2014 rtm講習会第1部(その1)Robomec2014 rtm講習会第1部(その1)
Robomec2014 rtm講習会第1部(その1)openrtm
 
AWS Sydney Meetup April 2016 - Paul Wakeford
AWS Sydney Meetup April 2016 - Paul WakefordAWS Sydney Meetup April 2016 - Paul Wakeford
AWS Sydney Meetup April 2016 - Paul WakefordPaul Wakeford
 
データセンター視点で比較したクラウドの内側
データセンター視点で比較したクラウドの内側データセンター視点で比較したクラウドの内側
データセンター視点で比較したクラウドの内側Atsushi Nakada
 
IoTに活用!センサの基礎セミナー
IoTに活用!センサの基礎セミナーIoTに活用!センサの基礎セミナー
IoTに活用!センサの基礎セミナーshimane-itoc
 
M2M製品開発におけるmrubyの効果160726
M2M製品開発におけるmrubyの効果160726M2M製品開発におけるmrubyの効果160726
M2M製品開発におけるmrubyの効果160726shimane-itoc
 

Viewers also liked (20)

AWS IoTアーキテクチャパターン
AWS IoTアーキテクチャパターンAWS IoTアーキテクチャパターン
AWS IoTアーキテクチャパターン
 
[AWS初心者向けWebinar] AWSではじめよう、IoTシステム構築
[AWS初心者向けWebinar] AWSではじめよう、IoTシステム構築[AWS初心者向けWebinar] AWSではじめよう、IoTシステム構築
[AWS初心者向けWebinar] AWSではじめよう、IoTシステム構築
 
AWS Black Belt Tech シリーズ 2015 - AWS IoT
AWS Black Belt Tech シリーズ 2015 - AWS IoTAWS Black Belt Tech シリーズ 2015 - AWS IoT
AWS Black Belt Tech シリーズ 2015 - AWS IoT
 
AWS IoT アップデート 2016.02.16
AWS IoT アップデート 2016.02.16AWS IoT アップデート 2016.02.16
AWS IoT アップデート 2016.02.16
 
5分でわかるAWS IoT! - あなたも今日からIoT生活 -
5分でわかるAWS IoT! - あなたも今日からIoT生活 -5分でわかるAWS IoT! - あなたも今日からIoT生活 -
5分でわかるAWS IoT! - あなたも今日からIoT生活 -
 
AWS歴2週間で IoT に挑戦してみた。
AWS歴2週間で IoT に挑戦してみた。AWS歴2週間で IoT に挑戦してみた。
AWS歴2週間で IoT に挑戦してみた。
 
AWS Black Belt Online Seminar 2016 AWS IoT
AWS Black Belt Online Seminar 2016 AWS IoTAWS Black Belt Online Seminar 2016 AWS IoT
AWS Black Belt Online Seminar 2016 AWS IoT
 
IoT Getting Started with AWS and Raspberry Pi
IoT Getting Started with AWS and Raspberry PiIoT Getting Started with AWS and Raspberry Pi
IoT Getting Started with AWS and Raspberry Pi
 
JAWS DAYS | IoTプラットフォーム”SORACOM”最新動向
JAWS DAYS | IoTプラットフォーム”SORACOM”最新動向JAWS DAYS | IoTプラットフォーム”SORACOM”最新動向
JAWS DAYS | IoTプラットフォーム”SORACOM”最新動向
 
IoTデザインパターン 2015 JAWS沖縄
IoTデザインパターン 2015 JAWS沖縄IoTデザインパターン 2015 JAWS沖縄
IoTデザインパターン 2015 JAWS沖縄
 
20160312 JAWS DAYS JAWS-UG関西女子会 全国の女子たちが支えるプロジェクト
20160312 JAWS DAYS  JAWS-UG関西女子会 全国の女子たちが支えるプロジェクト20160312 JAWS DAYS  JAWS-UG関西女子会 全国の女子たちが支えるプロジェクト
20160312 JAWS DAYS JAWS-UG関西女子会 全国の女子たちが支えるプロジェクト
 
2016/03/12 JAWS DAYS 2016 Keynote
2016/03/12 JAWS DAYS 2016 Keynote2016/03/12 JAWS DAYS 2016 Keynote
2016/03/12 JAWS DAYS 2016 Keynote
 
AWS Black Belt Online Seminar 2017 IoT向け最新アーキテクチャパターン
AWS Black Belt Online Seminar 2017 IoT向け最新アーキテクチャパターンAWS Black Belt Online Seminar 2017 IoT向け最新アーキテクチャパターン
AWS Black Belt Online Seminar 2017 IoT向け最新アーキテクチャパターン
 
SORACOMとつながるIoTデバイス - 日経ITpro Expoデバイス展示資料
SORACOMとつながるIoTデバイス - 日経ITpro Expoデバイス展示資料SORACOMとつながるIoTデバイス - 日経ITpro Expoデバイス展示資料
SORACOMとつながるIoTデバイス - 日経ITpro Expoデバイス展示資料
 
AWSの提供するioTソリューションと実例
AWSの提供するioTソリューションと実例AWSの提供するioTソリューションと実例
AWSの提供するioTソリューションと実例
 
Robomec2014 rtm講習会第1部(その1)
Robomec2014 rtm講習会第1部(その1)Robomec2014 rtm講習会第1部(その1)
Robomec2014 rtm講習会第1部(その1)
 
AWS Sydney Meetup April 2016 - Paul Wakeford
AWS Sydney Meetup April 2016 - Paul WakefordAWS Sydney Meetup April 2016 - Paul Wakeford
AWS Sydney Meetup April 2016 - Paul Wakeford
 
データセンター視点で比較したクラウドの内側
データセンター視点で比較したクラウドの内側データセンター視点で比較したクラウドの内側
データセンター視点で比較したクラウドの内側
 
IoTに活用!センサの基礎セミナー
IoTに活用!センサの基礎セミナーIoTに活用!センサの基礎セミナー
IoTに活用!センサの基礎セミナー
 
M2M製品開発におけるmrubyの効果160726
M2M製品開発におけるmrubyの効果160726M2M製品開発におけるmrubyの効果160726
M2M製品開発におけるmrubyの効果160726
 

Similar to AWS IoTで家庭内IoTをやってみた【JAWS DAYS 2016】

(MBL312) NEW! AWS IoT: Programming a Physical World w/ Shadows & Rules
(MBL312) NEW! AWS IoT: Programming a Physical World w/ Shadows & Rules(MBL312) NEW! AWS IoT: Programming a Physical World w/ Shadows & Rules
(MBL312) NEW! AWS IoT: Programming a Physical World w/ Shadows & RulesAmazon Web Services
 
Arduino and the real time web
Arduino and the real time webArduino and the real time web
Arduino and the real time webAndrew Fisher
 
以Device Shadows與Rules Engine串聯實體世界
以Device Shadows與Rules Engine串聯實體世界以Device Shadows與Rules Engine串聯實體世界
以Device Shadows與Rules Engine串聯實體世界Amazon Web Services
 
AWS IoT 핸즈온 워크샵 - 실습 3. AWS IoT Thing Shadow (김무현 솔루션즈 아키텍트)
AWS IoT 핸즈온 워크샵 - 실습 3. AWS IoT Thing Shadow (김무현 솔루션즈 아키텍트)AWS IoT 핸즈온 워크샵 - 실습 3. AWS IoT Thing Shadow (김무현 솔루션즈 아키텍트)
AWS IoT 핸즈온 워크샵 - 실습 3. AWS IoT Thing Shadow (김무현 솔루션즈 아키텍트)Amazon Web Services Korea
 
node.js and the AR.Drone: building a real-time dashboard using socket.io
node.js and the AR.Drone: building a real-time dashboard using socket.ionode.js and the AR.Drone: building a real-time dashboard using socket.io
node.js and the AR.Drone: building a real-time dashboard using socket.ioSteven Beeckman
 
Micro app-framework - NodeLive Boston
Micro app-framework - NodeLive BostonMicro app-framework - NodeLive Boston
Micro app-framework - NodeLive BostonMichael Dawson
 
FIWARE Training: Connecting to Legacy Systems, IoT and other Systems
FIWARE Training: Connecting to Legacy Systems, IoT and other SystemsFIWARE Training: Connecting to Legacy Systems, IoT and other Systems
FIWARE Training: Connecting to Legacy Systems, IoT and other SystemsFIWARE
 
(MBL303) Build Mobile Apps for IoT Devices and IoT Apps for Devices
(MBL303) Build Mobile Apps for IoT Devices and IoT Apps for Devices(MBL303) Build Mobile Apps for IoT Devices and IoT Apps for Devices
(MBL303) Build Mobile Apps for IoT Devices and IoT Apps for DevicesAmazon Web Services
 
DevSum'15 : Microsoft Azure and Things
DevSum'15 : Microsoft Azure and ThingsDevSum'15 : Microsoft Azure and Things
DevSum'15 : Microsoft Azure and ThingsThomas Conté
 
Cnam azure 2014 mobile services
Cnam azure 2014   mobile servicesCnam azure 2014   mobile services
Cnam azure 2014 mobile servicesAymeric Weinbach
 
Is html5-ready-workshop-110727181512-phpapp02
Is html5-ready-workshop-110727181512-phpapp02Is html5-ready-workshop-110727181512-phpapp02
Is html5-ready-workshop-110727181512-phpapp02PL dream
 
Is HTML5 Ready? (workshop)
Is HTML5 Ready? (workshop)Is HTML5 Ready? (workshop)
Is HTML5 Ready? (workshop)Remy Sharp
 
20110525[Taipei GTUG] titanium mobile簡介
20110525[Taipei GTUG] titanium mobile簡介20110525[Taipei GTUG] titanium mobile簡介
20110525[Taipei GTUG] titanium mobile簡介Justin Lee
 
Michael Hackstein - NoSQL meets Microservices - NoSQL matters Dublin 2015
Michael Hackstein - NoSQL meets Microservices - NoSQL matters Dublin 2015Michael Hackstein - NoSQL meets Microservices - NoSQL matters Dublin 2015
Michael Hackstein - NoSQL meets Microservices - NoSQL matters Dublin 2015NoSQLmatters
 
AWS에서 자바스크립트 활용 - 서비스와 개발 도구 - AWS Summit Seoul 2017
AWS에서 자바스크립트 활용 - 서비스와 개발 도구 - AWS Summit Seoul 2017AWS에서 자바스크립트 활용 - 서비스와 개발 도구 - AWS Summit Seoul 2017
AWS에서 자바스크립트 활용 - 서비스와 개발 도구 - AWS Summit Seoul 2017Amazon Web Services Korea
 
WebRTC 101 - How to get started building your first WebRTC application
WebRTC 101 - How to get started building your first WebRTC applicationWebRTC 101 - How to get started building your first WebRTC application
WebRTC 101 - How to get started building your first WebRTC applicationDan Jenkins
 
Voice-enabling Your Home and Devices with Amazon Alexa and AWS IoT - Level 200
Voice-enabling Your Home and Devices with Amazon Alexa and AWS IoT - Level 200Voice-enabling Your Home and Devices with Amazon Alexa and AWS IoT - Level 200
Voice-enabling Your Home and Devices with Amazon Alexa and AWS IoT - Level 200Amazon Web Services
 

Similar to AWS IoTで家庭内IoTをやってみた【JAWS DAYS 2016】 (20)

(MBL312) NEW! AWS IoT: Programming a Physical World w/ Shadows & Rules
(MBL312) NEW! AWS IoT: Programming a Physical World w/ Shadows & Rules(MBL312) NEW! AWS IoT: Programming a Physical World w/ Shadows & Rules
(MBL312) NEW! AWS IoT: Programming a Physical World w/ Shadows & Rules
 
Arduino and the real time web
Arduino and the real time webArduino and the real time web
Arduino and the real time web
 
以Device Shadows與Rules Engine串聯實體世界
以Device Shadows與Rules Engine串聯實體世界以Device Shadows與Rules Engine串聯實體世界
以Device Shadows與Rules Engine串聯實體世界
 
AWS IoT 핸즈온 워크샵 - 실습 3. AWS IoT Thing Shadow (김무현 솔루션즈 아키텍트)
AWS IoT 핸즈온 워크샵 - 실습 3. AWS IoT Thing Shadow (김무현 솔루션즈 아키텍트)AWS IoT 핸즈온 워크샵 - 실습 3. AWS IoT Thing Shadow (김무현 솔루션즈 아키텍트)
AWS IoT 핸즈온 워크샵 - 실습 3. AWS IoT Thing Shadow (김무현 솔루션즈 아키텍트)
 
node.js and the AR.Drone: building a real-time dashboard using socket.io
node.js and the AR.Drone: building a real-time dashboard using socket.ionode.js and the AR.Drone: building a real-time dashboard using socket.io
node.js and the AR.Drone: building a real-time dashboard using socket.io
 
Micro app-framework - NodeLive Boston
Micro app-framework - NodeLive BostonMicro app-framework - NodeLive Boston
Micro app-framework - NodeLive Boston
 
Micro app-framework
Micro app-frameworkMicro app-framework
Micro app-framework
 
FIWARE Training: Connecting to Legacy Systems, IoT and other Systems
FIWARE Training: Connecting to Legacy Systems, IoT and other SystemsFIWARE Training: Connecting to Legacy Systems, IoT and other Systems
FIWARE Training: Connecting to Legacy Systems, IoT and other Systems
 
(MBL303) Build Mobile Apps for IoT Devices and IoT Apps for Devices
(MBL303) Build Mobile Apps for IoT Devices and IoT Apps for Devices(MBL303) Build Mobile Apps for IoT Devices and IoT Apps for Devices
(MBL303) Build Mobile Apps for IoT Devices and IoT Apps for Devices
 
DevSum'15 : Microsoft Azure and Things
DevSum'15 : Microsoft Azure and ThingsDevSum'15 : Microsoft Azure and Things
DevSum'15 : Microsoft Azure and Things
 
Cnam azure 2014 mobile services
Cnam azure 2014   mobile servicesCnam azure 2014   mobile services
Cnam azure 2014 mobile services
 
Kinect de-theremin
Kinect de-thereminKinect de-theremin
Kinect de-theremin
 
Is html5-ready-workshop-110727181512-phpapp02
Is html5-ready-workshop-110727181512-phpapp02Is html5-ready-workshop-110727181512-phpapp02
Is html5-ready-workshop-110727181512-phpapp02
 
Is HTML5 Ready? (workshop)
Is HTML5 Ready? (workshop)Is HTML5 Ready? (workshop)
Is HTML5 Ready? (workshop)
 
20110525[Taipei GTUG] titanium mobile簡介
20110525[Taipei GTUG] titanium mobile簡介20110525[Taipei GTUG] titanium mobile簡介
20110525[Taipei GTUG] titanium mobile簡介
 
Michael Hackstein - NoSQL meets Microservices - NoSQL matters Dublin 2015
Michael Hackstein - NoSQL meets Microservices - NoSQL matters Dublin 2015Michael Hackstein - NoSQL meets Microservices - NoSQL matters Dublin 2015
Michael Hackstein - NoSQL meets Microservices - NoSQL matters Dublin 2015
 
NoSQL meets Microservices
NoSQL meets MicroservicesNoSQL meets Microservices
NoSQL meets Microservices
 
AWS에서 자바스크립트 활용 - 서비스와 개발 도구 - AWS Summit Seoul 2017
AWS에서 자바스크립트 활용 - 서비스와 개발 도구 - AWS Summit Seoul 2017AWS에서 자바스크립트 활용 - 서비스와 개발 도구 - AWS Summit Seoul 2017
AWS에서 자바스크립트 활용 - 서비스와 개발 도구 - AWS Summit Seoul 2017
 
WebRTC 101 - How to get started building your first WebRTC application
WebRTC 101 - How to get started building your first WebRTC applicationWebRTC 101 - How to get started building your first WebRTC application
WebRTC 101 - How to get started building your first WebRTC application
 
Voice-enabling Your Home and Devices with Amazon Alexa and AWS IoT - Level 200
Voice-enabling Your Home and Devices with Amazon Alexa and AWS IoT - Level 200Voice-enabling Your Home and Devices with Amazon Alexa and AWS IoT - Level 200
Voice-enabling Your Home and Devices with Amazon Alexa and AWS IoT - Level 200
 

Recently uploaded

[ CNCF Q1 2024 ] Intro to Continuous Profiling and Grafana Pyroscope.pdf
[ CNCF Q1 2024 ] Intro to Continuous Profiling and Grafana Pyroscope.pdf[ CNCF Q1 2024 ] Intro to Continuous Profiling and Grafana Pyroscope.pdf
[ CNCF Q1 2024 ] Intro to Continuous Profiling and Grafana Pyroscope.pdfSteve Caron
 
VictoriaMetrics Q1 Meet Up '24 - Community & News Update
VictoriaMetrics Q1 Meet Up '24 - Community & News UpdateVictoriaMetrics Q1 Meet Up '24 - Community & News Update
VictoriaMetrics Q1 Meet Up '24 - Community & News UpdateVictoriaMetrics
 
OpenChain AI Study Group - Europe and Asia Recap - 2024-04-11 - Full Recording
OpenChain AI Study Group - Europe and Asia Recap - 2024-04-11 - Full RecordingOpenChain AI Study Group - Europe and Asia Recap - 2024-04-11 - Full Recording
OpenChain AI Study Group - Europe and Asia Recap - 2024-04-11 - Full RecordingShane Coughlan
 
Amazon Bedrock in Action - presentation of the Bedrock's capabilities
Amazon Bedrock in Action - presentation of the Bedrock's capabilitiesAmazon Bedrock in Action - presentation of the Bedrock's capabilities
Amazon Bedrock in Action - presentation of the Bedrock's capabilitiesKrzysztofKkol1
 
Effectively Troubleshoot 9 Types of OutOfMemoryError
Effectively Troubleshoot 9 Types of OutOfMemoryErrorEffectively Troubleshoot 9 Types of OutOfMemoryError
Effectively Troubleshoot 9 Types of OutOfMemoryErrorTier1 app
 
Strategies for using alternative queries to mitigate zero results
Strategies for using alternative queries to mitigate zero resultsStrategies for using alternative queries to mitigate zero results
Strategies for using alternative queries to mitigate zero resultsJean Silva
 
Mastering Project Planning with Microsoft Project 2016.pptx
Mastering Project Planning with Microsoft Project 2016.pptxMastering Project Planning with Microsoft Project 2016.pptx
Mastering Project Planning with Microsoft Project 2016.pptxAS Design & AST.
 
Tech Tuesday Slides - Introduction to Project Management with OnePlan's Work ...
Tech Tuesday Slides - Introduction to Project Management with OnePlan's Work ...Tech Tuesday Slides - Introduction to Project Management with OnePlan's Work ...
Tech Tuesday Slides - Introduction to Project Management with OnePlan's Work ...OnePlan Solutions
 
Keeping your build tool updated in a multi repository world
Keeping your build tool updated in a multi repository worldKeeping your build tool updated in a multi repository world
Keeping your build tool updated in a multi repository worldRoberto Pérez Alcolea
 
Leveraging AI for Mobile App Testing on Real Devices | Applitools + Kobiton
Leveraging AI for Mobile App Testing on Real Devices | Applitools + KobitonLeveraging AI for Mobile App Testing on Real Devices | Applitools + Kobiton
Leveraging AI for Mobile App Testing on Real Devices | Applitools + KobitonApplitools
 
The Ultimate Guide to Performance Testing in Low-Code, No-Code Environments (...
The Ultimate Guide to Performance Testing in Low-Code, No-Code Environments (...The Ultimate Guide to Performance Testing in Low-Code, No-Code Environments (...
The Ultimate Guide to Performance Testing in Low-Code, No-Code Environments (...kalichargn70th171
 
Large Language Models for Test Case Evolution and Repair
Large Language Models for Test Case Evolution and RepairLarge Language Models for Test Case Evolution and Repair
Large Language Models for Test Case Evolution and RepairLionel Briand
 
Introduction to Firebase Workshop Slides
Introduction to Firebase Workshop SlidesIntroduction to Firebase Workshop Slides
Introduction to Firebase Workshop Slidesvaideheekore1
 
Ronisha Informatics Private Limited Catalogue
Ronisha Informatics Private Limited CatalogueRonisha Informatics Private Limited Catalogue
Ronisha Informatics Private Limited Catalogueitservices996
 
GraphSummit Madrid - Product Vision and Roadmap - Luis Salvador Neo4j
GraphSummit Madrid - Product Vision and Roadmap - Luis Salvador Neo4jGraphSummit Madrid - Product Vision and Roadmap - Luis Salvador Neo4j
GraphSummit Madrid - Product Vision and Roadmap - Luis Salvador Neo4jNeo4j
 
Osi security architecture in network.pptx
Osi security architecture in network.pptxOsi security architecture in network.pptx
Osi security architecture in network.pptxVinzoCenzo
 
Advantages of Cargo Cloud Solutions.pptx
Advantages of Cargo Cloud Solutions.pptxAdvantages of Cargo Cloud Solutions.pptx
Advantages of Cargo Cloud Solutions.pptxRTS corp
 
Pros and Cons of Selenium In Automation Testing_ A Comprehensive Assessment.pdf
Pros and Cons of Selenium In Automation Testing_ A Comprehensive Assessment.pdfPros and Cons of Selenium In Automation Testing_ A Comprehensive Assessment.pdf
Pros and Cons of Selenium In Automation Testing_ A Comprehensive Assessment.pdfkalichargn70th171
 
SAM Training Session - How to use EXCEL ?
SAM Training Session - How to use EXCEL ?SAM Training Session - How to use EXCEL ?
SAM Training Session - How to use EXCEL ?Alexandre Beguel
 
JavaLand 2024 - Going serverless with Quarkus GraalVM native images and AWS L...
JavaLand 2024 - Going serverless with Quarkus GraalVM native images and AWS L...JavaLand 2024 - Going serverless with Quarkus GraalVM native images and AWS L...
JavaLand 2024 - Going serverless with Quarkus GraalVM native images and AWS L...Bert Jan Schrijver
 

Recently uploaded (20)

[ CNCF Q1 2024 ] Intro to Continuous Profiling and Grafana Pyroscope.pdf
[ CNCF Q1 2024 ] Intro to Continuous Profiling and Grafana Pyroscope.pdf[ CNCF Q1 2024 ] Intro to Continuous Profiling and Grafana Pyroscope.pdf
[ CNCF Q1 2024 ] Intro to Continuous Profiling and Grafana Pyroscope.pdf
 
VictoriaMetrics Q1 Meet Up '24 - Community & News Update
VictoriaMetrics Q1 Meet Up '24 - Community & News UpdateVictoriaMetrics Q1 Meet Up '24 - Community & News Update
VictoriaMetrics Q1 Meet Up '24 - Community & News Update
 
OpenChain AI Study Group - Europe and Asia Recap - 2024-04-11 - Full Recording
OpenChain AI Study Group - Europe and Asia Recap - 2024-04-11 - Full RecordingOpenChain AI Study Group - Europe and Asia Recap - 2024-04-11 - Full Recording
OpenChain AI Study Group - Europe and Asia Recap - 2024-04-11 - Full Recording
 
Amazon Bedrock in Action - presentation of the Bedrock's capabilities
Amazon Bedrock in Action - presentation of the Bedrock's capabilitiesAmazon Bedrock in Action - presentation of the Bedrock's capabilities
Amazon Bedrock in Action - presentation of the Bedrock's capabilities
 
Effectively Troubleshoot 9 Types of OutOfMemoryError
Effectively Troubleshoot 9 Types of OutOfMemoryErrorEffectively Troubleshoot 9 Types of OutOfMemoryError
Effectively Troubleshoot 9 Types of OutOfMemoryError
 
Strategies for using alternative queries to mitigate zero results
Strategies for using alternative queries to mitigate zero resultsStrategies for using alternative queries to mitigate zero results
Strategies for using alternative queries to mitigate zero results
 
Mastering Project Planning with Microsoft Project 2016.pptx
Mastering Project Planning with Microsoft Project 2016.pptxMastering Project Planning with Microsoft Project 2016.pptx
Mastering Project Planning with Microsoft Project 2016.pptx
 
Tech Tuesday Slides - Introduction to Project Management with OnePlan's Work ...
Tech Tuesday Slides - Introduction to Project Management with OnePlan's Work ...Tech Tuesday Slides - Introduction to Project Management with OnePlan's Work ...
Tech Tuesday Slides - Introduction to Project Management with OnePlan's Work ...
 
Keeping your build tool updated in a multi repository world
Keeping your build tool updated in a multi repository worldKeeping your build tool updated in a multi repository world
Keeping your build tool updated in a multi repository world
 
Leveraging AI for Mobile App Testing on Real Devices | Applitools + Kobiton
Leveraging AI for Mobile App Testing on Real Devices | Applitools + KobitonLeveraging AI for Mobile App Testing on Real Devices | Applitools + Kobiton
Leveraging AI for Mobile App Testing on Real Devices | Applitools + Kobiton
 
The Ultimate Guide to Performance Testing in Low-Code, No-Code Environments (...
The Ultimate Guide to Performance Testing in Low-Code, No-Code Environments (...The Ultimate Guide to Performance Testing in Low-Code, No-Code Environments (...
The Ultimate Guide to Performance Testing in Low-Code, No-Code Environments (...
 
Large Language Models for Test Case Evolution and Repair
Large Language Models for Test Case Evolution and RepairLarge Language Models for Test Case Evolution and Repair
Large Language Models for Test Case Evolution and Repair
 
Introduction to Firebase Workshop Slides
Introduction to Firebase Workshop SlidesIntroduction to Firebase Workshop Slides
Introduction to Firebase Workshop Slides
 
Ronisha Informatics Private Limited Catalogue
Ronisha Informatics Private Limited CatalogueRonisha Informatics Private Limited Catalogue
Ronisha Informatics Private Limited Catalogue
 
GraphSummit Madrid - Product Vision and Roadmap - Luis Salvador Neo4j
GraphSummit Madrid - Product Vision and Roadmap - Luis Salvador Neo4jGraphSummit Madrid - Product Vision and Roadmap - Luis Salvador Neo4j
GraphSummit Madrid - Product Vision and Roadmap - Luis Salvador Neo4j
 
Osi security architecture in network.pptx
Osi security architecture in network.pptxOsi security architecture in network.pptx
Osi security architecture in network.pptx
 
Advantages of Cargo Cloud Solutions.pptx
Advantages of Cargo Cloud Solutions.pptxAdvantages of Cargo Cloud Solutions.pptx
Advantages of Cargo Cloud Solutions.pptx
 
Pros and Cons of Selenium In Automation Testing_ A Comprehensive Assessment.pdf
Pros and Cons of Selenium In Automation Testing_ A Comprehensive Assessment.pdfPros and Cons of Selenium In Automation Testing_ A Comprehensive Assessment.pdf
Pros and Cons of Selenium In Automation Testing_ A Comprehensive Assessment.pdf
 
SAM Training Session - How to use EXCEL ?
SAM Training Session - How to use EXCEL ?SAM Training Session - How to use EXCEL ?
SAM Training Session - How to use EXCEL ?
 
JavaLand 2024 - Going serverless with Quarkus GraalVM native images and AWS L...
JavaLand 2024 - Going serverless with Quarkus GraalVM native images and AWS L...JavaLand 2024 - Going serverless with Quarkus GraalVM native images and AWS L...
JavaLand 2024 - Going serverless with Quarkus GraalVM native images and AWS L...
 

AWS IoTで家庭内IoTをやってみた【JAWS DAYS 2016】

  • 2. 自己紹介 • 土持昌志 • @pampitter • 株式会社鈴木商店 • JAWS-UG大阪 • 好きなAWSサービス:Lambda、S3
  • 4. AWS IoTをやってみたきっかけ • 2015年10月に子供が生まれました • 2015年10月のre:InventでAWS IoT発表 • 風邪・インフルエンザ対策に湿度データを収 集してみよう
  • 6. Device Gateway Device Gateway (Broker) Publisher Subscriber Publisher Publisher Subscriber Subscriber MQTT HTTP WebSocket MQTT HTTP WebSocket
  • 7. Rule Engine Action SELECT humidity FROM '#' WHERE humidity <= 40 Rule Query Device Gateway {"temp": 20.0} {"humidity": 40.0} {"temp": 22.0} {"humidity": 70.0} {"temp": 21.0} {"humidity": 20.0} {"humidity": 40.0} {"humidity": 20.0}
  • 9. センサーデータを収集 # -*- coding: utf-8 -*- from __future__ import division from __future__ import absolute_import from __future__ import print_function from __future__ import unicode_literals from sense_hat import SenseHat import datetime import json sense = SenseHat() hum = sense.get_humidity() now = datetime.datetime.now() hum_json = { 'timestamp': now.strftime("%Y-%m-%d %H:%M:%S"), 'humidity': hum } print(json.dumps(hum_json))
  • 10. var execSync = require('child_process').execSync; module.exports = { sensor: function() { var data = "" + execSync('python ' + __dirname + '/sensor.py'); return JSON.parse(data); } } NodeからPythonへのブリッジ
  • 11. var awsIot = require('aws-iot-device-sdk'); var bridge = require('./bridge.js'); var device = awsIot.device({ keyPath: './certs/private.pem.key', certPath: './certs/certificate.pem.crt', caPath: './certs/root-CA.crt', clientId: 'pi2_01', region: 'ap-northeast-1' }); device .on('connect', function() { console.log('connect'); setInterval(function() { var humidity = bridge.sensor(); console.log(humidity) device.publish('pi2_01', JSON.stringify(humidity)); }, 1000); }); AWS IoTにパブリッシュ
  • 14. • desired:管理アプリなどから指定されたあるべき状態 • reported:デバイスが報告した現在の状態 • delta:desiredとreportedの差分 Device Shadow { "desired": { "color": "white" }, "reported": { "color": "white" } } { "desired": { "color": "red" }, "reported": { "color": "red" } } { "desired": { "color": "red" }, "reported": { "color": "white" }, "delta": { "color": "red" } }
  • 16. LEDを点灯 # -*- coding: utf-8 -*- from __future__ import division from __future__ import absolute_import from __future__ import print_function from __future__ import unicode_literals from sense_hat import SenseHat import sys sense = SenseHat() argv = sys.argv colors = { "red": (255, 0, 0), "yellow": (255, 215, 0), "green": (50, 205, 50), "blue": (0, 0, 255), "light_blue": (91, 192, 222), "white": (255, 255, 255), "black": (0, 0, 0) } if colors.has_key(argv[1]): color = colors[argv[1]] else: color = colors['black'] pixels = [] for pix in range(0, 64) : pixels.append(color) sense.set_pixels(pixels)
  • 17. var execSync = require('child_process').execSync; module.exports = { sensor: function() { var data = "" + execSync('python ' + __dirname + '/sensor.py'); return JSON.parse(data); }, led: function(color) { execSync('python ' + __dirname + '/led.py ' + color); return; } } NodeからPythonへのブリッジ
  • 18. var awsIot = require('aws-iot-device-sdk'); var bridge = require('./bridge.js'); var thingShadows = awsIot.thingShadow({ keyPath: './certs/private.pem.key', certPath: './certs/certificate.pem.crt', caPath: './certs/root-CA.crt', clientId: 'pi2_01', region: 'ap-northeast-1' }); var clientTokenGet; var clientTokenUpdate; thingShadows.on('connect', function() { thingShadows.register('pi2_01'); setTimeout(function() { clientTokenGet = thingShadows.get('pi2_01'); }, 2000); }); Device ShadowからLEDを操作 thingShadows.on('status', function(thingName, stat, clientToken, stateObject) { console.log('received ' + stat + ' on ' + thingName + ': ' + JSON.stringify(stateObject)); if('delta' in stateObject.state && 'color' in stateObject.state.delta){ var delta_state = stateObject.state.delta.color; bridge.led(delta_state); console.log('received delta ' + ' on ' + thingName + ': ' + JSON.stringify(stateObject)); clientTokenUpdate = thingShadows.update('pi2_01', { "state": { "reported": { "color": delta_state } } }); } }); thingShadows.on('delta', function(thingName, stateObject) { var state = stateObject.state.color; bridge.led(state); console.log('received delta ' + ' on ' + thingName + ': ' + JSON.stringify(stateObject)); clientTokenUpdate = thingShadows.update('pi2_01', { "state": { "reported": { "color": state } } }); }); thingShadows.on('timeout', function(thingName, clientToken) { console.log('received timeout ' + ' on ' + operation + ': ' + clientToken); });
  • 21. var awsIot = require('aws-iot-device-sdk'); var bridge = require('./bridge.js'); var thingShadows = awsIot.thingShadow({ keyPath: './certs/private.pem.key', certPath: './certs/certificate.pem.crt', caPath: './certs/root-CA.crt', clientId: 'pi2_01', region: 'ap-northeast-1' }); var clientTokenGet; var clientTokenUpdate; thingShadows.on('connect', function() { thingShadows.register( 'pi2_01' ); setTimeout( function() { clientTokenGet = thingShadows.get('pi2_01'); }, 2000 ); setInterval(function() { var humidity = bridge.sensor(); console.log(humidity) thingShadows.publish('pi2_01', JSON.stringify(humidity)); }, 1000); }); センサーデータを収集/ Device ShadowからLEDを操作 thingShadows.on('status', function(thingName, stat, clientToken, stateObject) { console.log('received ' + stat + ' on ' + thingName + ': ' + JSON.stringify(stateObject)); if('delta' in stateObject.state && 'color' in stateObject.state.delta){ var delta_state = stateObject.state.delta.color; bridge.led(delta_state); console.log('received delta ' + ' on ' + thingName + ': ' + JSON.stringify(stateObject)); clientTokenUpdate = thingShadows.update('pi2_01', { "state": { "reported": { "color": delta_state } } }); } }); thingShadows.on('delta', function(thingName, stateObject) { var state = stateObject.state.color; bridge.led(state); console.log('received delta ' + ' on ' + thingName + ': ' + JSON.stringify(stateObject)); clientTokenUpdate = thingShadows.update('pi2_01', { "state": { "reported": { "color": state } } }); }); thingShadows.on('timeout', function(thingName, clientToken) { console.log('received timeout ' + ' on ' + operation + ': ' + clientToken); });
  • 22. センサーデータを収集/ Device ShadowからLEDを操作 // データの送受信のみの場合はdevice.publish device.publish('pi2_01', JSON.stringify(humidity)); // DeviceShadow使用時はthingShadows.publish thingShadows.publish('pi2_01', JSON.stringify(humidity));
  • 23. # -*- coding: utf-8 -*- from __future__ import print_function from __future__ import unicode_literals from __future__ import absolute_import from __future__ import division import json import boto3 print('Loading function') iot = boto3.client('iot-data') def lambda_handler(event, context): print("Received event: " + json.dumps(event)) humidity = event['humidity'] if humidity < 40: color = 'blue' elif humidity >= 40 and humidity <= 70: color = 'green' else : color = 'red' DeviceShadowを操作する Lambda Function try: shadow_stream = response = iot.get_thing_shadow( thingName='pi2_01' ) shadow_string = shadow_stream['payload'].read().decode('utf-8') shadow = json.loads(shadow_string) desired_color = shadow['state']['desired']['color'] if color != desired_color: payload = { "state": { "desired": { "color": color, } } } iot.update_thing_shadow( thingName='pi2_01', payload=json.dumps(payload) ) print('Update DeviceShadow delta: {}'.format(color)) else: print('DeviceShadow has been updated') return except Exception as e: print(e) print('Error') raise e
  • 28. • Python • Node.js • Java AWS SDKにIoT関連のものが2つある
  • 29. まとめ • AWS IoTで簡単にセンサーデータをアップで きるようになった。 • Device Shadowでリモートからのデバイス制 御がやりやすくなった。 • この冬は風邪を引かなかった!

Editor's Notes

  1. ラズパイを充電器を接続して起動状態にし三脚にセットする MacとラズパイをポケットWi-Fiにつないでsshしておく 黒曜石を接続して電源を入れておく Macで画面を見せるためにDynamoDBとAWS IoTの画面を開いておく このセッションではAWS IoTで家庭内IoTやってみた、という内容で発表させていただきます。よろしくお願いします。
  2. では本編始めていきます。まず軽く自己紹介させていただきます。名前は土持昌志といいます。普段は大阪で鈴木商店っていうちょっと変わった名前の会社でエンジニアやってます。今朝夜行バスに乗ってこちらに到着しました。AWSサービスではLamdaとS3が最近のお気に入りです。
  3. IoTをやってみたきっかけですが
  4. どういうことをやったのかという前にAWS IoTの概要について確認したいと思います。
  5. IoTの世界ではセンサーから吐き出される小さいけども大量のデータやり取りするためMQTTという軽量・省電力なプロトコルを使うのが主流になっています。メッセージを出す人がパブリッシャー、メッセージを受け取る人がサブスクライバーというんですがMQTTのメッセージのやり取りにはブローカーという中継サーバーが必要ですがAWS IoTではデバイスゲートウェイがこのブローカーの役割をしてくれています。マネージドサービスなのでやりとりするメッセージが増えても自動的にスケーリングしてくれるようです。デバイスゲートウェイではMQTTに加えてHTTP、WebSocketにも対応しています。
  6. モノからデバイスゲートウェイで受け取ったデータをAWSのサービスに流す役割をするのがルールエンジンです。受け取ったデータをRule QueryというところでSQLライクな構文で流す内容を設定し、Actionでどんな処理を行うのかを設定します。例えばデバイス側で温度と湿度を取得していて、湿度が40%以下の時にだけ実行したい処理がある場合、クエリーににそのような条件を記載することで条件にあった場合のみアクションをトリガーすることができます。
  7. そんな感じで最初に作った構成です。ハードウェアはみんな大好きラズベリーパイを使いました。ラズパイに湿度センサーを接続して、センサーのデータをデバイスゲートウェイのMQTTトピックに送信します。ルールエンジンでは受け取ったデータをDynamoDBに流すように設定しました。
  8. ラズパイには幾つかスクリプトを作成しました。資料はまた後日公開します。まずセンサーからデータを読み取るpythonスクリプトです。実行すると湿度センサーの値を出力します。
  9. 2つ目は先ほどのpythonスクリプトを呼び出すためのnode.jsのスクリプトです。メインのスクリプトから呼び出すためにmoduleにしています。
  10. 最後にAWS IoTにデータをパブリッシュするためのスクリプトです。AWS IoTのデバイスSDKと先ほどのPythonを呼び出すためのブリッジモジュールを読み込んでいます。デバイスSDKっていうのはAWS IoTへのMQTT通信を簡単に行えるようにしてくれるライブラリです。スクリプトの内容としてはAWS IoTに接続できたら一定間隔でデータを収集してパブリッシュするようにしています。
  11. ということでデモをやってみたいと思います。
  12. というわけで湿度センサーの値がDynamoDBに流れるところを見てもらいました。で、次にAWS IoTの肝っぽいDeviceShadowを触ってみます。DeviceShadowというのはモノの仮想コピーをAWS IoT上に作る機能です。たとえモノ自体に通信ができない状態が発生しても仮想コピーに対して通信できるのでアクションを実行できるようになってます。IoTっていうのは通信環境であったりとか、電源であったりとかの問題で常にオンライン状態が期待できるわけではないのでかなり画期的な機能なんじゃないかと思ってます。
  13. デバイスシャドウを使った状態管理の流れを見てみます。デバイスシャドウの状態パラメータにはdesiredという管理アプリケーションなどから指定したこういう状態にしてくださいというパラメータ、デバイスが報告したreportedというパラメータがまずあります。最初の状態では差分がないので何も起こりません。次に真ん中の状態、管理アプリケーションが色を赤くしてくださいという命令を出したとします。デバイスが報告した状態と差ができるので差分ステータスとしてdeltaという項目が増えます。デバイスがデバイスシャドウを見に来たタイミングでdeltaがあるとデバイスはdeltaの内容で自分の状態を更新し、同じようにDeviceShadowも更新します。差分がなくなったのでdeltaは削除されます。このサイクルが繰り返されることでシャドウとデバイスの状態が同期されるようになります。
  14. では実際にやってみます。二つ目のデモはAWS IoTのマネジメントコンソールからDeviceShadowの状態を更新して、デバイス側のLEDを光らせてみたいと思います。
  15. 今度はLEDを点灯させるためのスクリプトを用意しました。フルカラーLEDなので色のパラメータを幾つか用意していて、引数から持ってきた色の名前があればその色で光るようになっています。
  16. 先ほども出てきたNode.jsからPythonへのブリッジモジュールにはLEDを点灯させる関数を追加しました。
  17. 最後はDeviceShadowから状態を受け取るスクリプトです。Demo1ではデバイスクラスをSDKから読んでいたんですが、DeviceShadowを操作するときはthingShadowクラスを使います。DeviceShadowとthingShadowと二つ名前があるんですがなんで名前が分かれているのか知っている方がいれば後でこっそり教えてください。
  18. ということでデモをやってみたいと思います。
  19. 最後に今実際に自宅で動かしてる構成なんですが、Demo1、2を組み合わせてみたいと思います。湿度センサーの値に合わせてLambdaからDeviceShadowを更新してラズパイのLEDの色を変更して湿度の通知にしています。
  20. 今度はセンサーデータをアップしつつ、デバイスシャドウの状態を見てLEDを操作するスクリプトです。もうちっちゃくてわかんないと思うので雰囲気だけみてください。
  21. ちなみにthingshadowクラスはdeviceクラスも内包しているので同じような形でpublishすれば送信されます。
  22. デバイスからの報告された湿度のデータによってDeviceShadowのLEDの色を変更するLambdaFunctionはこんな感じになってます。個人的にJavascriptよりPythonの方が好きなのでPythonで書いてみました。SDKを読み込んで出してます
  23. ということでデモをやってみたいと思います。
  24. まず最初にいくらデータを送ってもDynamoDBに保存されないというトラブルがありました。原因はIAM Roleの設定が間違ってました。Actionを設定するときに「Create a new Role」を選ぶとIAM Roleの作成画面に飛んでその場でロールが作れますが
  25. ここから作るとリソースにきっちりActionで使うテーブル名が指定されているんですね。ポリシーの中身をちゃんと確認しておけばよかったんですが、何回かテーブルを作り直したのにロールを使い回していたのでテーブルへのアクセス権がなくデータが入らないというオチでした。ちゃんとロールを個別に作るなりリソースの指定を緩くするなりすれば大丈夫でした
  26. これはデバイスSDKじゃない普通のSDKの方の話なんですがIoT関連でサービスが2つに分かれています。一例でLambdaが対応している言語のものを出してみました。IoTとだけついている方はAWS IoT自体のリソース操作、モノやルールの追加、編集、削除を行う時に使います。Dataがついている方はモノの操作に使用します。DeviceShadowを更新したりですとかトピックにpublishしたりするのに使えるので覚えておいてください。