オンラインセミナー 今からはじめるBluemixシリーズ第 2 期 Bluemixで実現するソリューション第 3 回 Internet of Things 日本アイ ビー エム株式会社ソフトウェア事業本部クラウド プラットフォーム サービス事業部 テクニカル セールス李展飛
アジェンダ Internet of Things(IoT) の背景 IoT の特徴に適した通信プロトコル IBM が提供するクラウド上の IoT 環境 IoT Foundation Bluemix IoT サービス Node-RED Demo123 まとめ 2
アジェンダ Internet of Things(IoT) の背景 IoT の特徴に適した通信プロトコル IBM が提供するクラウド上の IoT 環境 IoT Foundation Bluemix IoT サービス Node-RED Demo123 まとめ 3
Internet of Things(IoT) の背景 モノ 500 億 デジタル社会持続可能な成長 グローバルな接続性 一人ひとりのモバイル 変曲点 ヒトヒト場所 50 億 50 億 10 億 4
IoT 事例 ~ 北九州スマートコミュニティー創造事業 スマートメーター スマートメーター ( 低圧用 ) コンセントレーター スマートメーター ( 高圧用 ) 地域エネルギーマネジメント システム CEMS 連携モバイル システム 仕様 / 構成管理 設置 / 計測点検情報管理作業管理 ビル 商業施設 工場など BEMS BEMS による相互接続 データ収集 大規模データ集積 データ加工 提供 状態管理トレーサビリティー管理 最適配置分析 交通 JEMS 住宅 HEMS HEMS IBM スマートコミュニティー情報統合基盤 IBM 蓄電池等アセット管理システム 5 EMS:Energy Management System http://www-06.ibm.com/innovation/jp/smarterplanet/cities/kitakyusyu_201205.html
アジェンダ Internet of Things(IoT) の背景 IoT の特徴に適した通信プロトコル IBM が提供するクラウド上の IoT 環境 IoT Foundation Bluemix IoT サービス Node-RED Demo123 まとめ 6
IoT の特徴と通信プロトコルに求められる要件 デバイスの特徴 多種多様 膨大な数を接続する 小規模でマシンパワーが小さい 通信が不安定 7 通信プロトコルに求められる要件 軽量性 : コンパクトで軽量なプロトコル 拡張性 : ディバイスの増減に柔軟に対応 双方向性 : 双方向でN:N 型の通信 信頼性 : 確実な転送 オープン性 : 可搬性向上 開発負荷の軽減
MQ Telemetry Transport () IoT や M2M 環境に最適化された通信プロトコル 不安定な稼動環境 低帯域 N/W 環境で使用されるセンサー / 端末向けに開発 オープンな仕様 OASIS にて標準化が進められている M2M: Machine to Machine パブリッシュ / サブスクライブ型の通信モデル トピックをベースに 通信相手を意識することなく双方向の N:N 通信が可能 8 クライアントパブリッシャーパブリッシュ プロトコル トピック Pub/Sub ブローカー サーバー サブスクライバー クライアント サブスクライブサブスクライバー プロトコル
アジェンダ Internet of Things(IoT) の背景 IoT の特徴に適した通信プロトコル IBM が提供するクラウド上の IoT 環境 IoT Foundation Bluemix IoT サービス Node-RED Demo123 まとめ 10
IBM が提供するクラウド上の IoT 環境 クラウド環境の IoT 基盤 (IoT Foundation) の 3 要素 IBM Internet of Things Foundation IoT Service Node-RED IoT Foundation を利用するメリット IoT アプリケーションを即座に実行可能準備済み 基盤を利用することで アプリケーションの開発に注力 IoT ファンデーション 準備済み 基盤 11 アプリケーション開発者 デバイス
IoT Foundation クラウド上で サーバー機能を提供 デバイスの認証機能を提供 IBM ID を使用しサイン イン後 認証トークンを発行 https://internetofthings.ibmcloud.com Web API 経由での登録も可能 Quickstart にてデバイスからの接続を認証なしで確認可能 データ参照用 GUI センサーシミュレーターを用意 認証トークンを用いて接続 認証トークンを発行 デバイス IoT Foundation サーバー 認証なしでも接続可能 Quickstart データ確認用 GUI を提供 12
Bluemix IoT Service Internet of Things サービスの作成 13
Bluemix IoT Service Bluemix からデバイスにアクセスするための Bluemix サービス IoT Foundation へデバイスの認証情報を登録 Node-RED を含めたアプリケーションがデバイス情報を利用 IBM IoT Foundation サーバー IoTサービス アプリケーション アプリケーション 認証トークンを登録 14
Node-RED とは デバイス, API, オンライン サービスのコーディネーション ツール 異なるイベント ソースの処理を簡素化する Visual Solution ブラウザ画面で処理フローを作成し実行環境にデプロイ Node.js 上でツールやランタイムが動作 Bluemix の Node.js で実行環境を提供 Node-RED Starter Internet of Things Boilerplates で使用可能 作成したアプリにて ROUTES: の URL から UI にアクセス 15
Node-RED フロー作成 処理ノードをパレットから選択しフローに接続 各ノードにて動作を設定後 Deploy ボタンをクリック シートにドラッグ & ドロップし処理順にノードを結合 デプロイボタンをクリック 各ノードの動作を設定 処理ノードをパレットから選択 16
IBM IoT Foundation と IBM IoT Foundation クラウド上で サーバー機能を提供 デバイス / アプリケーションは プロトコルを使用し IoT Foundation に接続 ブラウザ ベースのコーディネーション ツール Node-RED を提供 Node-RED は IoT サービスを利用して IoT Foundation に接続 クライアント IBM IoT Foundation IoT サービス クライアント アプリケーション サーバー アプリケーション アプリケーション アプリケーション 17
アジェンダ Internet of Things(IoT) の背景 IoT の特徴に適した通信プロトコル IBM が提供するクラウド上の IoT 環境 IoT Foundation Bluemix IoT サービス Node-RED Demo123 まとめ 18
デモ 1:Quickstart ダッシュボードデモ構成 手元の環境センサーで取得したデータ ( 温度 湿度など ) を IoT Foundation の サーバーへ送り そのデータを GUI で確認 クライアント IBM IoT Foundation 環境情報 ( 気温や湿度など ) を収集 センサー パブリッシュ サーバー ブラウザー HTTP Quickstart UI 19 デモで使用するデバイス TEXAS INSTRUMENTS SensorTag
20 デモ 2:Bluemix IoT アプリケーション Bluemix 上のデモ アプリケーションからIoT Foundation のサーバーへ接続し センサーから送られたデータを Webページで利用 環境情報 ( 気温や湿度など ) を収集 太陽光発電のパワコン情報を収集 ( デモではダミー データを送信しています ) センサー センサー ( ダミー ) ブラウザー センサーから得られたデータは DB に蓄積し ブラウザー画面へ一定間隔で反映 (WebSocket を使用しています ) パブリッシュ HTTP WebSocket IBM IoT Foundation サーバー IBM Bluemix Node.js アプリ MongoDB サブスクライブ 家庭用太陽光発電システムのダッシュボードを模したデモ アプリケーション
デモ 3:Node-RED アプリケーションデモ構成 Bluemix 上の Node-RED アプリケーションから IoT Foundation の サーバーへ接続し センサーから送られたデータをフローで利用 環境情報 ( 気温や湿度など ) を収集 センサー ブラウザー パブリッシュ HTTP WebSocket IBM IoT Foundation サーバー IBM Bluemix Node-RED フロー サブスクライブ HTTP 外部サービス Twitter 21 気温 湿度から不快指数を計算し その結果に基づいてツイートするデモ フロー Cloudant
アジェンダ Internet of Things(IoT) の背景 IoT の特徴に適した通信プロトコル IBM が提供するクラウド上の IoT 環境 IoT Foundation Bluemix IoT サービス Node-RED Demo123 まとめ 22
まとめ IoT Foundation による IoT のためのクラウド環境 IBM IoT Foundation クラウド上で サーバー機能を提供 (IoT サービスと Node-RED) アプリケーションと IoT Foundation のコネクターを提供 ブラウザ ベースのコーディネーション ツール Node-RED の実行環境を提供 クラウド上に準備済みの 基盤を利用することで サーバーなどを用意することなく アプリケーションの開発に注力することが可能 23
Copyright IBM Corporation 2014. All rights reserved. The information contained in these materials is provided for informational purposes only, and is provided AS IS without warranty of any kind, express or implied. IBM shall not be responsible for any damages arising out of the use of, or otherwise related to, these materials. Nothing contained in these materials is intended to, nor shall have the effect of, creating any warranties or representations from IBM or its suppliers or licensors, or altering the terms and conditions of the applicable license agreement governing the use of IBM software. References in these materials to IBM products, programs, or services do not imply that they will be available in all countries in which IBM operates. Product release dates and/or capabilities referenced in these materials may change at any time at IBM s sole discretion based on market opportunities or other factors, and are not intended to be a commitment to future product or feature availability in any way. IBM, the IBM logo, Rational, the Rational logo, and other IBM products and services are trademarks of the International Business Machines Corporation, in the United States, other countries or both. Other company, product, or service names may be trademarks or service marks of others. 24
Copyright IBM Corporation 2014. All rights reserved. The information contained in these materials is provided for informational purposes only, and is provided AS IS without warranty of any kind, express or implied. IBM shall not be responsible for any damages arising out of the use of, or otherwise related to, these materials. Nothing contained in these materials is intended to, nor shall have the effect of, creating any warranties or representations from IBM or its suppliers or licensors, or altering the terms and conditions of the applicable license agreement governing the use of IBM software. References in these materials to IBM products, programs, or services do not imply that they will be available in all countries in which IBM operates. Product release dates and/or capabilities referenced in these materials may change at any time at IBM s sole discretion based on market opportunities or other factors, and are not intended to be a commitment to future product or feature availability in any way. IBM, the IBM logo, Rational, the Rational logo, and other IBM products and services are trademarks of the International Business Machines Corporation, in the United States, other countries or both. Other company, product, or service names may be trademarks or service marks of others. 25
デバイス /Bluemix アプリケーションからの接続 クライアントから IoT Foundation に接続 クライアント ライブラリを利用して接続 代表的な クライアント IBM Mobile Messaging and M2M Client Pack MA9B IBM 提供の クライアント ライブラリ https://www.ibm.com/developerworks/connect/ibmmessaging Java C JavaScript(for browser) をサポート Eclipse Paho Clients オープンソースの クライアント http://www.eclipse.org/paho/ C, C++, Java, JavaScript(for browser), Python and Go をサポート.js Node.js 用 クライアント (JavaScript) https://github.com/adamvr/.js 26
IoT Foundation への接続要件 IoT Foundation への接続要件 バージョン : V3.1 (V3.1.1 推奨 ) 接続先ホスト名 IoT Foundation <orgid>.messaging.internetofthings.ibmcloud.com orgid: Bluemix アカウントにて使用する Organization ID IoT Foundation Quickstart messaging.quickstart.internetofthings.ibmcloud.com クライアント ID や接続先トピックも接続種別ごとに規定されている 詳細は Internet of Things Recipes を参照 https://developer.ibm.com/iot/ その他の制約 QoS=0 のみをサポート メッセージサイズは 4096 バイトまで (Quickstart) トピックのサブスクライブが不可 (Quickstart) 27
IoT Foundation が提供する接続 ( 認証 ) 種別 IoT Foundation は以下の接続 ( 認証 ) 種別を提供 以下を登録時に auth-token( 認証コード ) を発行 Devices IoT Foundation に接続するデバイスを登録する Device Type, Organization, Device ID(Mac アドレス ) を登録 API Keys IoT Foundation に接続する (Bluemix を含む ) アプリケーションを登録 28
( 参考 ) Node-RED フロー 幅広いタイプの処理ノードを提供 Input/Output: HTTP, TCP, UDP,, WebSocket twilio, etc.. functions:javascript 関数, delay 制御, パーサー (HTML, CSV, JSON, XML), etc.. social: Twitter, IRC storage: Cloudant, mongodb, redis インプット アウトプット関数 ソーシャル ストレージ 分析 analysis: 感情分析 デフォルトのノードを追加することも可能 29
( 参考 ) IoT Foundation への Quickstart 接続 検証デバイスやアプリケーションからの接続を確認可能 デバイスは MAC アドレスにて識別される http://quickstart.internetofthings.ibmcloud.com/#/ デバイスは MAC アドレスで識別される デバイスから送信されたデータがグラフ化される 30
( 参考 ) IoT Foundation への接続チュートリアル 検証デバイスの接続チュートリアルを提供 検証デバイス向けにサンプル プログラムも提供される Texas Instruments や Rasberry pi など https://developer.ibm.com/iot/ 31
Bluemix 情報の入手 Bluemix オンラインセミナー動画 資料 Bluemix の日本語チュートリアル https://www.ibm.com/developerworks/community/groups/community/bluemixjp/ のフリートライアルに参加手順 http://www.ibm.com/developerworks/jp/bluemix/registration.html Bluemix YouTube 日本語動画リスト (Webinar 録画等 ) https://www.youtube.com/playlist?list=plcjgi3_0gf1b-dojupfdozo_w7debcld2 ハンズオン セミナー申し込み ( 無料 ) @ 渋谷 IBM Innovation Center https://www- 304.ibm.com/partnerworld/wps/servlet/ContentHandler/pw_frm_bpedusw_30 日本語 HP http://www-01.ibm.com/software/jp/info/bluemix/index.html 32 Bluemix Developers Community( 英語 ) https://developer.ibm.com/bluemix/
Bluemix のライセンス モデル フリートライアル 30 日間の無償トライアル クレジット カード不要 全てのサービス およびサポートに制限なくアクセスが可能 (2014 月 12 月現在 ) Pay as you go (Web 決済 ) 必要に応じて 必要なプラットフォームやサービスを注文 & 利用 実利用量に応じた登録クレジット カードでの月次決済 柔軟な契約 いつでもキャンセル可能 無償枠を提供 競争力ある料金体系 * レート :$1 = 105 固定 2014 年 12 月現在 33 サブスクリプション PA 契約 PA Express 契約に加えて IBM クラウド サービス契約 ( CSA ) を利用した 全てのサービスを含むプラットフォームが利用可能なエンタイトルメントの購入 PAYG モデルと比較して割引きあり 柔軟な利用期間と請求方式を提供 無償枠を提供 競争力のある料金体系 月次の最低利用料金を設けてある 利用期間は事前に選択 月次の想定利用料金 と 利用期間 の組合せによる合計金額に応じた割引率を適用