家電製品のalexa連携iotクラウドを awsマネージドサービスで …
Post on 11-Jan-2022
9 Views
Preview:
TRANSCRIPT
© 2020, Amazon Web Services, Inc. or its affiliates. All rights reserved.In Partnership with
家電製品のALEXA連携IoTクラウドをすべてAWSマネージドサービスで構築
香川修志 KAGAWA Shujiアイリスオーヤマ株式会社ソフト開発チームマネージャー
飛田直人 TOBITA Naoto株式会社システムゼウス取締役COO
D - 6
アイリスオーヤマ株式会社 及び 登壇者 のご紹介
アイリスオーヤマ株式会社
1958年 創業… <以下主要製品>1980年代 園芸プランター
クリア収納ケース1990年代 ラティス
メタルラック2000年代 ホースリール
LED電球2010年代 LEDシーリングライト
サーキュレーター布団乾燥機スティッククリーナー炊飯器
…2020年 Alexa対応サーキュレータ
香川 修志(登壇者)
1974年 福岡生まれ…某メーカー系のソフト会社に入社携帯電話(x501~x900iV)デバドラを開発カーナビ(市販)デバドラを開発2012年 現職
LEDシーリングライトサーキュレーター加湿器空気清浄機クリーナー分離式IH炊飯器
等々、20数年、組込ソフトに従事…2019年 Alexa対応サーキュの開発に着手
2
Alexa対応サーキュレーター のご紹介
アレクササーキュレーターを
つけて
Alexaのスマートホームスキルに対応
・電源のON/OFF・風量の調節・左右の首振り・上下の首振り
2020年7月発売
3
IRIS SmartST
開発の壁
弊社には組込ソフト技術者は揃っているが、IoT、クラウドは取り組み始めたばかり…
通信のセキュリティ
ユーザー認証の仕組み
エッジとクラウドの同期
EC2を立ち上げた後運用保守しきれない
クラウド・スマホアプリの開発者がいない
MCUメーカーと共同開発※今回の説明には含めてません
Cognitoの活用
IoT Core(シャドウ)の活用
マネージドサービスのみでシステムを構築
システムゼウス様のご協力
4
© 2020, Amazon Web Services, Inc. or its affiliates. All rights reserved.In Partnership with
© 2020, Amazon Web Services, Inc. or its affiliates. All rights reserved. In Partnership with
株式会社システムゼウスの紹介
• アプリケーションの受託開発が主事業• 社員数60名(エンジニア56名)• 電子マネーなど、強セキュリティシステムの開発が得意• AWSクラウドベースの開発実績多数• IoT関連のシステム開発に注力。FreeRTOSを用いた組込み開発実績あり。
コーポレートサイト https://www.systemzeus.co.jp/
6
© 2020, Amazon Web Services, Inc. or its affiliates. All rights reserved. In Partnership with
IoTエンジニアの育成方針
© 2020 Systemzeus Inc. 7
クラウド専門
アプリ専門 組込み専門 3つを一人で
© 2020, Amazon Web Services, Inc. or its affiliates. All rights reserved. In Partnership with
Alexa対応サーキュレーターのデモ映像
© 2020 Systemzeus Inc. 8
© 2020, Amazon Web Services, Inc. or its affiliates. All rights reserved. In Partnership with
システム全体概要
© 2020 Systemzeus Inc. 9
Device CloudCore
Amazon Echo
Device AppAPI
Google ActionAPI
Alexa SkillAPI
Smart Home Skill
Alexa Cloud
Google Assistant
Google Home
デバイスクラウド
デバイスアプリ
スピーカアプリ
・Android・iOS
・Alexa・Google Home
運用PC
組込みアプリ
デバイス(サーキュレーター)
Kinesis DataFirehose
S3
Athena
QuickSightログ解析
IoT DeviceDefender
GuardDuty
CloudWatch
AWS Cloud監視
デバイスはアイリスオーヤマ様が開発。通信部分にAmazon FreeRTOSを活用。
© 2020, Amazon Web Services, Inc. or its affiliates. All rights reserved. In Partnership with
発話操作
© 2020 Systemzeus Inc. 10
処理手順
1. 発話による指示。録音データの解析。2. アレクサスキルにディレクティブを送信3. デバイスクラウドに操作要求4. デバイスシャドウの更新5. シャドウの取得とデバイスの状態変更6. 操作結果の通知
Alexa Skill ← → Device Cloud
発話
ディレクティブ
APIコール
シャドウの更新
シャドウの取得及び変更処理操作結果の通知
1
2
5
6
3
4
発話データ
組込アプリ
© 2020, Amazon Web Services, Inc. or its affiliates. All rights reserved. In Partnership with
デバイス登録(プロビジョニング)
© 2020 Systemzeus Inc. 11
スマホアプリを使いデバイスをクラウドに接続&登録
© 2020, Amazon Web Services, Inc. or its affiliates. All rights reserved. In Partnership with
アカウントリンキング
© 2020 Systemzeus Inc. 12
Alexaアプリにて発話スキルを有効化=Alexaユーザーとデバイスクラウドユーザーをログイン行為で紐づけ
© 2020, Amazon Web Services, Inc. or its affiliates. All rights reserved. In Partnership with
AWS Cloud
Alexa & Google Assistant両対応
© 2020 Systemzeus Inc. 13
Shadow
{"desired": {"power": "ON","leftRight": "ON","upDown": "ON","Speed": 0
},"reported": {"power": "ON","leftRight": "ON","upDown": "ON","Speed": 0
}}
Alexa Cloud
Google Assistant
ディレクティブ受信ロジック
インテント受信ロジック
Shadow加工ロジック
Shadow加工ロジック
AlexaとGoogle Assistantからの受信データは異なるが、Shadowは共通で一つにする
© 2020, Amazon Web Services, Inc. or its affiliates. All rights reserved. In Partnership with
ユーザー利用状況の可視化
© 2020 Systemzeus Inc. 14
Kinesis Data FirehoseLambda CloudWatch S3
Lambdaログフォーマット変換用
ログをFirehoseに即時配信
Athenaで処理しやすく変換
Athena
クエリでログ抽出
QuickSight
Data set
AWS IoT Core
API Gateway
ログ送信元
グラフ参照
ログをAthenaで調査することが第一目的。その機構を流用して利用状況をグラフ化している。
© 2020, Amazon Web Services, Inc. or its affiliates. All rights reserved. In Partnership with
QuickSightのグラフ例
© 2020 Systemzeus Inc. 15
© 2020, Amazon Web Services, Inc. or its affiliates. All rights reserved. In Partnership with
IoT Device Defender
© 2020 Systemzeus Inc. 16
IoTのセキュリティにおいて、「監査」と「検出」の2つの役割を担う
© 2020, Amazon Web Services, Inc. or its affiliates. All rights reserved. In Partnership with
アジャイル開発
© 2020 Systemzeus Inc. 17
設計
•通信シーケンス
•電文フォーマット
•API仕様…など
TDD
•ToDoリストを作成•重要なポイントにテストコードを付けながらコーディング
ソースレビュー
•開発者同士で相互レビュー
単体試験
•テストコードのカバレッジをc1レベルで100%
•境界値テストの実施
結合試験
•設計の裏どり
•試験項目書書を作成し手作業で試験を実施
Sprint内で小さなWaterFall開発。テスト駆動開発(TDD)、テストコード適用の徹底が特徴。
Sun Mon Tue Wed Thu Fri Sat
• Sprint計画• 設計
• 設計 • 設計 • 設計
• TDD
• TDD
Sun Mon Tue Wed Thu Fri Sat
• TDD • ソースレビュー• 単体試験の実施
• 単体試験の実施• 結合試験項目書の作成
• 結合試験の実施※基板にて実行
• 結合試験のつづき• 活動結果まとめ• Sprintレビュー• レトロスペクティブ
1 Sprint=2 週間( 10営業日)で開発を進行。下表は1Sprintの日割りイメージ。
© 2020, Amazon Web Services, Inc. or its affiliates. All rights reserved. In Partnership with
開発スケジュール
© 2020 Systemzeus Inc. 18
9営業日
Sprint 0(準備)10営業日
Sprint 1
9営業日
Sprint 2
9営業日
Sprint 3
1. ユーザーストーリー作成2. 開発環境の構築
クラウド、Android、iOS
3. アプリ画面遷移の作成4. 主要通信シーケンスの作成5. iOS、Andrアプリ審査基準の調査6. Alexaスキル、Actions on Google
審査基準調査7. 技術調査
1. デバイスクラウドへのログイン2. ユーザー削除3. デバイス登録・削除4. デバイス一覧表示5. デバイス名の変更
1. アカウントリンキング・解除2. アプリバージョン確認API
3. Amazon Echoからの発話操作4. Google Homeからの発話操作
1. デバイスローカル操作結果のAIクラウドへの通知
2. クラウド商用環境、ステージング環境の構築
3. スマホアプリにデザインパーツを適用
4. 納品物の清書
約2ヶ月かけてクラウドとスマホアプリ(iOS・Andr)を開発。5人体制。
※クラウドの設定チューニングやシステム運用機能の実装(AWS Well-Architected フレームワーク対応)は、上記開発が終わったあとに別途実施
Tomohiro Kazuki MasatoTami Yudai
システムゼウス
開発メンバ
© 2020, Amazon Web Services, Inc. or its affiliates. All rights reserved. In Partnership with
商用環境 ステージング環境 開発環境
クラウドアプリケーション開発環境(CI/CD)
© 2020 Systemzeus Inc. 19
Windows 10 pro
ノートPC
Visual Studio Code
Remote Development
extension VirtualBox / Vagrant
Linux
SSHでアクセス
コーディングテストコードの実行
Node.jsDocker
SAM CLI
Lambda
API Gateway
クラウドアプリ
Typescript Jest
CDK
AWS SDKAWS
CLI
クラウドアプリ
Code Pipeline
Code
Commit
Code Build Cloud
Formation
ローカルLambda環境
CDK
© 2020, Amazon Web Services, Inc. or its affiliates. All rights reserved. In Partnership with
今後の課題
© 2020 Systemzeus Inc. 20
Thank you!
© 2020, Amazon Web Services, Inc. or its affiliates. All rights reserved.In Partnership with
香川修志 KAGAWA Shujiアイリスオーヤマ株式会社
飛田直人 TOBITA Naoto株式会社システムゼウス
top related