diff --git a/NGSI-LD Subscriptions.postman_collection.json b/NGSI-LD Subscriptions.postman_collection.json index 7392a8e..25c3e76 100644 --- a/NGSI-LD Subscriptions.postman_collection.json +++ b/NGSI-LD Subscriptions.postman_collection.json @@ -27,7 +27,7 @@ ], "body": { "mode": "raw", - "raw": "{\n \"description\": \"Notify me of low feedstock on Farm:001\",\n \"type\": \"Subscription\",\n \"entities\": [{\"type\": \"FillingLevelSensor\"}],\n \"watchedAttributes\": [\"filling\"],\n \"q\": \"filling>0.6;filling<0.8;controlledAsset==urn:ngsi-ld:Building:farm001\",\n \"notification\": {\n \"attributes\": [\"filling\", \"controlledAsset\"],\n \"format\": \"keyValues\",\n \"endpoint\": {\n \"uri\": \"http://tutorial:3000/subscription/low-stock-farm001\",\n \"accept\": \"application/json\"\n }\n },\n \"@context\": \"http://context/ngsi-context.jsonld\"\n}" + "raw": "{\n \"description\": \"Notify me of low feedstock on Farm:001\",\n \"type\": \"Subscription\",\n \"entities\": [{\"type\": \"FillingLevelSensor\"}],\n \"watchedAttributes\": [\"filling\"],\n \"q\": \"filling>0.6;filling<0.8;controlledAsset==urn:ngsi-ld:Building:farm001\",\n \"notification\": {\n \"attributes\": [\"filling\", \"controlledAsset\"],\n \"format\": \"keyValues\",\n \"endpoint\": {\n \"uri\": \"http://tutorial:3000/subscription/low-stock-farm001\",\n \"accept\": \"application/json\"\n }\n },\n \"@context\": \"http://context/user-context.jsonld\"\n}" }, "url": { "raw": "http://{{orion}}/ngsi-ld/v1/subscriptions/", @@ -64,7 +64,7 @@ ], "body": { "mode": "raw", - "raw": "{\n \"description\": \"Notify me of low feedstock on Farm:001\",\n \"type\": \"Subscription\",\n \"entities\": [{\"type\": \"FillingLevelSensor\"}],\n \"watchedAttributes\": [\"filling\"],\n \"q\": \"filling>0.4;filling<0.6;controlledAsset==urn:ngsi-ld:Building:farm001\",\n \"notification\": {\n \"attributes\": [\"filling\", \"controlledAsset\"],\n \"format\": \"normalized\",\n \"endpoint\": {\n \"uri\": \"http://tutorial:3000/subscription/low-stock-farm001-ngsild\",\n \"accept\": \"application/json\"\n }\n },\n \"@context\": \"http://context/ngsi-context.jsonld\"\n}" + "raw": "{\n \"description\": \"Notify me of low feedstock on Farm:001\",\n \"type\": \"Subscription\",\n \"entities\": [{\"type\": \"FillingLevelSensor\"}],\n \"watchedAttributes\": [\"filling\"],\n \"q\": \"filling>0.4;filling<0.6;controlledAsset==urn:ngsi-ld:Building:farm001\",\n \"notification\": {\n \"attributes\": [\"filling\", \"controlledAsset\"],\n \"format\": \"normalized\",\n \"endpoint\": {\n \"uri\": \"http://tutorial:3000/subscription/low-stock-farm001-ngsild\",\n \"accept\": \"application/json\"\n }\n },\n \"@context\": \"http://context/user-context.jsonld\"\n}" }, "url": { "raw": "http://{{orion}}/ngsi-ld/v1/subscriptions/", @@ -101,7 +101,7 @@ ], "body": { "mode": "raw", - "raw": "{\n \"description\": \"Notify me of low feedstock on Farm:001\",\n \"type\": \"Subscription\",\n \"entities\": [{\"type\": \"FillingLevelSensor\"}],\n \"watchedAttributes\": [\"filling\"],\n \"q\": \"filling<0.4;controlledAsset==urn:ngsi-ld:Building:farm001\",\n \"notification\": {\n \"attributes\": [\"filling\", \"controlledAsset\"],\n \"format\": \"x-ngsiv2-normalized\",\n \"endpoint\": {\n \"uri\": \"http://tutorial:3000/subscription/low-stock-farm001-ngsiv2\",\n \"accept\": \"application/json\"\n }\n },\n \"@context\": \"http://context/ngsi-context.jsonld\"\n}" + "raw": "{\n \"description\": \"Notify me of low feedstock on Farm:001\",\n \"type\": \"Subscription\",\n \"entities\": [{\"type\": \"FillingLevelSensor\"}],\n \"watchedAttributes\": [\"filling\"],\n \"q\": \"filling<0.4;controlledAsset==urn:ngsi-ld:Building:farm001\",\n \"notification\": {\n \"attributes\": [\"filling\", \"controlledAsset\"],\n \"format\": \"x-ngsiv2-normalized\",\n \"endpoint\": {\n \"uri\": \"http://tutorial:3000/subscription/low-stock-farm001-ngsiv2\",\n \"accept\": \"application/json\"\n }\n },\n \"@context\": \"http://context/user-context.jsonld\"\n}" }, "url": { "raw": "http://{{orion}}/ngsi-ld/v1/subscriptions/", @@ -144,7 +144,7 @@ ], "body": { "mode": "raw", - "raw": "{\n \"description\": \"Notify me of all product price changes\",\n \"type\": \"Subscription\",\n \"entities\": [{\"type\": \"Product\"}],\n \"watchedAttributes\": [\"price\"],\n \"notification\": {\n \"format\": \"keyValues\",\n \"endpoint\": {\n \"uri\": \"http://tutorial:3000/subscription/price-change\",\n \"accept\": \"application/json\"\n }\n },\n \"@context\": \"http://context/ngsi-context.jsonld\"\n}" + "raw": "{\n \"description\": \"Notify me of all product price changes\",\n \"type\": \"Subscription\",\n \"entities\": [{\"type\": \"Product\"}],\n \"watchedAttributes\": [\"price\"],\n \"notification\": {\n \"format\": \"keyValues\",\n \"endpoint\": {\n \"uri\": \"http://tutorial:3000/subscription/price-change\",\n \"accept\": \"application/json\"\n }\n },\n \"@context\": \"http://context/user-context.jsonld\"\n}" }, "url": { "raw": "http://{{orion}}/ngsi-ld/v1/subscriptions/", @@ -339,6 +339,10 @@ { "key": "ngsi-context.jsonld", "value": "http://context/ngsi-context.jsonld" + }, + { + "key": "user-context.jsonld", + "value": "http://context/user-context.jsonld" } ] } \ No newline at end of file diff --git a/README.ja.md b/README.ja.md index feb17b3..1f55a8e 100644 --- a/README.ja.md +++ b/README.ja.md @@ -277,7 +277,7 @@ curl -L -X POST 'http://localhost:1026/ngsi-ld/v1/subscriptions/' \ "accept": "application/json" } }, - "@context": "http://context/ngsi-context.jsonld" + "@context": "http://context/user-context.jsonld" }' ``` @@ -373,7 +373,7 @@ curl -L -X POST 'http://localhost:1026/ngsi-ld/v1/subscriptions/' \ "accept": "application/json" } }, - "@context": "http://context/ngsi-context.jsonld" + "@context": "http://context/user-context.jsonld" }' ``` @@ -436,7 +436,7 @@ curl -L -X POST 'http://localhost:1026/ngsi-ld/v1/subscriptions/' \ "accept": "application/json" } }, - "@context": "http://context/ngsi-context.jsonld" + "@context": "http://context/user-context.jsonld" }' ``` @@ -529,7 +529,7 @@ curl -L -X POST 'http://localhost:1026/ngsi-ld/v1/subscriptions/' \ ] } }, - "@context": "http://context/ngsi-context.jsonld" + "@context": "http://context/user-context.jsonld" }' ``` @@ -595,7 +595,7 @@ curl -L -X POST 'http://localhost:1026/ngsi-ld/v1/subscriptions/' \ "accept": "application/json" } }, - "@context": "http://context/ngsi-context.jsonld" + "@context": "http://context/user-context.jsonld" }' ``` diff --git a/README.md b/README.md index a8149d9..93123a8 100644 --- a/README.md +++ b/README.md @@ -258,7 +258,7 @@ curl -L -X POST 'http://localhost:1026/ngsi-ld/v1/subscriptions/' \ "accept": "application/json" } }, - "@context": "http://context/ngsi-context.jsonld" + "@context": "http://context/user-context.jsonld" }' ``` @@ -352,7 +352,7 @@ curl -L -X POST 'http://localhost:1026/ngsi-ld/v1/subscriptions/' \ "accept": "application/json" } }, - "@context": "http://context/ngsi-context.jsonld" + "@context": "http://context/user-context.jsonld" }' ``` @@ -415,7 +415,7 @@ curl -L -X POST 'http://localhost:1026/ngsi-ld/v1/subscriptions/' \ "accept": "application/json" } }, - "@context": "http://context/ngsi-context.jsonld" + "@context": "http://context/user-context.jsonld" }' ``` @@ -503,7 +503,7 @@ curl -L -X POST 'http://localhost:1026/ngsi-ld/v1/subscriptions/' \ ] } }, - "@context": "http://context/ngsi-context.jsonld" + "@context": "http://context/user-context.jsonld" }' ``` @@ -564,7 +564,7 @@ curl -L -X POST 'http://localhost:1026/ngsi-ld/v1/subscriptions/' \ "accept": "application/json" } }, - "@context": "http://context/ngsi-context.jsonld" + "@context": "http://context/user-context.jsonld" }' ``` diff --git a/data-models/ngsi-context.jsonld b/data-models/ngsi-context.jsonld index 4b61537..952032a 100644 --- a/data-models/ngsi-context.jsonld +++ b/data-models/ngsi-context.jsonld @@ -1,143 +1,6 @@ { - "@context": { - "type": "@type", - "id": "@id", - "ngsi-ld": "https://uri.etsi.org/ngsi-ld/", - "fiware": "https://uri.fiware.org/ns/dataModels#", - "schema": "https://schema.org/", - "tutorial": "https://ngsi-ld-tutorials.readthedocs.io/en/latest/datamodels.html#", - "Building": "https://uri.fiware.org/ns/dataModels#Building", - "Device": "fiware:Device", - "Animal": "fiware:Animal", - "Female": "schema:Female", - "FillingLevelSensor": "tutorial:FillingLevelSensor", - "Herbicide": "tutorial:Product", - "HVAC": "https://w3id.org/saref#HVAC", - "Male": "schema:Male", - "PartField": "tutorial:PartField", - "Person": "fiware:Person", - "SoilSensor": "tutorial:SoilSensor", - "TemperatureSensor": "tutorial:TemperatureSensor", - "Task": "fiware:Activity", - "Tractor": "tutorial:Tractor", - "Water": "tutorial:Water", - "actuator": "https://w3id.org/saref#actuator", - "additionalName": "schema:additionalName", - "address": "schema:address", - "addressCountry": "schema:addressCountry", - "addressLocality": "schema:addressLocality", - "addressRegion": "schema:addressRegion", - "airPollution": "https://w3id.org/saref#airPollution", - "atmosphericPressure": "https://w3id.org/saref#atmosphericPressure", - "barn": "https://wiki.openstreetmap.org/wiki/Tag:building%3Dbarn", - "batteryLevel": "fiware:batteryLevel", - "category": "fiware:category", - "configuration": "fiware:configuration", - "conservatory": "https://wiki.openstreetmap.org/wiki/Tag:building%3Dconservatory", - "containedInPlace": "fiware:containedInPlace", - "controlledAsset": "fiware:controlledAsset", - "controlledProperty": "fiware:controlledProperty", - "cowshed": "https://wiki.openstreetmap.org/wiki/Tag:building%3Dcowshed", - "dataProvider": "fiware:dataProvider", - "dateCreated": "fiware:dateCreated", - "dateFirstUsed": "fiware:dateFirstUsed", - "dateInstalled": "fiware:dateInstalled", - "dateLastCalibration": "fiware:dateLastCalibration", - "dateLastValueReported": "fiware:dateLastValueReported", - "dateManufactured": "fiware:dateManufactured", - "dateModified": "fiware:dateModified", - "depth": "https://w3id.org/saref#depth", - "description": "ngsi-ld:description", - "deviceState": "fiware:deviceState", - "digester": "https://wiki.openstreetmap.org/wiki/Tag:building%3Ddigester", - "eatingActivity": "https://w3id.org/saref#eatingActivity", - "email": "schema:email", - "endgun": "https://w3id.org/saref#endgun", - "familyName": "schema:familyName", - "farm": "https://wiki.openstreetmap.org/wiki/Tag:building%3Dfarm", - "farm_auxiliary": "https://wiki.openstreetmap.org/wiki/Tag:building%3Dfarm_auxiliary", - "faxNumber": "schema:faxNumber", - "filling": "https://w3id.org/saref#fillingLevel", - "firmwareVersion": "fiware:firmwareVersion", - "floorsAboveGround": "fiware:floorsAboveGround", - "floorsBelowGround": "fiware:floorsBelowGround", - "gender": "schema:gender", - "givenName": "schema:givenName", - "greenhouse": "https://wiki.openstreetmap.org/wiki/Tag:building%3Dgreenhouse", - "hangar": "https://wiki.openstreetmap.org/wiki/Tag:building%3Dhangar", - "hardwareVersion": "fiware:hardwareVersion", - "honorificPrefix": "schema:honorificPrefix", - "honorificSuffix": "schema:honorificSuffix", - "humidity": "https://w3id.org/saref#humidity", - "hut": "https://wiki.openstreetmap.org/wiki/Tag:building%3Dhut", - "implement": "https://w3id.org/saref#implement", - "ipAddress": "fiware:ipAddress", - "irrSection": "https://w3id.org/saref#irrSection", - "irrSystem": "https://w3id.org/saref#irrSystem", - "isicV4": "schema:isicV4", - "jobTitle": "schema:jobTitle", - "location": "https://w3id.org/saref#location", - "macAddress": "fiware:macAddress", - "mcc": "fiware:mcc", - "meter": "https://w3id.org/saref#meter", - "milking": "https://w3id.org/saref#milking", - "mnc": "fiware:mnc", - "motion": "https://w3id.org/saref#motion", - "movementActivity": "https://w3id.org/saref#movementActivity", - "multimedia": "https://w3id.org/saref#multimedia", - "name": "schema:name", - "network": "https://w3id.org/saref#network", - "observedAt": "ngsi-ld:observedAt", - "occupancy": "https://w3id.org/saref#occupancy", - "occupier": "fiware:occupier", - "openingHours": "fiware:openingHours", - "osVersion": "fiware:osVersion", - "owner": "fiware:owner", - "postalCode": "schema:postalCode", - "precipitation": "https://w3id.org/saref#precipitation", - "pressure": "https://w3id.org/saref#pressure", - "providedBy": "fiware:providedBy", - "provider": "fiware:provider", - "refDeviceModel": "fiware:refDeviceModel", - "refMap": "fiware:refMap", - "rssi": "fiware:rssi", - "sensor": "https://w3id.org/saref#sensor", - "serialNumber": "fiware:serialNumber", - "service": "https://wiki.openstreetmap.org/wiki/Tag:building%3Dservice", - "shed": "https://wiki.openstreetmap.org/wiki/Tag:building%3Dshed", - "softwareVersion": "fiware:softwareVersion", - "soilMoisture": "https://w3id.org/saref#soilMoisture", - "solarRadiation": "https://w3id.org/saref#solarRadiation", - "source": "fiware:source", - "stable": "https://wiki.openstreetmap.org/wiki/Tag:building%3Dstable", - "streetAddress": "schema:streetAddress", - "sty": "https://wiki.openstreetmap.org/wiki/Tag:building%3Dsty", - "supportedProtocol": "fiware:supportedProtocol", - "taxID": "schema:taxID", - "telephone": "schema:telephone", - "temperature": "https://w3id.org/saref#temperature", - "transformer_tower": "https://wiki.openstreetmap.org/wiki/Tag:building%3Dtransformer_tower", - "unitCode": "ngsi-ld:unitCode", - "value": "fiware:value", - "vatID": "schema:vatID", - "waterConsumption": "https://w3id.org/saref#waterConsumption", - "water_tower": "https://wiki.openstreetmap.org/wiki/Tag:building%3Dwater_tower", - "weatherConditions": "https://w3id.org/saref#weatherConditions", - "weight": "https://w3id.org/saref#weight", - "windDirection": "https://w3id.org/saref#windDirection", - "windSpeed": "https://w3id.org/saref#windSpeed", - "status": "https://saref.etsi.org/core/status", - "state": "https://saref.etsi.org/core/hasState", - "heartRate": "https://purl.bioontology.org/ontology/MESH/D006339", - "product": "fiware:refObject", - "worker": "fiware:refAgent", - "field": "fiware:refTarget", - - "on": "https://w3id.org/saref#on", - "off": "https://w3id.org/saref#off", - "verified": "fiware:verified", - "species": "fiware:species", - "sex": "fiware:sex", - "legalID": "fiware:legalID" - } -} + "@context": [ + "http://context/user-context.jsonld", + "https://uri.etsi.org/ngsi-ld/v1/ngsi-ld-core-context-v1.8.jsonld" + ] +} \ No newline at end of file diff --git a/data-models/user-context.jsonld b/data-models/user-context.jsonld new file mode 100644 index 0000000..4b61537 --- /dev/null +++ b/data-models/user-context.jsonld @@ -0,0 +1,143 @@ +{ + "@context": { + "type": "@type", + "id": "@id", + "ngsi-ld": "https://uri.etsi.org/ngsi-ld/", + "fiware": "https://uri.fiware.org/ns/dataModels#", + "schema": "https://schema.org/", + "tutorial": "https://ngsi-ld-tutorials.readthedocs.io/en/latest/datamodels.html#", + "Building": "https://uri.fiware.org/ns/dataModels#Building", + "Device": "fiware:Device", + "Animal": "fiware:Animal", + "Female": "schema:Female", + "FillingLevelSensor": "tutorial:FillingLevelSensor", + "Herbicide": "tutorial:Product", + "HVAC": "https://w3id.org/saref#HVAC", + "Male": "schema:Male", + "PartField": "tutorial:PartField", + "Person": "fiware:Person", + "SoilSensor": "tutorial:SoilSensor", + "TemperatureSensor": "tutorial:TemperatureSensor", + "Task": "fiware:Activity", + "Tractor": "tutorial:Tractor", + "Water": "tutorial:Water", + "actuator": "https://w3id.org/saref#actuator", + "additionalName": "schema:additionalName", + "address": "schema:address", + "addressCountry": "schema:addressCountry", + "addressLocality": "schema:addressLocality", + "addressRegion": "schema:addressRegion", + "airPollution": "https://w3id.org/saref#airPollution", + "atmosphericPressure": "https://w3id.org/saref#atmosphericPressure", + "barn": "https://wiki.openstreetmap.org/wiki/Tag:building%3Dbarn", + "batteryLevel": "fiware:batteryLevel", + "category": "fiware:category", + "configuration": "fiware:configuration", + "conservatory": "https://wiki.openstreetmap.org/wiki/Tag:building%3Dconservatory", + "containedInPlace": "fiware:containedInPlace", + "controlledAsset": "fiware:controlledAsset", + "controlledProperty": "fiware:controlledProperty", + "cowshed": "https://wiki.openstreetmap.org/wiki/Tag:building%3Dcowshed", + "dataProvider": "fiware:dataProvider", + "dateCreated": "fiware:dateCreated", + "dateFirstUsed": "fiware:dateFirstUsed", + "dateInstalled": "fiware:dateInstalled", + "dateLastCalibration": "fiware:dateLastCalibration", + "dateLastValueReported": "fiware:dateLastValueReported", + "dateManufactured": "fiware:dateManufactured", + "dateModified": "fiware:dateModified", + "depth": "https://w3id.org/saref#depth", + "description": "ngsi-ld:description", + "deviceState": "fiware:deviceState", + "digester": "https://wiki.openstreetmap.org/wiki/Tag:building%3Ddigester", + "eatingActivity": "https://w3id.org/saref#eatingActivity", + "email": "schema:email", + "endgun": "https://w3id.org/saref#endgun", + "familyName": "schema:familyName", + "farm": "https://wiki.openstreetmap.org/wiki/Tag:building%3Dfarm", + "farm_auxiliary": "https://wiki.openstreetmap.org/wiki/Tag:building%3Dfarm_auxiliary", + "faxNumber": "schema:faxNumber", + "filling": "https://w3id.org/saref#fillingLevel", + "firmwareVersion": "fiware:firmwareVersion", + "floorsAboveGround": "fiware:floorsAboveGround", + "floorsBelowGround": "fiware:floorsBelowGround", + "gender": "schema:gender", + "givenName": "schema:givenName", + "greenhouse": "https://wiki.openstreetmap.org/wiki/Tag:building%3Dgreenhouse", + "hangar": "https://wiki.openstreetmap.org/wiki/Tag:building%3Dhangar", + "hardwareVersion": "fiware:hardwareVersion", + "honorificPrefix": "schema:honorificPrefix", + "honorificSuffix": "schema:honorificSuffix", + "humidity": "https://w3id.org/saref#humidity", + "hut": "https://wiki.openstreetmap.org/wiki/Tag:building%3Dhut", + "implement": "https://w3id.org/saref#implement", + "ipAddress": "fiware:ipAddress", + "irrSection": "https://w3id.org/saref#irrSection", + "irrSystem": "https://w3id.org/saref#irrSystem", + "isicV4": "schema:isicV4", + "jobTitle": "schema:jobTitle", + "location": "https://w3id.org/saref#location", + "macAddress": "fiware:macAddress", + "mcc": "fiware:mcc", + "meter": "https://w3id.org/saref#meter", + "milking": "https://w3id.org/saref#milking", + "mnc": "fiware:mnc", + "motion": "https://w3id.org/saref#motion", + "movementActivity": "https://w3id.org/saref#movementActivity", + "multimedia": "https://w3id.org/saref#multimedia", + "name": "schema:name", + "network": "https://w3id.org/saref#network", + "observedAt": "ngsi-ld:observedAt", + "occupancy": "https://w3id.org/saref#occupancy", + "occupier": "fiware:occupier", + "openingHours": "fiware:openingHours", + "osVersion": "fiware:osVersion", + "owner": "fiware:owner", + "postalCode": "schema:postalCode", + "precipitation": "https://w3id.org/saref#precipitation", + "pressure": "https://w3id.org/saref#pressure", + "providedBy": "fiware:providedBy", + "provider": "fiware:provider", + "refDeviceModel": "fiware:refDeviceModel", + "refMap": "fiware:refMap", + "rssi": "fiware:rssi", + "sensor": "https://w3id.org/saref#sensor", + "serialNumber": "fiware:serialNumber", + "service": "https://wiki.openstreetmap.org/wiki/Tag:building%3Dservice", + "shed": "https://wiki.openstreetmap.org/wiki/Tag:building%3Dshed", + "softwareVersion": "fiware:softwareVersion", + "soilMoisture": "https://w3id.org/saref#soilMoisture", + "solarRadiation": "https://w3id.org/saref#solarRadiation", + "source": "fiware:source", + "stable": "https://wiki.openstreetmap.org/wiki/Tag:building%3Dstable", + "streetAddress": "schema:streetAddress", + "sty": "https://wiki.openstreetmap.org/wiki/Tag:building%3Dsty", + "supportedProtocol": "fiware:supportedProtocol", + "taxID": "schema:taxID", + "telephone": "schema:telephone", + "temperature": "https://w3id.org/saref#temperature", + "transformer_tower": "https://wiki.openstreetmap.org/wiki/Tag:building%3Dtransformer_tower", + "unitCode": "ngsi-ld:unitCode", + "value": "fiware:value", + "vatID": "schema:vatID", + "waterConsumption": "https://w3id.org/saref#waterConsumption", + "water_tower": "https://wiki.openstreetmap.org/wiki/Tag:building%3Dwater_tower", + "weatherConditions": "https://w3id.org/saref#weatherConditions", + "weight": "https://w3id.org/saref#weight", + "windDirection": "https://w3id.org/saref#windDirection", + "windSpeed": "https://w3id.org/saref#windSpeed", + "status": "https://saref.etsi.org/core/status", + "state": "https://saref.etsi.org/core/hasState", + "heartRate": "https://purl.bioontology.org/ontology/MESH/D006339", + "product": "fiware:refObject", + "worker": "fiware:refAgent", + "field": "fiware:refTarget", + + "on": "https://w3id.org/saref#on", + "off": "https://w3id.org/saref#off", + "verified": "fiware:verified", + "species": "fiware:species", + "sex": "fiware:sex", + "legalID": "fiware:legalID" + } +} diff --git a/docker-compose/common.yml b/docker-compose/common.yml index 072c91c..95fd4c4 100644 --- a/docker-compose/common.yml +++ b/docker-compose/common.yml @@ -34,7 +34,7 @@ services: target: /usr/local/apache2/conf/mime.types read_only: true healthcheck: - test: (wget --server-response --spider --quiet http://ld-context/ngsi-context.jsonld 2>&1 | awk 'NR==1{print $$2}'| grep -q -e "200") || exit 1 + test: (wget --server-response --spider --quiet http://context/user-context.jsonld 2>&1 | awk 'NR==1{print $$2}'| grep -q -e "200") || exit 1 # Databases mongo-db: @@ -85,7 +85,7 @@ services: - IOTA_HTTP_PORT=${IOTA_SOUTH_PORT} # The port used for device traffic over HTTP - IOTA_PROVIDER_URL=http://iot-agent:${IOTA_NORTH_PORT} - IOTA_CB_NGSI_VERSION=ld # use NGSI-LD when sending updates for active attributes - - IOTA_JSON_LD_CONTEXT=http://context/ngsi-context.jsonld + - IOTA_JSON_LD_CONTEXT=http://context/user-context.jsonld - IOTA_FALLBACK_TENANT=openiot - IOTA_MULTI_CORE=true healthcheck: @@ -120,7 +120,7 @@ services: - TWITTER_CONSUMER_KEY= - TWITTER_CONSUMER_SECRET= - MONGO_URL=mongodb://mongo-db:27017 - - IOTA_JSON_LD_CONTEXT=http://context/ngsi-context.jsonld + - IOTA_JSON_LD_CONTEXT=http://context/user-context.jsonld - NGSI_LD_TENANT=openiot diff --git a/provision-devices b/provision-devices index b052e6d..12b0707 100644 --- a/provision-devices +++ b/provision-devices @@ -195,6 +195,7 @@ curl -s -o /dev/null -X POST \ "device_id": "temperature001", "entity_name": "urn:ngsi-ld:Device:temperature001", "entity_type": "TemperatureSensor", + "apikey": "321701236", "static_attributes": [ {"name": "controlledAsset", "type": "Relationship","value": "urn:ngsi-ld:Building:farm001"} ] @@ -203,6 +204,7 @@ curl -s -o /dev/null -X POST \ "device_id": "water001", "entity_name": "urn:ngsi-ld:Device:water001", "entity_type": "Water", + "apikey": "112903447", "endpoint": "http://tutorial:3001/iot/water001", "static_attributes": [ {"name": "controlledAsset", "type": "Relationship","value": "urn:ngsi-ld:Building:barn001"} @@ -212,6 +214,7 @@ curl -s -o /dev/null -X POST \ "device_id": "filling001", "entity_name": "urn:ngsi-ld:Device:filling001", "entity_type": "FillingLevelSensor", + "apikey": "854782081", "endpoint": "http://tutorial:3001/iot/filling001", "static_attributes": [ {"name": "controlledAsset", "type": "Relationship","value": "urn:ngsi-ld:Building:farm001"} @@ -221,6 +224,7 @@ curl -s -o /dev/null -X POST \ "device_id": "tractor001", "entity_name": "urn:ngsi-ld:Device:tractor001", "entity_type": "Tractor", + "apikey": "1067386313", "endpoint": "http://tutorial:3001/iot/tractor001", "static_attributes": [ {"name": "controlledAsset", "type": "Relationship","value": "urn:ngsi-ld:Building:farm001"} @@ -246,6 +250,7 @@ curl -s -o /dev/null -X POST \ "device_id": "temperature002", "entity_name": "urn:ngsi-ld:Device:temperature002", "entity_type": "TemperatureSensor", + "apikey": "321701236", "static_attributes": [ {"name": "controlledAsset", "type": "Relationship","value": "urn:ngsi-ld:Building:farm002"} ] @@ -254,6 +259,7 @@ curl -s -o /dev/null -X POST \ "device_id": "water002", "entity_name": "urn:ngsi-ld:Device:water002", "entity_type": "Water", + "apikey": "112903447", "endpoint": "http://tutorial:3001/iot/water002", "static_attributes": [ {"name": "controlledAsset", "type": "Relationship","value": "urn:ngsi-ld:Building:barn002"} @@ -263,6 +269,7 @@ curl -s -o /dev/null -X POST \ "device_id": "filling002", "entity_name": "urn:ngsi-ld:Device:filling002", "entity_type": "FillingLevelSensor", + "apikey": "854782081", "endpoint": "http://tutorial:3001/iot/filling002", "static_attributes": [ {"name": "controlledAsset", "type": "Relationship","value": "urn:ngsi-ld:Building:farm002"} @@ -272,6 +279,7 @@ curl -s -o /dev/null -X POST \ "device_id": "tractor002", "entity_name": "urn:ngsi-ld:Device:tractor002", "entity_type": "Tractor", + "apikey": "1067386313", "endpoint": "http://tutorial:3001/iot/tractor002", "static_attributes": [ {"name": "controlledAsset", "type": "Relationship","value": "urn:ngsi-ld:Building:farm002"} @@ -297,6 +305,7 @@ curl -s -o /dev/null -X POST \ "device_id": "temperature003", "entity_name": "urn:ngsi-ld:Device:temperature003", "entity_type": "TemperatureSensor", + "apikey": "321701236", "static_attributes": [ {"name": "controlledAsset", "type": "Relationship","value": "urn:ngsi-ld:Building:farm003"} ] @@ -305,6 +314,7 @@ curl -s -o /dev/null -X POST \ "device_id": "water003", "entity_name": "urn:ngsi-ld:Device:water003", "entity_type": "Water", + "apikey": "112903447", "endpoint": "http://tutorial:3001/iot/water003", "static_attributes": [ {"name": "controlledAsset", "type": "Relationship","value": "urn:ngsi-ld:Building:barn003"} @@ -314,6 +324,7 @@ curl -s -o /dev/null -X POST \ "device_id": "filling003", "entity_name": "urn:ngsi-ld:Device:filling003", "entity_type": "FillingLevelSensor", + "apikey": "854782081", "endpoint": "http://tutorial:3001/iot/filling003", "static_attributes": [ {"name": "controlledAsset", "type": "Relationship","value": "urn:ngsi-ld:Building:farm003"} @@ -323,6 +334,7 @@ curl -s -o /dev/null -X POST \ "device_id": "tractor003", "entity_name": "urn:ngsi-ld:Device:tractor003", "entity_type": "Tractor", + "apikey": "1067386313", "endpoint": "http://tutorial:3001/iot/tractor003", "static_attributes": [ {"name": "controlledAsset", "type": "Relationship","value": "urn:ngsi-ld:Building:farm003"} @@ -349,6 +361,7 @@ curl -s -o /dev/null -X POST \ "device_id": "temperature004", "entity_name": "urn:ngsi-ld:Device:temperature004", "entity_type": "TemperatureSensor", + "apikey": "321701236", "static_attributes": [ {"name": "controlledAsset", "type": "Relationship","value": "urn:ngsi-ld:Building:farm004"} ] @@ -357,6 +370,7 @@ curl -s -o /dev/null -X POST \ "device_id": "water004", "entity_name": "urn:ngsi-ld:Device:water004", "entity_type": "Water", + "apikey": "112903447", "endpoint": "http://tutorial:3001/iot/water004", "static_attributes": [ {"name": "controlledAsset", "type": "Relationship","value": "urn:ngsi-ld:Building:barn004"} @@ -366,6 +380,7 @@ curl -s -o /dev/null -X POST \ "device_id": "filling004", "entity_name": "urn:ngsi-ld:Device:filling004", "entity_type": "FillingLevelSensor", + "apikey": "854782081", "endpoint": "http://tutorial:3001/iot/filling004", "static_attributes": [ {"name": "controlledAsset", "type": "Relationship","value": "urn:ngsi-ld:Building:farm004"} @@ -375,6 +390,7 @@ curl -s -o /dev/null -X POST \ "device_id": "tractor004", "entity_name": "urn:ngsi-ld:Device:tractor004", "entity_type": "Tractor", + "apikey": "1067386313", "endpoint": "http://tutorial:3001/iot/tractor004", "static_attributes": [ {"name": "controlledAsset", "type": "Relationship","value": "urn:ngsi-ld:Building:farm004"} diff --git a/services b/services index 622b723..52d0cf5 100755 --- a/services +++ b/services @@ -19,7 +19,7 @@ STELLIO="http://stellio:8080/actuator/health" SCORPIO="http://scorpio:9090/scorpio/" ORION="http://orion:1026/version" IOT_AGENT="http://iot-agent:4041/version" -CONTEXT="http://context/ngsi-context.jsonld" +CONTEXT="http://context/user-context.jsonld" CORE_CONTEXT="https://uri.etsi.org/ngsi-ld/v1/ngsi-ld-core-context-v1.6.jsonld" dockerCmd="docker compose"