44[ ![ FIWARE IoT Agents] ( https://fiware.github.io/catalogue/badges/chapters/iot-agents.svg )] ( https://github.com/FIWARE/catalogue/blob/master/iot-agents/README.md )
55[ ![ License: MIT] ( https://img.shields.io/github/license/fiware/tutorials.Iot-Agent.svg )] ( https://opensource.org/licenses/MIT )
66[ ![ Support badge] ( https://img.shields.io/badge/tag-fiware-orange.svg?logo=stackoverflow )] ( https://stackoverflow.com/questions/tagged/fiware )
7- [ ![ UltraLight 2.0 ] ( https://img.shields.io/badge/Payload-Ultralight -27ae60.svg )] ( https://fiware-iotagent-ul .readthedocs.io/en/latest/usermanual/index.html#user-programmers-manual )
7+ [ ![ JSON ] ( https://img.shields.io/badge/Payload-JSON -27ae60.svg )] ( https://fiware-iotagent-json .readthedocs.io/en/latest/usermanual/index.html#user-programmers-manual )
88<br /> [ ![ Documentation] ( https://img.shields.io/readthedocs/fiware-tutorials.svg )] ( https://fiware-tutorials.rtfd.io )
99
1010<!-- prettier-ignore -->
1111
1212このチュートリアルでは、** IoT Agent** の概念を紹介し
1313、[ 以前のチュートリアル] ( https://github.com/FIWARE/tutorials.Context-Providers/ ) で
1414作成したダミーの
15- [ UltraLight 2.0 ] ( https://fiware-iotagent-ul .readthedocs.io/en/latest/usermanual/index.html#user-programmers-manual )
15+ [ JSON ] ( https://fiware-iotagent-json .readthedocs.io/en/latest/usermanual/index.html#user-programmers-manual )
1616IoT デバイスを接続し
1717、[ Orion Context Broker] ( https://fiware-orion.readthedocs.io/en/latest/ ) に送信
1818された [ NGSI-v2] ( https://fiware.github.io/specifications/OpenAPI/ngsiv2 ) リクエスト
@@ -36,7 +36,7 @@ IoT デバイスを接続し
3636 - [ 共通の機能] ( #common-functionality )
3737- [ アーキテクチャ] ( #architecture )
3838 - [ ダミー IoT デバイスの設定] ( #dummy-iot-devices-configuration )
39- - [ IoT Agent for UltraLight 2.0 の設定] ( #iot-agent-for-ultralight-20-configuration )
39+ - [ IoT Agent for JSON の設定] ( #iot-agent-for-ultralight-20-configuration )
4040- [ 前提条件] ( #prerequisites )
4141 - [ Docker と Docker Compose] ( #docker-and-docker-compose )
4242 - [ WSL] ( #wsl )
@@ -105,8 +105,8 @@ IoT Agent はすでに存在しているか、多くの IoT コミュニケー
105105- [ IoTAgent-LWM2M] ( https://fiware-iotagent-lwm2m.readthedocs.io/en/latest ) -
106106 [ Lightweight M2M] ( https://www.omaspecworks.org/what-is-oma-specworks/iot/lightweight-m2m-lwm2m/ )
107107 プロトコル と NGSI のブリッジ
108- - [ IoTAgent-UL] ( https://fiware-iotagent-ul .readthedocs.io/en/latest ) -
109- UltraLight2 .0 ペイロード を持つ HTTP/MQTT メッセージング と NGSI のブリッジ
108+ - [ IoTAgent-UL] ( https://fiware-iotagent-json .readthedocs.io/en/latest ) -
109+ JSON2 .0 ペイロード を持つ HTTP/MQTT メッセージング と NGSI のブリッジ
110110- [ IoTagent-LoRaWAN] ( https://fiware-lorawan.readthedocs.io/en/latest ) -
111111 [ LoRaWAN] ( https://www.thethingsnetwork.org/docs/lorawan/ ) プロトコルと NGSI
112112 のブリッジ
@@ -132,9 +132,9 @@ Context Broker から生成され、IoT Agent を介して、IoT デバイスに
132132 テキスト・プロビジョニングは ** IoT Agnet** に委任されていることに注意します
1331333 . ** Context Broker** は、** IoT Agnet** のノース・ポートに NGSI リクエストを送
134134 信して、コマンドを呼び出します
135- 4 . ** IoT Agnet** は、このサウス・バウンドのリクエストを受信し、UltraLight 2.0
135+ 4 . ** IoT Agnet** は、このサウス・バウンドのリクエストを受信し、JSON
136136 の構文に変換し、それを** スマート・ランプ** に渡します
137- 5 . ** スマート・ランプ** はランプを点灯し、UltraLight 2.0 の構文で ** IoT Agnet**
137+ 5 . ** スマート・ランプ** はランプを点灯し、JSON の構文で ** IoT Agnet**
138138 にコマンドの結果を返します
1391396 . ** IoT Agnet** はこのノース・バウンドのリクエストを受け取り、それを解釈し
140140 、** Context Broker** に NGSI リクエストを行うことによって、インタラクション
@@ -201,7 +201,7 @@ IoT デバイスから生成され、IoT Agent を介して、Context Broker に
201201このチュートリアルの目的のために、一連のダミーの IoT デバイスを作成し、Context
202202Broker に接続します。使用するアーキテクチャとプロトコルの詳細については
203203、[ IoT Sensors tutorial] ( https://github.com/FIWARE/tutorials.IoT-Sensors/tree/NGSI-v2 ) を参照
204- してください。各デバイスの状態は、次の UltraLight2 .0 デバイスのモニタ Web ページ
204+ してください。各デバイスの状態は、次の JSON2 .0 デバイスのモニタ Web ページ
205205で確認できます : ` http://localhost:3000/device/monitor `
206206
207207![ FIWARE Monitor] ( https://fiware.github.io/tutorials.IoT-Agent/img/device-monitor.png )
@@ -212,7 +212,7 @@ Broker に接続します。使用するアーキテクチャとプロトコル
212212
213213このアプリケーションは
214214、[ Orion Context Broker] ( https://fiware-orion.readthedocs.io/en/latest/ ) と
215- [ IoT Agent for UltraLight 2.0 ] ( https://fiware-iotagent-ul .readthedocs.io/en/latest/ )
215+ [ IoT Agent for JSON ] ( https://fiware-iotagent-json .readthedocs.io/en/latest/ )
216216の 2 つの FIWARE コンポーネントを使用します。アプリケーションが _ “Powered by
217217FIWARE”_ と認定されるには、Orion Context Broker を使用するだけで十分です。Orion
218218Context Broker と IoT Agent はオープンソースの MongoDB 技術を利用して、保持して
@@ -227,9 +227,9 @@ Context Broker と IoT Agent はオープンソースの MongoDB 技術を利用
227227 [ Orion Context Broker] ( https://fiware-orion.readthedocs.io/en/latest/ )
228228- [ NGSI-v2] ( https://fiware.github.io/specifications/OpenAPI/ngsiv2 ) を使用してサ
229229 ウス・バウンドのリクエストを受信し、デバイスの
230- [ UltraLight 2.0 ] ( https://fiware-iotagent-ul .readthedocs.io/en/latest/usermanual/index.html#user-programmers-manual )
230+ [ JSON ] ( https://fiware-iotagent-json .readthedocs.io/en/latest/usermanual/index.html#user-programmers-manual )
231231 コマンドに変換する、FIWARE
232- [ IoT Agent for UltraLight 2.0 ] ( https://fiware-iotagent-ul .readthedocs.io/en/latest/ )
232+ [ IoT Agent for JSON ] ( https://fiware-iotagent-json .readthedocs.io/en/latest/ )
233233- 基礎となる [ MongoDB] ( https://www.mongodb.com/ ) データベース :
234234 - ** Orion Context Broker** が、データ・エンティティ、サブスクリプション、
235235 レジストレーションなどのコンテキスト・データの情報を保持するために使用し
@@ -248,7 +248,7 @@ Context Broker と IoT Agent はオープンソースの MongoDB 技術を利用
248248 - 各店舗で購入できる商品を表示します
249249 - ユーザが製品を購入して在庫数を減らすことを許可します
250250- HTTP 上で動作する
251- [ UltraLight 2.0 ] ( https://fiware-iotagent-ul .readthedocs.io/en/latest/usermanual/index.html#user-programmers-manual )
251+ [ JSON ] ( https://fiware-iotagent-json .readthedocs.io/en/latest/usermanual/index.html#user-programmers-manual )
252252 プロトコルを使用して、ダミーの IoT デバイスのセットとして機能する Web サーバ
253253
254254要素間のすべての対話は HTTP リクエストによって開始されるため、エンティティはコン
@@ -291,7 +291,7 @@ tutorial:
291291- ポート`3000` が公開されているので、ダミー IoT デバイスを表示する Web ページ
292292 が表示されます
293293- ポート`3001` は純粋にチュートリアルのアクセスのために公開されているため
294- 、cUrl または Postman は同じネットワーク以外からも、UltraLight コマンドを作
294+ 、cUrl または Postman は同じネットワーク以外からも、JSON コマンドを作
295295 成できます
296296
297297`tutorial` コンテナは、次のように環境変数によって設定値を指定できます :
@@ -303,24 +303,24 @@ tutorial:
303303| IOTA_HTTP_HOST | `iot-agent` | Ultra Light 2.0 用 IoT Agent のホスト名 - 下記を参照 |
304304| IOTA_HTTP_PORT | `7896` | Ultra Light 2.0 の IoT Agent がリッスンするポート。`7896` は、Ultra Light over HTTP の一般的なデフォルトです |
305305| DUMMY_DEVICES_PORT | `3001` | コマンドを受信するためにダミー IoT デバイスが使用するポート |
306- | DUMMY_DEVICES_API_KEY | `4jggokgpepnvsb2uv4s40d59ov` | UltraLight インタラクションに使用されるランダムなセキュリティキー - デバイスと IoT Agent 間のインタラクションの完全性を保証するために使用します |
306+ | DUMMY_DEVICES_API_KEY | `4jggokgpepnvsb2uv4s40d59ov` | JSON インタラクションに使用されるランダムなセキュリティキー - デバイスと IoT Agent 間のインタラクションの完全性を保証するために使用します |
307307| DUMMY_DEVICES_TRANSPORT | `HTTP` | ダミー IoT デバイスによって使用されるトランスポート・プロトコル |
308308
309309このチュートリアルでは、YAML ファイルで説明されている他の `tutorial` コンテナの
310310設定値は使用しません。
311311
312312<a name="iot-agent-for-ultralight-20-configuration"></a>
313313
314- # # IoT Agent for UltraLight 2.0 の設定
314+ # # IoT Agent for JSON の設定
315315
316- [IoT Agent for UltraLight 2.0 ](https://fiware-iotagent-ul .readthedocs.io/en/latest/)
316+ [IoT Agent for JSON ](https://fiware-iotagent-json .readthedocs.io/en/latest/)
317317は 、Docker コンテナ内でインスタンス化できます。公式の Docker イメージは
318- 、[Docker Hub](https://hub.docker.com/r/fiware/iotagent-ul /) で
319- 、`fiware/iotagent-ul ` とタグ付けされています。必要な構成を以下に示します :
318+ 、[Docker Hub](https://hub.docker.com/r/fiware/iotagent-json /) で
319+ 、`fiware/iotagent-json ` とタグ付けされています。必要な構成を以下に示します :
320320
321321` ` ` yaml
322322iot-agent:
323- image: quay.io/fiware/iotagent-ul :latest
323+ image: quay.io/fiware/iotagent-json :latest
324324 hostname: iot-agent
325325 container_name: fiware-iot-agent
326326 depends_on:
@@ -353,10 +353,10 @@ iot-agent:
353353用して、デバイスの URL やキーなどのデバイス情報を保持します。コンテナが 2 つのポ
354354ートをリッスンしています :
355355
356- - ポート `7896` は、ダミー IoT デバイスから HTTP 経由で Ultralight の測定値を
356+ - ポート `7896` は、ダミー IoT デバイスから HTTP 経由で JSON の測定値を
357357 受けるために公開されています
358358- ポート `4041` は、チュートリアルのアクセスのためだけに公開されているため
359- 、cUrl または Postman は同じネットワーク以外からも、UltraLight コマンドを作
359+ 、cUrl または Postman は同じネットワーク以外からも、JSON コマンドを作
360360 成できます
361361
362362`iot-agent` コンテナは、次のように環境変数によって設定値を指定できます :
@@ -370,7 +370,7 @@ iot-agent:
370370| IOTA_LOG_LEVEL | `DEBUG` | IoT Agent のログレベル |
371371| IOTA_TIMESTAMP | `true` | 接続されたデバイスから受信した各測定値にタイムスタンプ情報を提供するかどうかを指定 |
372372| IOTA_CB_NGSI_VERSION | `v2` | アクティブな属性の更新を送信するときにNGSI v2 を使用するように指定するかどうか |
373- | IOTA_AUTOCAST | `true` | Ultralight の数値が文字列ではなく数値として読み取られるようにする |
373+ | IOTA_AUTOCAST | `true` | JSON の数値が文字列ではなく数値として読み取られるようにする |
374374| IOTA_MONGO_HOST | `context-db` | mongoDB のホスト名 - デバイス情報を保持するために使用 |
375375| IOTA_MONGO_PORT | `27017` | mongoDB はリッスンしているポート |
376376| IOTA_MONGO_DB | `iotagentul` | mongoDB で使用されるデータベースの名前 |
@@ -462,7 +462,7 @@ Bash スクリプトを実行することによって、コマンドラインか
462462
463463チュートリアルを正しく実行するには、ブラウザのデバイス・モニタ・ページが表示され
464464ていることを確認し、ページをクリックして cUrl コマンドを入力する前にオーディオを
465- 有効にしてください。デバイス・モニタには、Ultralight 2.0 構文を使用してダミー・
465+ 有効にしてください。デバイス・モニタには、JSON 構文を使用してダミー・
466466デバイスのアレイの現在の状態が表示されます。
467467
468468# ### デバイス・モニタ
@@ -602,7 +602,7 @@ curl -iX POST \
602602
603603この例では、`/iot/d` エンドポイントが使用され、デバイスがトークン
604604` 4jggokgpepnvsb2uv4s40d59ov` を含めることによって自身を認証することが IoT Agent
605- に通知されます。UltraLight IoT Agent の場合、これはデバイスが GET リクエストまた
605+ に通知されます。JSON IoT Agent の場合、これはデバイスが GET リクエストまた
606606は POST リクエストを次の宛先に送信していることを意味します :
607607
608608` ` `
@@ -781,7 +781,7 @@ curl -X GET \
781781# ## コマンドを介したアクチュエータのプロビジョニング
782782
783783アクチュエータのプロビジョニングは、センサのプロビジョニングと同様です。今回
784- 、`endpoint` 属性には、IoT Agent が UltraLight コマンドを送信する必要がある場所
784+ 、`endpoint` 属性には、IoT Agent が JSON コマンドを送信する必要がある場所
785785が格納され、`commands` 配列には呼び出すことができる各コマンドのリストが含まれて
786786います。以下の例では、`deviceId=bell001` のベルがプロビジョニングされています。
787787エンドポイントは `http://iot-sensors:3001/iot/bell001` であり、`ring` コマンドを
@@ -802,7 +802,7 @@ curl -iX POST \
802802 "entity_name": "urn:ngsi-ld:Bell:001",
803803 "entity_type": "Bell",
804804 "apikey": "4jggokgpepnvsb2uv4s40d59ov",
805- "protocol": "PDI-IoTA-UltraLight ",
805+ "protocol": "PDI-IoTA-JSON ",
806806 "transport": "HTTP",
807807 "endpoint": "http://iot-sensors:3001/iot/bell001",
808808 "commands": [
@@ -822,7 +822,7 @@ curl -iX POST \
822822# ## 双方向属性 (bidirectional attribute) を介したアクチュエータのプロビジョニング
823823
824824アクチュエータは、双方向属性を使用してプロビジョニングすることもできます。 ここでも、`endpoint` 属性は、IoT Agent が
825- UltraLight コマンドを送信する必要がある場所を保持します。`ring` 属性は `expression` を使用して定義され、`reverse`
825+ JSON コマンドを送信する必要がある場所を保持します。`ring` 属性は `expression` を使用して定義され、`reverse`
826826方向にそれ自体にマップされます。 `ring` 属性の更新を受信すると、それはデバイス自体にも送信されます。内部的な違いは、
827827この方法がレジストレーションではなくサブスクリプションに依存していることです。
828828
@@ -841,7 +841,7 @@ curl -L -X POST 'http://localhost:4041/iot/devices' \
841841 "entity_name": "urn:ngsi-ld:Bell:002",
842842 "entity_type": "Bell",
843843 "apikey": "4jggokgpepnvsb2uv4s40d59ov",
844- "protocol": "PDI-IoTA-UltraLight ",
844+ "protocol": "PDI-IoTA-JSON ",
845845 "transport": "HTTP",
846846 "endpoint": "http://iot-sensors:3001/iot/bell002",
847847 "attributes": [
@@ -953,7 +953,7 @@ curl -iX POST \
953953 "entity_name": "urn:ngsi-ld:Door:001",
954954 "entity_type": "Door",
955955 "apikey": "4jggokgpepnvsb2uv4s40d59ov",
956- "protocol": "PDI-IoTA-UltraLight ",
956+ "protocol": "PDI-IoTA-JSON ",
957957 "transport": "HTTP",
958958 "endpoint": "http://iot-sensors:3001/iot/door001",
959959 "commands": [
@@ -996,7 +996,7 @@ curl -iX POST \
996996 "entity_name": "urn:ngsi-ld:Lamp:001",
997997 "entity_type": "Lamp",
998998 "apikey": "4jggokgpepnvsb2uv4s40d59ov",
999- "protocol": "PDI-IoTA-UltraLight ",
999+ "protocol": "PDI-IoTA-JSON ",
10001000 "transport": "HTTP",
10011001 "endpoint": "http://iot-sensors:3001/iot/lamp001",
10021002 "commands": [
@@ -1318,7 +1318,7 @@ curl -iX POST \
13181318 "entity_name": "urn:ngsi-ld:Bell:002",
13191319 "entity_type": "Bell",
13201320 "apikey": "4jggokgpepnvsb2uv4s40d59ov",
1321- "protocol": "PDI-IoTA-UltraLight ",
1321+ "protocol": "PDI-IoTA-JSON ",
13221322 "transport": "HTTP",
13231323 "endpoint": "http://iot-sensors:3001/iot/bell002",
13241324 "commands": [
@@ -1384,7 +1384,7 @@ curl -X GET \
13841384 "value": "urn:ngsi-ld:Store:002"
13851385 }
13861386 ],
1387- "protocol": "PDI-IoTA-UltraLight "
1387+ "protocol": "PDI-IoTA-JSON "
13881388}
13891389` ` `
13901390
@@ -1438,7 +1438,7 @@ curl -X GET \
14381438 "value": "urn:ngsi-ld:Store:002"
14391439 }
14401440 ],
1441- "protocol": "PDI-IoTA-UltraLight "
1441+ "protocol": "PDI-IoTA-JSON "
14421442 },
14431443 etc...
14441444 ]
0 commit comments