SensorThings API

SensorThings API[1] is an Open Geospatial Consortium (OGC) candidate standard providing an open and unified framework to interconnect IoT sensing devices, data, and applications over the Web. It is an open standard addressing the syntactic interoperability and semantic interoperability of the Internet of Things. It complements the existing IoT networking protocols such CoAP, MQTT, HTTP, 6LowPAN. While the above-mentioned IoT networking protocols are address the ability for different IoT systems to exchange information, OGC SensorThings API is address the ability for different IoT systems to use and understand the exchanged information. OGC SensorThings API was released for public comment on June 18, 2015.[2] The OGC Technical Committee (TC) approves start of electronic vote on December 3, 2015, and the SensorThings API passed the TC vote on February 1, 2016.

Design

SensorThings API is designed specifically for resource-constrained IoT devices and the Web developer community. It follows REST principles, the JSON encoding, and the OASIS OData protocol and URL conventions. Also, it has an MQTT extension allowing users/devices to publish and subscribe updates from devices, and can use CoAP in addition to HTTP.

SensorThings API data model

The foundation of the SensorThings API is it's data model that is based on the ISO 19156 (ISO/OGC Observations and Measurements), that defines a conceptual model for observations, and for features involved in sampling when making observations. In the context of the SensorThings, the features are modelled as Things, Sensors (i.e., Procedures in O&M), and Feature of Interests. As a result, the SensorThings API provides an interoperable Observation-focus view, that is particularly useful to reconcile the differences between heterogeneous sensing systems (e.g., in-situ sensors and remote sensors).

An IoT device or system is modelled as a Thing. A Thing has a Location with one or more Datastreams. Each Datastream observes one ObservedProperty with one Sensor and has many Observations collected by the Sensor. Each Observation observes one particular FeatureOfInterest. The O&M based model allows SensorThings to accommodate heterogeneous IoT devices and the data collected by the devices.[3]

SensorThings API provides two main functionalities, each handled by a profile. The two profiles are the Sensing profile and the Tasking profile. The Sensing profile provides a standard way to manage and retrieve observations and metadata from heterogeneous IoT sensor systems, and the Sensing profile functions are similar to the OGC Sensor Observation Service. The Tasking profile provides a standard way for parameterizing - also called tasking - of task-able IoT devices, such as sensors or actuators. The Tasking profile functions are similar to the OGC Sensor Planning Service. The Sensing profile is designed based on the ISO/OGCObservation and Measurement (O&M)model, and allows IoTlows IoT devices and applications to CREATE, READ, UPDATE, and DELETE (i.e., HTTP POST, GET, PATCH, and DELETE) IoT data and metadata in a SensorThings service.

Entities (Resources)

SensorThings API defines the following resources. As SensorThings is a RESTful web service, each entity can be CREATE, READ, UPDATE, and DELETE with standard HTTP verbs (POST, GET, PATCH, and DELETE):[4][5]

Example Payload

http://example.org/v1.0/Datastream(id)/Observations

 1 {
 2   "@iot.count": 2,
 3   "value": [
 4     {
 5       "@iot.id": 1,
 6       "@iot.selfLink": "http://example.org/v1.0/Observations(1)",
 7       "phenomenonTime": "2016-01-01T05:00:00.000Z",
 8       "result": "-9",
 9       "resultTime": null,
10       "Datastream@iot.navigationLink": "http://example.org/v1.0/Observations(1)/Datastream",
11       "FeatureOfInterest@iot.navigationLink": "http://example.org/v1.0/Observations(1)/FeatureOfInterest"
12     },
13     {
14       "@iot.id": 2,
15       "@iot.selfLink": "http://example.org/v1.0/Observations(2)",
16       "phenomenonTime": "2016-01-01T04:00:00.000Z",
17       "result": "-10",
18       "resultTime": null,
19       "Datastream@iot.navigationLink": "http://example.org/v1.0/Observations(2)/Datastream",
20       "FeatureOfInterest@iot.navigationLink": "http://example.org/v1.0/Observations(2)/FeatureOfInterest"
21     }
22   ]
23 }

Data Array Extensions

In order to reduce the data size transmitted over the network, SensorThings API data array extension allows users to request for multiple Observation entities and format the entities in the dataArray format. When a SensorThings service returns a dataArray response, the service groups Observation entities by Datastream or MultiDatastream, which means the Observation entities that link to the same Datastream or the same MultiDatastream are aggregated in one dataArray.

Example request for data array

http://example.org/v1.0/Observations?$resultFormat=dataArray

Example data array response

 1 {
 2   "value": [
 3     {
 4       "Datastream@iot.navigationLink": "http://example.org/v1.0/Datastreams(1)",
 5       "components": [
 6         "id",
 7         "phenomenonTime",
 8         "resultTime",
 9         "result"
10       ],
11       "dataArray@iot.count": 3,
12       "dataArray": [
13         [
14           1,
15           "2005-08-05T12:21:13Z",
16           "2005-08-05T12:21:13Z",
17           20
18         ],
19         [
20           2,
21           "2005-08-05T12:22:08Z",
22           "2005-08-05T12:21:13Z",
23           30
24         ],
25         [
26           3,
27           "2005-08-05T12:22:54Z",
28           "2005-08-05T12:21:13Z",
29           0
30         ]
31       ]
32     }
33   ]
34 }

Evaluation

Interoperability between OpenIoT and SensorThings "We believe that the implementation of the SensorThing API will be a major improvement for the OpenIoT middleware. It will give OpenIoT a standardized and truly easy to use interface to sensor values.This will complement the rich semantic reasoning services with a simple resource based interface. And the consistent data model mapping gives both a common context to describe the internet of things".[8]

Efficiency of SensorThings API A comprehensive evaluation of the SensorThings API is published in Jazayeri, Mohammad Ali, Steve HL Liang, and Chih-Yuan Huang. "Implementation and Evaluation of Four Interoperable Open Standards for the Internet of Things." Sensors 15.9 (2015): 24343-24373.

Quotes

SensorThings API was demonstrated in a pilot project sponsored by the Department of Homeland Security Science and Technology. Dr. Reginald Brothers, the Undersecretary of the Homeland Security Science and Technology, was "impressed with the ‘state of the practical’ where these various industry sensors can be integrated today using open standards that remove the stovepipe limitations of one-off technologies.[9] "

OGC SensorThings API Standard Specification

Links

  1. SensorThings API - GitHub
  2. Presentation: Sensor up your connected applications with OGC SensorThings API (FOSS4G)
  3. Chapter: Mapping the OGC SensorThings API onto the OpenIoT Middleware
  4. Tutorial in YouTube: "Getting Started Series"
  5. Application: SensorThings Playground allows interested people and organizations to experiment with a SensorThings system via a friendly, step-by-step process.

References

  1. "OGC SensorThings API". ogc-iot.github.io. Retrieved 2016-01-26.
  2. "OGC seeks public comment on SensorThings API standard for Internet of Things | OGC". www.opengeospatial.org. Retrieved 2016-01-26.
  3. "API Reference". www.sensorup.com. Retrieved 2016-01-26.
  4. 1 2 Liang, Steve; Huang, Chih-Yuan; Khalafbeigi, Tania (eds.). OGC® SensorThings API Part 1: Sensing.
  5. "SensorThings Data Model". ogc-iot.github.io. Retrieved 2016-01-26.
  6. tsbmail. "Y.2060 : Overview of the Internet of things". www.itu.int. Retrieved 2016-01-26.
  7. 1 2 "ISO 19156:2011 - Geographic information -- Observations and measurements". www.iso.org. Retrieved 2016-01-26.
  8. Schaaf, Hylke van der; Herzog, Reinhard (2015-01-01). Žarko, Ivana Podnar; Pripužić, Krešimir; Serrano, Martin, eds. Mapping the OGC SensorThings API onto the OpenIoT Middleware. Lecture Notes in Computer Science. Springer International Publishing. pp. 62–70. doi:10.1007/978-3-319-16546-2_6. ISBN 9783319165455.
  9. "S&T’s Internet of Things Pilot Demonstrates ‘State of the Practical’". Retrieved 2016-02-14.
This article is issued from Wikipedia - version of the Tuesday, February 16, 2016. The text is available under the Creative Commons Attribution/Share Alike but additional terms may apply for the media files.