Skip to content

Commit 24d647b

Browse files
committed
Switch to JSON IoT Agent
1 parent 52e10e4 commit 24d647b

11 files changed

Lines changed: 32 additions & 47 deletions

‎.gitpod.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ ports:
3232
port: 4041
3333
onOpen: ignore
3434
- name: IoT Agent (South Port)
35-
description: Ultralight HTTP measures
35+
description: JSON HTTP measures
3636
port: 7896
3737
onOpen: ignore
3838
- name: MongoDB

‎FIWARE Persisting Context Data (Apache Flume).postman_collection.json‎

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

‎docker-compose/ckan.yml‎

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,15 +40,14 @@ services:
4040
- IOTA_LOG_LEVEL=DEBUG # The log level of the IoT Agent
4141
- IOTA_TIMESTAMP=true # Supply timestamp information with each measurement
4242
- IOTA_CB_NGSI_VERSION=v2 # use NGSIv2 when sending updates for active attributes
43-
- IOTA_AUTOCAST=true # Ensure Ultralight number values are read as numbers not strings
43+
- IOTA_AUTOCAST=true # Ensure JSON number values are read as numbers not strings
4444
- IOTA_MONGO_URI=mongodb://mongo-db:${MONGO_DB_PORT}/iotagentjson # The host name of MongoDB
4545
- IOTA_HTTP_PORT=${IOTA_SOUTH_PORT} # The port used for device traffic over HTTP
4646
- IOTA_PROVIDER_URL=http://iot-agent:${IOTA_NORTH_PORT}
47+
- IOTA_DEFAULT_RESOURCE=/iot/json
4748
- IOTA_MULTI_CORE=true
4849
- IOTA_AMQP_DISABLED=true
4950
- IOTA_MQTT_DISABLED=true
50-
healthcheck:
51-
interval: 5s
5251

5352

5453
# Tutorial acts as a series of dummy IoT Sensors over HTTP
@@ -75,7 +74,6 @@ services:
7574
- "WEB_APP_PORT=${TUTORIAL_APP_PORT}" # Port used by the content provider proxy and web-app for viewing data
7675
- "IOTA_HTTP_HOST=iot-agent"
7776
- "IOTA_HTTP_PORT=${IOTA_SOUTH_PORT}"
78-
- "IOTA_DEFAULT_RESOURCE=/iot/json"
7977
- "DUMMY_DEVICES_PORT=${TUTORIAL_DUMMY_DEVICE_PORT}" # Port used by the dummy IOT devices to receive commands
8078
- "DUMMY_DEVICES_TRANSPORT=HTTP" # Default transport used by dummy IoT devices
8179
- "DUMMY_DEVICES_PAYLOAD=JSON"

‎docker-compose/elasticsearch.yml‎

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -84,15 +84,14 @@ services:
8484
- IOTA_LOG_LEVEL=DEBUG # The log level of the IoT Agent
8585
- IOTA_TIMESTAMP=true # Supply timestamp information with each measurement
8686
- IOTA_CB_NGSI_VERSION=v2 # use NGSIv2 when sending updates for active attributes
87-
- IOTA_AUTOCAST=true # Ensure Ultralight number values are read as numbers not strings
87+
- IOTA_AUTOCAST=true # Ensure JSON number values are read as numbers not strings
8888
- IOTA_MONGO_URI=mongodb://mongo-db:${MONGO_DB_PORT}/iotagentjson # The host name of MongoDB
8989
- IOTA_HTTP_PORT=${IOTA_SOUTH_PORT} # The port used for device traffic over HTTP
9090
- IOTA_PROVIDER_URL=http://iot-agent:${IOTA_NORTH_PORT}
91+
- IOTA_DEFAULT_RESOURCE=/iot/json
9192
- IOTA_MULTI_CORE=true
9293
- IOTA_AMQP_DISABLED=true
9394
- IOTA_MQTT_DISABLED=true
94-
healthcheck:
95-
interval: 5s
9695

9796

9897
# Tutorial acts as a series of dummy IoT Sensors over HTTP
@@ -119,7 +118,6 @@ services:
119118
- "WEB_APP_PORT=${TUTORIAL_APP_PORT}" # Port used by the content provider proxy and web-app for viewing data
120119
- "IOTA_HTTP_HOST=iot-agent"
121120
- "IOTA_HTTP_PORT=${IOTA_SOUTH_PORT}"
122-
- "IOTA_DEFAULT_RESOURCE=/iot/json"
123121
- "DUMMY_DEVICES_PORT=${TUTORIAL_DUMMY_DEVICE_PORT}" # Port used by the dummy IOT devices to receive commands
124122
- "DUMMY_DEVICES_TRANSPORT=HTTP" # Default transport used by dummy IoT devices
125123
- "DUMMY_DEVICES_PAYLOAD=JSON"

‎docker-compose/hdfs.yml‎

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -100,15 +100,14 @@ services:
100100
- IOTA_LOG_LEVEL=DEBUG # The log level of the IoT Agent
101101
- IOTA_TIMESTAMP=true # Supply timestamp information with each measurement
102102
- IOTA_CB_NGSI_VERSION=v2 # use NGSIv2 when sending updates for active attributes
103-
- IOTA_AUTOCAST=true # Ensure Ultralight number values are read as numbers not strings
103+
- IOTA_AUTOCAST=true # Ensure JSON number values are read as numbers not strings
104104
- IOTA_MONGO_URI=mongodb://mongo-db:${MONGO_DB_PORT}/iotagentjson # The host name of MongoDB
105105
- IOTA_HTTP_PORT=${IOTA_SOUTH_PORT} # The port used for device traffic over HTTP
106106
- IOTA_PROVIDER_URL=http://iot-agent:${IOTA_NORTH_PORT}
107+
- IOTA_DEFAULT_RESOURCE=/iot/json
107108
- IOTA_MULTI_CORE=true
108109
- IOTA_AMQP_DISABLED=true
109110
- IOTA_MQTT_DISABLED=true
110-
healthcheck:
111-
interval: 5s
112111

113112

114113
# Tutorial acts as a series of dummy IoT Sensors over HTTP
@@ -135,7 +134,6 @@ services:
135134
- "WEB_APP_PORT=${TUTORIAL_APP_PORT}" # Port used by the content provider proxy and web-app for viewing data
136135
- "IOTA_HTTP_HOST=iot-agent"
137136
- "IOTA_HTTP_PORT=${IOTA_SOUTH_PORT}"
138-
- "IOTA_DEFAULT_RESOURCE=/iot/json"
139137
- "DUMMY_DEVICES_PORT=${TUTORIAL_DUMMY_DEVICE_PORT}" # Port used by the dummy IOT devices to receive commands
140138
- "DUMMY_DEVICES_TRANSPORT=HTTP" # Default transport used by dummy IoT devices
141139
- "DUMMY_DEVICES_PAYLOAD=JSON"

‎docker-compose/mongodb.yml‎

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -84,15 +84,14 @@ services:
8484
- IOTA_LOG_LEVEL=DEBUG # The log level of the IoT Agent
8585
- IOTA_TIMESTAMP=true # Supply timestamp information with each measurement
8686
- IOTA_CB_NGSI_VERSION=v2 # use NGSIv2 when sending updates for active attributes
87-
- IOTA_AUTOCAST=true # Ensure Ultralight number values are read as numbers not strings
87+
- IOTA_AUTOCAST=true # Ensure JSON number values are read as numbers not strings
8888
- IOTA_MONGO_URI=mongodb://mongo-db:${MONGO_DB_PORT}/iotagentjson # The host name of MongoDB
8989
- IOTA_HTTP_PORT=${IOTA_SOUTH_PORT} # The port used for device traffic over HTTP
9090
- IOTA_PROVIDER_URL=http://iot-agent:${IOTA_NORTH_PORT}
91+
- IOTA_DEFAULT_RESOURCE=/iot/json
9192
- IOTA_MULTI_CORE=true
9293
- IOTA_AMQP_DISABLED=true
9394
- IOTA_MQTT_DISABLED=true
94-
healthcheck:
95-
interval: 5s
9695

9796

9897
# Tutorial acts as a series of dummy IoT Sensors over HTTP
@@ -119,7 +118,6 @@ services:
119118
- "WEB_APP_PORT=${TUTORIAL_APP_PORT}" # Port used by the content provider proxy and web-app for viewing data
120119
- "IOTA_HTTP_HOST=iot-agent"
121120
- "IOTA_HTTP_PORT=${IOTA_SOUTH_PORT}"
122-
- "IOTA_DEFAULT_RESOURCE=/iot/json"
123121
- "DUMMY_DEVICES_PORT=${TUTORIAL_DUMMY_DEVICE_PORT}" # Port used by the dummy IOT devices to receive commands
124122
- "DUMMY_DEVICES_TRANSPORT=HTTP" # Default transport used by dummy IoT devices
125123
- "DUMMY_DEVICES_PAYLOAD=JSON"

‎docker-compose/multiple.yml‎

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -102,15 +102,14 @@ services:
102102
- IOTA_LOG_LEVEL=DEBUG # The log level of the IoT Agent
103103
- IOTA_TIMESTAMP=true # Supply timestamp information with each measurement
104104
- IOTA_CB_NGSI_VERSION=v2 # use NGSIv2 when sending updates for active attributes
105-
- IOTA_AUTOCAST=true # Ensure Ultralight number values are read as numbers not strings
105+
- IOTA_AUTOCAST=true # Ensure JSON number values are read as numbers not strings
106106
- IOTA_MONGO_URI=mongodb://mongo-db:${MONGO_DB_PORT}/iotagentjson # The host name of MongoDB
107107
- IOTA_HTTP_PORT=${IOTA_SOUTH_PORT} # The port used for device traffic over HTTP
108108
- IOTA_PROVIDER_URL=http://iot-agent:${IOTA_NORTH_PORT}
109+
- IOTA_DEFAULT_RESOURCE=/iot/json
109110
- IOTA_MULTI_CORE=true
110111
- IOTA_AMQP_DISABLED=true
111112
- IOTA_MQTT_DISABLED=true
112-
healthcheck:
113-
interval: 5s
114113

115114

116115
# Tutorial acts as a series of dummy IoT Sensors over HTTP
@@ -140,7 +139,6 @@ services:
140139
- "WEB_APP_PORT=${TUTORIAL_APP_PORT}" # Port used by the content provider proxy and web-app for viewing data
141140
- "IOTA_HTTP_HOST=iot-agent"
142141
- "IOTA_HTTP_PORT=${IOTA_SOUTH_PORT}"
143-
- "IOTA_DEFAULT_RESOURCE=/iot/json"
144142
- "DUMMY_DEVICES_PORT=${TUTORIAL_DUMMY_DEVICE_PORT}" # Port used by the dummy IOT devices to receive commands
145143
- "DUMMY_DEVICES_TRANSPORT=HTTP" # Default transport used by dummy IoT devices
146144
- "DUMMY_DEVICES_PAYLOAD=JSON"

‎docker-compose/mysql.yml‎

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -87,15 +87,14 @@ services:
8787
- IOTA_LOG_LEVEL=DEBUG # The log level of the IoT Agent
8888
- IOTA_TIMESTAMP=true # Supply timestamp information with each measurement
8989
- IOTA_CB_NGSI_VERSION=v2 # use NGSIv2 when sending updates for active attributes
90-
- IOTA_AUTOCAST=true # Ensure Ultralight number values are read as numbers not strings
90+
- IOTA_AUTOCAST=true # Ensure JSON number values are read as numbers not strings
9191
- IOTA_MONGO_URI=mongodb://mongo-db:${MONGO_DB_PORT}/iotagentjson # The host name of MongoDB
9292
- IOTA_HTTP_PORT=${IOTA_SOUTH_PORT} # The port used for device traffic over HTTP
9393
- IOTA_PROVIDER_URL=http://iot-agent:${IOTA_NORTH_PORT}
94+
- IOTA_DEFAULT_RESOURCE=/iot/json
9495
- IOTA_MULTI_CORE=true
9596
- IOTA_AMQP_DISABLED=true
9697
- IOTA_MQTT_DISABLED=true
97-
healthcheck:
98-
interval: 5s
9998

10099

101100
# Tutorial acts as a series of dummy IoT Sensors over HTTP
@@ -125,7 +124,6 @@ services:
125124
- "WEB_APP_PORT=${TUTORIAL_APP_PORT}" # Port used by the content provider proxy and web-app for viewing data
126125
- "IOTA_HTTP_HOST=iot-agent"
127126
- "IOTA_HTTP_PORT=${IOTA_SOUTH_PORT}"
128-
- "IOTA_DEFAULT_RESOURCE=/iot/json"
129127
- "DUMMY_DEVICES_PORT=${TUTORIAL_DUMMY_DEVICE_PORT}" # Port used by the dummy IOT devices to receive commands
130128
- "DUMMY_DEVICES_TRANSPORT=HTTP" # Default transport used by dummy IoT devices
131129
- "DUMMY_DEVICES_PAYLOAD=JSON"

‎docker-compose/postgres.yml‎

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -88,15 +88,14 @@ services:
8888
- IOTA_LOG_LEVEL=DEBUG # The log level of the IoT Agent
8989
- IOTA_TIMESTAMP=true # Supply timestamp information with each measurement
9090
- IOTA_CB_NGSI_VERSION=v2 # use NGSIv2 when sending updates for active attributes
91-
- IOTA_AUTOCAST=true # Ensure Ultralight number values are read as numbers not strings
91+
- IOTA_AUTOCAST=true # Ensure JSON number values are read as numbers not strings
9292
- IOTA_MONGO_URI=mongodb://mongo-db:${MONGO_DB_PORT}/iotagentjson # The host name of MongoDB
9393
- IOTA_HTTP_PORT=${IOTA_SOUTH_PORT} # The port used for device traffic over HTTP
9494
- IOTA_PROVIDER_URL=http://iot-agent:${IOTA_NORTH_PORT}
95+
- IOTA_DEFAULT_RESOURCE=/iot/json
9596
- IOTA_MULTI_CORE=true
9697
- IOTA_AMQP_DISABLED=true
9798
- IOTA_MQTT_DISABLED=true
98-
healthcheck:
99-
interval: 5s
10099

101100

102101
# Tutorial acts as a series of dummy IoT Sensors over HTTP
@@ -126,7 +125,6 @@ services:
126125
- "WEB_APP_PORT=${TUTORIAL_APP_PORT}" # Port used by the content provider proxy and web-app for viewing data
127126
- "IOTA_HTTP_HOST=iot-agent"
128127
- "IOTA_HTTP_PORT=${IOTA_SOUTH_PORT}"
129-
- "IOTA_DEFAULT_RESOURCE=/iot/json"
130128
- "DUMMY_DEVICES_PORT=${TUTORIAL_DUMMY_DEVICE_PORT}" # Port used by the dummy IoT devices to receive commands
131129
- "DUMMY_DEVICES_TRANSPORT=HTTP" # Default transport used by dummy IoT devices
132130
- "DUMMY_DEVICES_PAYLOAD=JSON"

‎provision-devices‎

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ curl -s -o /dev/null -X POST \
120120
#
121121

122122
curl -s -o /dev/null -X POST \
123-
"http://iot-agent:$IOTA_NORTH_PORT/iot/jsonevices" \
123+
"http://iot-agent:$IOTA_NORTH_PORT/iot/devices" \
124124
-H 'Content-Type: application/json' \
125125
-H 'fiware-service: openiot' \
126126
-H 'fiware-servicepath: /' \
@@ -150,7 +150,7 @@ curl -s -o /dev/null -X POST \
150150
"entity_name": "Door:001",
151151
"entity_type": "Door",
152152
"apikey": "3089326",
153-
"endpoint": "'"http://iot-sensors:$TUTORIAL_DUMMY_DEVICE_PORT/iot/jsonoor001"'",
153+
"endpoint": "'"http://iot-sensors:$TUTORIAL_DUMMY_DEVICE_PORT/iot/door001"'",
154154
"static_attributes": [
155155
{"name": "refStore", "type": "Relationship","value": "urn:ngsi-ld:Store:001"}
156156
]
@@ -176,7 +176,7 @@ curl -s -o /dev/null -X POST \
176176
#
177177

178178
curl -s -o /dev/null -X POST \
179-
"http://iot-agent:$IOTA_NORTH_PORT/iot/jsonevices" \
179+
"http://iot-agent:$IOTA_NORTH_PORT/iot/devices" \
180180
-H 'Content-Type: application/json' \
181181
-H 'fiware-service: openiot' \
182182
-H 'fiware-servicepath: /' \
@@ -206,7 +206,7 @@ curl -s -o /dev/null -X POST \
206206
"entity_name": "Door:002",
207207
"entity_type": "Door",
208208
"apikey": "3089326",
209-
"endpoint": "'"http://iot-sensors:$TUTORIAL_DUMMY_DEVICE_PORT/iot/jsonoor002"'",
209+
"endpoint": "'"http://iot-sensors:$TUTORIAL_DUMMY_DEVICE_PORT/iot/door002"'",
210210
"static_attributes": [
211211
{"name": "refStore", "type": "Relationship","value": "urn:ngsi-ld:Store:002"}
212212
]
@@ -236,7 +236,7 @@ curl -s -o /dev/null -X POST \
236236
#
237237

238238
curl -s -o /dev/null -X POST \
239-
"http://iot-agent:$IOTA_NORTH_PORT/iot/jsonevices" \
239+
"http://iot-agent:$IOTA_NORTH_PORT/iot/devices" \
240240
-H 'Content-Type: application/json' \
241241
-H 'fiware-service: openiot' \
242242
-H 'fiware-servicepath: /' \
@@ -266,7 +266,7 @@ curl -s -o /dev/null -X POST \
266266
"entity_name": "Door:003",
267267
"entity_type": "Door",
268268
"apikey": "3089326",
269-
"endpoint": "'"http://iot-sensors:$TUTORIAL_DUMMY_DEVICE_PORT/iot/jsonoor003"'",
269+
"endpoint": "'"http://iot-sensors:$TUTORIAL_DUMMY_DEVICE_PORT/iot/door003"'",
270270
"static_attributes": [
271271
{"name": "refStore", "type": "Relationship","value": "urn:ngsi-ld:Store:003"}
272272
]
@@ -295,7 +295,7 @@ curl -s -o /dev/null -X POST \
295295
#
296296

297297
curl -s -o /dev/null -X POST \
298-
"http://iot-agent:$IOTA_NORTH_PORT/iot/jsonevices" \
298+
"http://iot-agent:$IOTA_NORTH_PORT/iot/devices" \
299299
-H 'Content-Type: application/json' \
300300
-H 'fiware-service: openiot' \
301301
-H 'fiware-servicepath: /' \
@@ -325,7 +325,7 @@ curl -s -o /dev/null -X POST \
325325
"entity_name": "Door:004",
326326
"entity_type": "Door",
327327
"apikey": "3089326",
328-
"endpoint": "'"http://iot-sensors:$TUTORIAL_DUMMY_DEVICE_PORT/iot/jsonoor004"'",
328+
"endpoint": "'"http://iot-sensors:$TUTORIAL_DUMMY_DEVICE_PORT/iot/door004"'",
329329
"static_attributes": [
330330
{"name": "refStore", "type": "Relationship","value": "urn:ngsi-ld:Store:004"}
331331
]

0 commit comments

Comments
 (0)