Skip to content

Commit

Permalink
Fix: missing new urls for 1.0.0 release (#41)
Browse files Browse the repository at this point in the history
  • Loading branch information
harishanand95 authored Feb 22, 2018
1 parent 409eef1 commit ea7a9e2
Showing 1 changed file with 151 additions and 6 deletions.
157 changes: 151 additions & 6 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ smartcity-middleware v1.0.0_
Configuration
=============

middleware.conf_ v0.1.0
middleware.conf_ v1.0.0

.. _middleware.conf: https://github.com/rbccps-iisc/ideam/blob/master/middleware.conf
middleware.conf::
Expand Down Expand Up @@ -92,18 +92,163 @@ Comment
+----------------------------------------------------------------+----------------------------------------------------------+
| https://smartcity.rbccps.org/api/1.0.0/subscribe?name=testDemo | https://localhost:10443/api/1.0.0/subscribe?name=testDemo|
+----------------------------------------------------------------+----------------------------------------------------------+
| https://smartcity.rbccps.org/api/1.0.0/subscribe/bind | https://localhost:10443/api/1.0.0/subscribe/bind |
+----------------------------------------------------------------+----------------------------------------------------------+
| https://smartcity.rbccps.org/api/1.0.0/subscribe/unbind | https://localhost:10443/api/1.0.0/subscribe/unbind |
| https://smartcity.rbccps.org/api/1.0.0/follow | https://localhost:10443/api/1.0.0/follow |
+----------------------------------------------------------------+----------------------------------------------------------+
| https://smartcity.rbccps.org/api/1.0.0/cat | https://localhost:10443/api/1.0.0/cat |
+----------------------------------------------------------------+----------------------------------------------------------+
| https://smartcity.rbccps.org/api/1.0.0/historicData | https://localhost:10443/api/1.0.0/historicData |
| https://smartcity.rbccps.org/api/1.0.0/db | https://localhost:10443/api/1.0.0/db |
+----------------------------------------------------------------+----------------------------------------------------------+

For example, registration of device to local middleware is as follows.

``curl -i -X GET "https://localhost:10443/api/0.1.0/register" -H 'apikey: <provider_api_key>' -H 'resourceID: <Your-Resource-ID>' -H 'serviceType: publish,subscribe,historicData'``
command::

curl -X POST \
https://smartcity.rbccps.org/api/1.0.0/register \
-H 'apikey: guest' \
-d '{
"entitySchema": {
"refCatalogueSchema": "generic_iotdevice_schema.json",
"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"
},
"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"
},
"targetBrightnessLevel": {
"type": "number",
"description": "Number between 0 to 100 to indicate the percentage brightness level. Writeable only allowed for authorized apps",
"units": "percent",
"permissions": "read-write",
"accessModifier": "protected"
},
"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"
},
"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"
}
},
"id": "streetLight_1A_212"
}
}'


NOTE
Expand Down

0 comments on commit ea7a9e2

Please sign in to comment.