From d5bf4f99d7ca6e66eb3e673c2d8edb298b587c41 Mon Sep 17 00:00:00 2001 From: Abhay Sharma Date: Fri, 17 Aug 2018 10:56:05 +0530 Subject: [PATCH] Adding new example files --- example_items/ex_flow_sensor_item.json | 88 ++++++++++ example_items/ex_intel_traffic_data.json | 56 +++++++ example_items/ex_pollution_sensor_item.json | 105 ++++++++++++ example_items/ex_streetlight_item_new.json | 177 ++++++++++++++++++++ 4 files changed, 426 insertions(+) create mode 100644 example_items/ex_flow_sensor_item.json create mode 100644 example_items/ex_intel_traffic_data.json create mode 100644 example_items/ex_pollution_sensor_item.json create mode 100644 example_items/ex_streetlight_item_new.json diff --git a/example_items/ex_flow_sensor_item.json b/example_items/ex_flow_sensor_item.json new file mode 100644 index 0000000..456f494 --- /dev/null +++ b/example_items/ex_flow_sensor_item.json @@ -0,0 +1,88 @@ +{ + "refCatalogueSchema": "generic_iotdevice_schema.json", + "id": "70b3d58ff0031d5a", + "resourceType": "flowsensor", + "tags": [ + "flow", + "water" + ], + "refCatalogueSchemaRelease": "0.1.0", + "latitude": { + "value": 13.024457, + "ontologyRef": "http://www.w3.org/2003/01/geo/wgs84_pos#" + }, + "longitude": { + "value": 77.562875, + "ontologyRef": "http://www.w3.org/2003/01/geo/wgs84_pos#" + }, + "owner": { + "name": "IISC", + "website": "http://www.iisc.ac.in" + }, + "provider": { + "name": "Robert Bosch Centre for Cyber Physical Systems, IISc", + "website": "http://rbccps.org" + }, + "geoLocation": { + "address": "80 ft Road, Bangalore, 560012" + }, + "accessMechanism": { + "requestAccessSite": { + "describes": "URI for getting permissions to access the device", + "value": "http://rbccps.org/middleware/requestAccess" + }, + "accessEndPoint": { + "value": "https://rbccps.org/middleware/api/{api_ver}/db", + "describes": "End point to access the archived values (database access endpoint)" + }, + "subscriptionEndPoint": { + "value": "mqtt://rbccps.org/subscription/live", + "describes": "End point for subscribing to LIVE data" + }, + "additionalResourceInfo": { + "value": "http://rbccps.org/resourceInfo/{id}", + "describes": "Additional information about the device" + }, + "resourceAPIInfo": { + "value": "http://rbccps.org/resourceInfo/api", + "describes": "Information on how to use various APIs (access, update, cat) associated with this resource" + } + }, + "data_schema": { + "type": "object", + "properties": { + "timestamp": { + "type": "number", + "description": "Sampling Time in EPOCH format", + "units": "seconds", + "permissions": "read", + "accessModifier": "public" + }, + "flow": { + "type": "number", + "description": "Raw ADC value of the water flow", + "units": "unitless", + "permissions": "read", + "accessModifier": "public" + }, + "battery": { + "type": "number", + "description": "1000 times the battery voltage, 255 if connected to DC", + "units": "volts", + "permissions": "read", + "accessModifier": "public" + } + + }, + "additionalProperties": false + }, + "serialization_from_device": { + "format": "protocol-buffers", + "schema_ref": { + "type": "proto 2", + "mainMessageName": "Sensed", + "link": "https://raw.githubusercontent.com/mukuntharun/flowsensor/master/protos/sensed.proto" + } + } + +} \ No newline at end of file diff --git a/example_items/ex_intel_traffic_data.json b/example_items/ex_intel_traffic_data.json new file mode 100644 index 0000000..966305e --- /dev/null +++ b/example_items/ex_intel_traffic_data.json @@ -0,0 +1,56 @@ +{ + "refCatalogueSchema": "isco_base_schema.json", + "id": "863977033828919", + "refCatalogueSchemaRelease":"0.1.0", + "tags": [ + "traffic data", + "mobileye", + "saftey" + ], + "owner": { + "name": "INTEL" + }, + "provider": { + "name": "INTEL" + }, + "accessMechanism": { + "requestAccessSite": { + "describes": "URI for getting permissions to access the device", + "value": "http://rbccps.org/middleware/requestAccess" + }, + "subscriptionEndPoint": { + "value": "rtmp://10.156.14.206:1935/live1/idXYZ", + "describes": "Link to access live stream for this camera" + }, + "accessEndPoint": { + "value": "http://10.156.14.206/archive/idXYZ/", + "describes": "Link to access stored files for a given camera. <.../archive/idXYZ> lists all available files" + } + }, + "data_schema": { + "type": "object", + "properties": { + "_id": { + "type": "string", + "units": "dimensionless", + "permissions": "read" + }, + "deviceCode": { + "type": "string", + "units": "dimensionless", + "permissions": "read" + }, + "location": { + "type": "object", + "permissions": "read", + "properties": { + "wardName": { + "type": "string", + "units": "dimensionless" + } + } + } + } + + } +} diff --git a/example_items/ex_pollution_sensor_item.json b/example_items/ex_pollution_sensor_item.json new file mode 100644 index 0000000..826ce46 --- /dev/null +++ b/example_items/ex_pollution_sensor_item.json @@ -0,0 +1,105 @@ +{ + "refCatalogueSchema": "generic_iotdevice_schema.json", + "id": "70b3d58ff0031dd6", + "resourceType": "pollution", + "tags": [ + "co2", + "pm2.5", + "pm10", + "noise" + ], + "refCatalogueSchemaRelease": "0.1.0", + "latitude": { + "value": 13.012230, + "ontologyRef": "http://www.w3.org/2003/01/geo/wgs84_pos#" + }, + "longitude": { + "value": 77.569135, + "ontologyRef": "http://www.w3.org/2003/01/geo/wgs84_pos#" + }, + "owner": { + "name": "IISC", + "website": "http://www.iisc.ac.in" + }, + "provider": { + "name": "Robert Bosch Centre for Cyber Physical Systems, IISc", + "website": "http://rbccps.org" + }, + "geoLocation": { + "address": "80 ft Road, Bangalore, 560012" + }, + "accessMechanism": { + "requestAccessSite": { + "describes": "URI for getting permissions to access the device", + "value": "http://rbccps.org/middleware/requestAccess" + }, + "accessEndPoint": { + "value": "https://rbccps.org/middleware/api/{api_ver}/db", + "describes": "End point to access the archived values (database access endpoint)" + }, + "subscriptionEndPoint": { + "value": "mqtt://rbccps.org/subscription/live", + "describes": "End point for subscribing to LIVE data" + }, + "additionalResourceInfo": { + "value": "http://rbccps.org/resourceInfo/{id}", + "describes": "Additional information about the device" + }, + "resourceAPIInfo": { + "value": "http://rbccps.org/resourceInfo/api", + "describes": "Information on how to use various APIs (access, update, cat) associated with this resource" + } + }, + "data_schema": { + "type": "object", + "properties": { + "timestamp": { + "type": "number", + "description": "Sampling Time in EPOCH format", + "units": "seconds", + "permissions": "read", + "accessModifier": "public" + }, + "PM2_5": { + "type": "number", + "description": "PM2.5 level in ug/meter^3", + "units": "ug/Meter^3", + "permissions": "read", + "accessModifier": "public" + }, + "PM10": { + "type": "number", + "description": "PM10 level in ug/meter^3", + "units": "ug/Meter^3", + "permissions": "read", + "accessModifier": "public" + }, + "NOISELEVEL": { + "type": "number", + "description": "Ambient noise level in dBA", + "units": "dBA", + "permissions": "read", + "accessModifier": "public" + }, + + "CO2": { + "type": "number", + "description": "Ambient CO2 level in ppm", + "units": "ppm", + "permissions": "read", + "accessModifier": "public" + } + + }, + "additionalProperties": false + }, + "serialization_from_device": { + "format": "protocol-buffers", + "schema_ref": { + "type": "proto 2", + "mainMessageName": "pollution", + "link": "https://raw.githubusercontent.com/mukuntharun/flowsensor/master/protos/sensed.proto" + } + } + +} \ No newline at end of file diff --git a/example_items/ex_streetlight_item_new.json b/example_items/ex_streetlight_item_new.json new file mode 100644 index 0000000..63eed36 --- /dev/null +++ b/example_items/ex_streetlight_item_new.json @@ -0,0 +1,177 @@ +{ + "refCatalogueSchema": "generic_iotdevice_schema.json", + "id": "70b3d58ff0031f00", + "resourceType": "streetlight", + "tags": [ + "onstreet", + "Energy", + "still under development!" + ], + "refCatalogueSchemaRelease":"0.1.0", + "latitude": { + "value": 13.0143335, + "ontologyRef": "http://www.w3.org/2003/01/geo/wgs84_pos#" + }, + "longitude": { + "value": 77.5678424, + "ontologyRef": "http://www.w3.org/2003/01/geo/wgs84_pos#" + }, + "owner": { + "name": "IISC", + "website": "http://www.iisc.ac.in" + }, + "provider": { + "name": "Robert Bosch Centre for Cyber Physical Systems, IISc", + "website": "http://rbccps.org" + }, + "geoLocation": { + "address": "80 ft Road, Bangalore, 560012" + }, + "accessMechanism": { + "accessEndPoint": { + "value": "https://smartcity.rbccps.org/api/0.1.0/historicData", + "describes": "End point to access the archived values (database access endpoint)" + }, + "subscriptionEndPoint": { + "value": "https://smartcity.rbccps.org/api/0.1.0/subscribe", + "describes": "End point for subscribing to LIVE data" + }, + "resourceAPIInfo": { + "value": "https://rbccps-iisc.github.io", + "describes": "Information on how to use various APIs (access, update, cat) associated with this resource" + } + }, + "data_schema": { + "type": "object", + "properties": { + "dataSamplingInstant": { + "type": "number", + "description": "Sampling Time in EPOCH format", + "units": "seconds", + "permissions": "read", + "accessModifier": "public" + }, + "caseTemperature": { + "type": "number", + "description": "Temperature of the device casing", + "units": "degreeCelsius", + "permissions": "read", + "accessModifier": "public" + }, + "powerConsumption": { + "type": "number", + "description": "Power consumption of the device", + "units": "watts", + "permissions": "read", + "accessModifier": "public" + }, + "luxOutput": { + "type": "number", + "description": "lux output of LED measured at LED", + "units": "lux", + "permissions": "read", + "accessModifier": "public" + }, + "ambientLux": { + "type": "number", + "description": "lux value of ambient", + "units": "lux", + "permissions": "read", + "accessModifier": "public" + }, + "targetPowerState": { + "type": "string", + "enum": [ + "ON", + "OFF" + ], + "units": "dimensionless", + "description": "If set to ON, turns ON the device. If OFF turns OFF the device. Writeable parameter. Writeable only allowed for authorized apps", + "permissions": "read-write", + "accessModifier": "protected" + }, + "targetControlPolicyParams": { + "type": "object", + "permissions": "read-write", + "properties": { + "targetControlPolicy": { + "enum": [ + "AUTO_TIMER", + "AUTO_LUX", + "MANUAL" + ], + "units": "dimensionless", + "permissions": "read-write", + "description": "Indicates which of the behaviours the device should implement. AUTO_TIMER is timer based, AUTO_LUX uses ambient light and MANUAL is controlled by app. Writeable only allowed for authorized apps", + "accessModifier": "protected" + } + } + }, + "targetManualControlParams": { + "type": "object", + "permissions": "read-write", + "properties": { + "targetBrightnessLevel": { + "type": "number", + "description": "Number between 0 to 100 to indicate the percentage brightness level. Writeable only allowed for authorized apps", + "units": "percent", + "accessModifier": "protected" + } + } + }, + "targetAutoTimerParams": { + "type": "object", + "permissions": "read-write", + "properties": { + "targetOnTime": { + "type": "number", + "description": "Indicates time of day in seconds from 12 midnight when device turns ON in AUTO_TIMER. Writeable only allowed for authorized apps", + "units": "seconds", + "accessModifier": "protected" + }, + "targetOffTime": { + "type": "number", + "description": "Indicates time of day in seconds from 12 midnight when device turns OFF in AUTO_TIMER. Writeable only allowed for authorized apps", + "units": "seconds", + "accessModifier": "protected" + } + } + }, + "targetAutoLuxParams": { + "type": "object", + "permissions": "read-write", + "properties": { + "targetOnLux": { + "type": "number", + "description": "Indicates ambient lux when device turns ON in AUTO_LUX. Writeable only allowed for authorized apps", + "units": "lux", + "accessModifier": "protected" + }, + "targetOffLux": { + "type": "number", + "description": "Indicates ambient lux when device turns OFF in AUTO_LUX. Writeable only allowed for authorized apps", + "units": "lux", + "accessModifier": "protected" + } + } + } + }, + "additionalProperties": false + }, + "serialization_from_device": { + "format": "protocol-buffers", + "schema_ref": { + "type": "proto 2", + "mainMessageName": "sensor_values", + "link": "https://raw.githubusercontent.com/rbccps-iisc/applications-streetlight/master/proto_stm/txmsg/sensed.proto" + } + }, + "serialization_to_device": { + "format": "protocol-buffers", + "schema_ref": { + "type": "proto 2", + "mainMessageName": "targetConfigurations", + "link": "https://raw.githubusercontent.com/rbccps-iisc/applications-streetlight/master/proto_stm/rxmsg/actuated.proto" + } + } +}