SlideShare una empresa de Scribd logo
1 de 30
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を始めよう!

Más contenido relacionado

La actualidad más candente

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
 

La actualidad más candente (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...
 

Destacado

[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
 

Destacado (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 a 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)
Is HTML5 Ready? (workshop)Is HTML5 Ready? (workshop)
Is HTML5 Ready? (workshop)Remy Sharp
 
Is html5-ready-workshop-110727181512-phpapp02
Is html5-ready-workshop-110727181512-phpapp02Is html5-ready-workshop-110727181512-phpapp02
Is html5-ready-workshop-110727181512-phpapp02PL dream
 
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 a 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)
Is HTML5 Ready? (workshop)Is HTML5 Ready? (workshop)
Is HTML5 Ready? (workshop)
 
Is html5-ready-workshop-110727181512-phpapp02
Is html5-ready-workshop-110727181512-phpapp02Is html5-ready-workshop-110727181512-phpapp02
Is html5-ready-workshop-110727181512-phpapp02
 
20110525[Taipei GTUG] titanium mobile簡介
20110525[Taipei GTUG] titanium mobile簡介20110525[Taipei GTUG] titanium mobile簡介
20110525[Taipei GTUG] titanium mobile簡介
 
NoSQL meets Microservices
NoSQL meets MicroservicesNoSQL meets Microservices
NoSQL meets Microservices
 
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
 
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
 

Último

Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...stazi3110
 
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...harshavardhanraghave
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfkalichargn70th171
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Modelsaagamshah0812
 
Test Automation Strategy for Frontend and Backend
Test Automation Strategy for Frontend and BackendTest Automation Strategy for Frontend and Backend
Test Automation Strategy for Frontend and BackendArshad QA
 
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...MyIntelliSource, Inc.
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsAlberto González Trastoy
 
Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)OPEN KNOWLEDGE GmbH
 
Active Directory Penetration Testing, cionsystems.com.pdf
Active Directory Penetration Testing, cionsystems.com.pdfActive Directory Penetration Testing, cionsystems.com.pdf
Active Directory Penetration Testing, cionsystems.com.pdfCionsystems
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVshikhaohhpro
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdfWave PLM
 
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...OnePlan Solutions
 
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerHow To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerThousandEyes
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxComplianceQuest1
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comFatema Valibhai
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...kellynguyen01
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfkalichargn70th171
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsJhone kinadey
 

Último (20)

Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
 
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
 
Exploring iOS App Development: Simplifying the Process
Exploring iOS App Development: Simplifying the ProcessExploring iOS App Development: Simplifying the Process
Exploring iOS App Development: Simplifying the Process
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Models
 
Test Automation Strategy for Frontend and Backend
Test Automation Strategy for Frontend and BackendTest Automation Strategy for Frontend and Backend
Test Automation Strategy for Frontend and Backend
 
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
 
Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)
 
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS LiveVip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
 
Active Directory Penetration Testing, cionsystems.com.pdf
Active Directory Penetration Testing, cionsystems.com.pdfActive Directory Penetration Testing, cionsystems.com.pdf
Active Directory Penetration Testing, cionsystems.com.pdf
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTV
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf
 
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
 
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerHow To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docx
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.com
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial Goals
 

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でリモートからのデバイス制 御がやりやすくなった。 • この冬は風邪を引かなかった!

Notas del editor

  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したりするのに使えるので覚えておいてください。