SensorThings API

Last updated
OGC SensorThings API - Part 1 Sensing
AbbreviationOGC STA
StatusOGC Standard Implementation Specification
Year started2015
Latest version1.0
EditorsSteve Liang (SensorUp), Chih-Yuan Huang (National Central University), Tania Khalafbeigi (SensorUp)
Base standards JSON, OGC/ISO 19156:2011 O&M
Domain Open Geospatial Consortium, Internet of Things
Website OGC SensorThings API Standard GitHub Page
OGC SensorThings API - Part 2 Tasking Core
AbbreviationOGC STA
StatusOGC Standard Implementation Specification
Year started2018
Latest version1.0
EditorsSteve Liang (SensorUp), Tania Khalafbeigi (SensorUp)
Base standards OGC SPS
Domain Open Geospatial Consortium, Internet of Things
Website OGC SensorThings API Standard GitHub Page
OGC SensorThings API - Part 2 Tasking Core Discussion Paper
AbbreviationOGC STA
StatusOGC Discussion Paper
Year started2018
Latest version1.0
EditorsSteve Liang (SensorUp), Tania Khalafbeigi (SensorUp), Kan Luo(University of Calgary)
Base standards OGC SensorThings
Domain Open Geospatial Consortium, Internet of Things
Website OGC SensorThings API Tasking Core Discussion Paper download page

SensorThings API [1] is an Open Geospatial Consortium (OGC) 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 addressing the ability for different IoT systems to exchange information, OGC SensorThings API is addressing the ability for different IoT systems to use and understand the exchanged information. As an OGC standard, SensorThings API also allows easy integration into existing Spatial Data Infrastructures or Geographic Information Systems.

Contents

OGC SensorThings API has two parts: (1) Part I - Sensing and (2) Part II - Tasking. OGC SensorThings API Part I - Sensing 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 Part I - Sensing passed the TC vote on February 1, 2016. The official OGC standard specification was published online on July 26, 2016. In 2019 the SensorThings API was also published as a United Nation's ITU-T Technical Specification. [3]

OGC SensorThings API Part II - Tasking Core was released for public comment on February 20, 2018, [4] and it passed the TC vote on June 1, 2018. The official OGC standard specification for the SensorThings API Part II - Tasking Core was published online on January 8, 2019.

In order to offer a better developer experience, the SensorThings API Part II - Tasking Core Discussion Paper was published online on December 18, 2018. The Tasking Core Discussion paper provides 15 JSON examples showing how SensorThings API Part II - Tasking Core can be used.

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 SensorThings API data model.svg
SensorThings API data model

The foundation of the SensorThings API is its 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 an arbitrary number of Locations (including 0 Locations) and an arbitrary number of Datastreams (including 0 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. [5]

SensorThings API provides two main functionalities, each handled by a part. The two profiles are the Sensing part and the Tasking part. The Sensing part provides a standard way to manage and retrieve observations and metadata from heterogeneous IoT sensor systems, and the Sensing part functions are similar to the OGC Sensor Observation Service. The Tasking part provides a standard way for parameterizing - also called tasking - of task-able IoT devices, such as sensors or actuators. The Tasking part functions are similar to the OGC Sensor Planning Service. The Sensing part is designed based on the ISO/OGC Observations and Measurements (O&M) model, and allows 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 Part I - Sensing 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): [6] [7]

In addition to the above sensing resources, SensorThings API Part II - Tasking Core defines the following resources: [10]

Example payload

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

{"@iot.count":2,"value":[{"@iot.id":1,"@iot.selfLink":"http://example.org/v1.0/Observations(1)","phenomenonTime":"2016-01-01T05:00:00.000Z","result":"-9","resultTime":null,"Datastream@iot.navigationLink":"http://example.org/v1.0/Observations(1)/Datastream","FeatureOfInterest@iot.navigationLink":"http://example.org/v1.0/Observations(1)/FeatureOfInterest"},{"@iot.id":2,"@iot.selfLink":"http://example.org/v1.0/Observations(2)","phenomenonTime":"2016-01-01T04:00:00.000Z","result":"-10","resultTime":null,"Datastream@iot.navigationLink":"http://example.org/v1.0/Observations(2)/Datastream","FeatureOfInterest@iot.navigationLink":"http://example.org/v1.0/Observations(2)/FeatureOfInterest"}]}

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

{"value":[{"Datastream@iot.navigationLink":"http://example.org/v1.0/Datastreams(1)","components":["id","phenomenonTime","resultTime","result"],"dataArray@iot.count":3,"dataArray":[[1,"2005-08-05T12:21:13Z","2005-08-05T12:21:13Z",20],[2,"2005-08-05T12:22:08Z","2005-08-05T12:21:13Z",30],[3,"2005-08-05T12:22:54Z","2005-08-05T12:21:13Z",0]]}]}

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". [12]

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 [13] sponsored by the Department of Homeland Security Science and Technology Directorate. 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. [14] "

OGC SensorThings API standard specification

Free and open source SensorThings API implementations

Whiskers

In March 2016 SensorUp and the GeoSensorWeb Lab at the University of Calgary submitted an open source software project proposal to the Eclipse Foundation and has been approved. The project is called Whiskers. [15] Whiskers is an OGC SensorThings API framework. It will have a JavaScript client and a light-weight server for IoT gateway devices (e.g., Raspberry Pi or BeagleBone). Whiskers aim to foster a healthy and open IoT ecosystem, as opposed to one dominated by proprietary information silos. Whiskers aims to make SensorThings development easy for the large and growing world of IoT developers.

GOST

GOST [16] is an open source implementation of the SensorThings API in the Go programming language initiated by Geodan. It contains easily deployable server software and a JavaScript client. Currently (June 2016) it is in development but a first version can already be downloaded and deployed. The software can be installed on any device supporting Docker or Go (e.g. Windows, Linux, Mac OS and Raspberry Pi). By default sensor data is stored in a PostgreSQL database.

FROST

FROST-Server [17] is an Open Source server implementation of the OGC SensorThings API. FROST-Server implements the entire specification, including all extensions. It is written in Java and can run in Tomcat or Wildfly and is available as a Docker image. Among its many features is the ability to use String or UUID based entity IDs.

FROST-Client [18] is a Java client library for communicating with a SensorThings API compatible server.

SensorThings HcDT Charting SDK

SensorThings HcDT [19] is a JavaScript charting library for the OGC SensorThings API. It is based on the open source[ clarification needed ] Highcharts library and DataTables. It is a front-end charting library enable developers to connect to datastreams from any OGC SensorThings API service, and display the sensor observations in charts, tables, or dashboard widgets for web applications.

Mozilla STA

Mozilla developed a node implementation of the OGC SensorThings API. [20]

52°North STA

52N SensorThingsAPI [21] is an open source implementation of the OGC SensorThings API. Its core features are the interoperability with the 52N SOS implementing the OGC Sensor Observation Service, customizable database mappings and several convenience extensions. It can be deployed as a Docker container, inside an Apache Tomcat or as a standalone application.

Example applications

Department of Homeland Security S&T Shaken Fury Operational Experiment

In 2019 the Shaken Fury operational experiment [22] for the DHS Next Generation First Responder program depicts a scenario of an earthquake causing partial structural collapse and HAZMAT leak at a stadium. OGC SensorThings API is used as the standard interface [23] that interconnects multiple sensors and offers an IoT enabled real-time situational awareness.

Smart Citizens for Smart Cities YYC - crowd-sourced air quality sensing

On Oct 8th 2016, [24] a group of volunteers (smart citizens) in Calgary gathered together, assembled their own sensors, installed at their houses, and formed a crowd-sourced air quality sensor network. All data are publicly available via OGC SensorThings API. [25] This citizen sensing efforts increased the number of Calgary's air quality sensors from 3 to more than 50.

Smart Emission Project in Nijmegen, NL

Smart emission [26] is an air quality monitoring project in the city of Nijmegen, NL. The project deployed multiple air quality sensors throughout the city. Data are published with open standards, including OGC SensorThings API. Part of the project is an open source ETL engine to load the project sensor data into an OGC SensorThings API. [27]

SensorThings Dashboard

This dashboard provides easy-to-use client-side visualisation of Internet-of-Things sensor data from OGC SensorThings API compatible servers. Various types of widgets can be arranged and configured on the dashboard. It is a web application and can be embedded into any website. A live demo is available on the project page. https://github.com/SensorThings-Dashboard/SensorThings-Dashboard

GOST Dashboard v2

GOST Dashboard v2 is an open source library of custom HTML elements (web components) supporting SensorThings API. These elements facilitate the development of HTML applications integrating functionality and data from SensorThings API compatible services. The components are developed with Predix-UI and Polymer.

AFarCloud project OGC Connector

The connector enables interoperability between OGC-compliant data sources and the semantic middleware [28] developed in the Horizon 2020 ECSEL project AFarCloud. It is a modular Java application with Docker-based deployment, implemented according to the 15-078r6 OGC SensorThings API 1.0 Implementation Standard.

Comparison between OGC SensorThings API and OGC Sensor Observation Services

SensorThings API provides functions similar to the OGC Sensor Observation Service, an OGC specification approved in 2005. Both standard specifications are under the OGC Sensor Web Enablement standard suite. The following table summarizes the technical difference between the two specifications. [29]

OGC SensorThings APIOGC Sensor Observation Service (SOS)
Encoding JSON XML
Architecture Style Resource Oriented Architecture Service Oriented Architecture
Binding REST SOAP
Inserting new sensors or observationsHTTP POST (e.g., CRUD)using SOS specific interfaces, e.g., RegisterSensor(), InsertObservation()
Deleting existing sensorsHTTP DELETEusing SOS specific interfaces, i.e., DeleteSensor()
Pagination $top, $skip, $nextLinkNot Supported
Pub/Sub SupportMQTT and SensorThings MQTT ExtensionNot Supported
Updating properties of existing sensors or observationsHTTP PATCH and JSON PATCHNot Supported
Deleting observationsHTTP DELETENot Supported
Linked data support JSON-LD Not Supported
Return only the properties selected by the client$selectNot Supported
Return multiple O&M entities (e.g., FeatureOfInterest and Observation) in one request/response$expandNot Supported

Related Research Articles

The Khronos Group, Inc. is an open, non-profit, member-driven consortium of 170 organizations developing, publishing and maintaining royalty-free interoperability standards for 3D graphics, virtual reality, augmented reality, parallel computation, vision acceleration and machine learning. The open standards and associated conformance tests enable software applications and middleware to effectively harness authoring and accelerated playback of dynamic media across a wide variety of platforms and devices. The group is based in Beaverton, Oregon.

OMA SpecWorks, previously the Open Mobile Alliance (OMA), is a standards organization which develops open, international technical standards for the mobile phone industry. It is a nonprofit Non-governmental organization (NGO), not a formal government-sponsored standards organization as is the International Telecommunication Union (ITU): a forum for industry stakeholders to agree on common specifications for products and services.

Sensor web is a type of sensor network that heavily utilizes the World Wide Web and is especially suited for environmental monitoring. OGC's Sensor Web Enablement (SWE) framework defines a suite of web service interfaces and communication protocols abstracting from the heterogeneity of sensor (network) communication.

SensorML is an approved Open Geospatial Consortium standard and an XML encoding for describing sensors and measurement processes. SensorML can be used to describe a wide range of sensors, including both dynamic and stationary platforms and both in-situ and remote sensors.

The Internet of things (IoT) describes devices with sensors, processing ability, software and other technologies that connect and exchange data with other devices and systems over the Internet or other communications networks. The Internet of things encompasses electronics, communication, and computer science engineering. "Internet of things" has been considered a misnomer because devices do not need to be connected to the public internet; they only need to be connected to a network and be individually addressable.

The Internet Protocol for Smart Objects (IPSO) Alliance was an international technical standards organization promoting the Internet Protocol (IP) for what it calls "smart object" communications. The IPSO Alliance was a non-profit organization founded in 2008 with members from technology, communications and energy companies. The Alliance advocated for IP networked devices in energy, consumer, healthcare, and industrial uses. On 27 March 2018, the IPSO Alliance merged with the Open Mobile Alliance (OMA) to form OMA SpecWorks.

Observations and Measurements (O&M) is an international standard which defines a conceptual schema encoding for observations, and for features involved in sampling when making observations. While the O&M standard was developed in the context of geographic information systems, the model is derived from generic patterns proposed by Fowler and Odell, and is not limited to geospatial information. O&M is one of the core standards in the OGC Sensor Web Enablement suite, providing the response model for Sensor Observation Service (SOS).

Web of Things (WoT) describes a set of standards by the World Wide Web Consortium (W3C) for the interoperability of different Internet of things (IoT) platforms and application domains.

The Semantic Sensor Web (SSW) is a marriage of sensor web and semantic Web technologies. The encoding of sensor descriptions and sensor observation data with Semantic Web languages enables more expressive representation, advanced access, and formal analysis of sensor resources. The SSW annotates sensor data with spatial, temporal, and thematic semantic metadata. This technique builds on current standardization efforts within the Open Geospatial Consortium's Sensor Web Enablement (SWE) and extends them with Semantic Web technologies to provide enhanced descriptions and access to sensor data.

<span class="mw-page-title-main">Open Geospatial Consortium</span> Standards organization

The Open Geospatial Consortium (OGC), an international voluntary consensus standards organization for geospatial content and location-based services, sensor web and Internet of Things, GIS data processing and data sharing. It originated in 1994 and involves more than 500 commercial, governmental, nonprofit and research organizations in a consensus process encouraging development and implementation of open standards.

The Sensor Observation Service (SOS) is a web service to query real-time sensor data and sensor data time series and is part of the Sensor Web. The offered sensor data consists of data directly from the sensors, which are encoded in the Sensor Model Language (SensorML), and the measured values in the Observations and Measurements encoding format. The web service as well as both file formats are open standards and specifications of the same name defined by the Open Geospatial Consortium (OGC).

WaterML is a technical standard and information model used to represent hydrological time series structures. The current version is WaterML 2.0, released an open standard of the Open Geospatial Consortium (OGC).

OMA Lightweight M2M (LwM2M) is a protocol from the Open Mobile Alliance for machine to machine (M2M) or Internet of things (IoT) device management and service enablement. The LwM2M standard defines the application layer communication protocol between an LwM2M Server and an LwM2M Client which is located in an IoT device. It offers an approach for managing IoT devices and allows devices and systems from different vendors to co-exist in an IoT- ecosystem. LwM2M was originally built on Constrained Application Protocol (CoAP) but later LwM2M versions also support additional transfer protocols.

The IoTivity is an open source framework created to standardize inter-device connections for the IoT. Any individual or company can contribute to the project, and this may influence OCF standards indirectly. However, being a member of the OCF can benefit from patent cross-licensing protection.

<span class="mw-page-title-main">SensorUp</span>

SensorUp Inc. is a Canadian company based in Calgary, Alberta, Canada, specializing in methane emissions management software. It is recognized for its advancements in the oil and gas sector with its methane emissions management SaaS platform, SensorUp GEMS, and for developing the Open Geospatial Consortium SensorThings API standard specification.

The Open Connectivity Foundation (OCF) is an industry organization to develop standards, promote a set of interoperability guidelines, and provide a certification program for devices involved in the Internet of things (IoT). By 2016 it claimed to be one of the biggest industrial connectivity standards organizations for IoT. Its membership includes Samsung Electronics, Intel, Microsoft, Qualcomm and Electrolux.

oneM2M

oneM2M is a global partnership project founded in 2012 and constituted by 8 of the world's leading ICT standards development organizations, notably: ARIB (Japan), ATIS, CCSA (China), ETSI (Europe), TIA (USA), TSDSI (India), TTA (Korea) and TTC (Japan). The goal of the organization is to create a global technical standard for interoperability concerning the architecture, API specifications, security and enrolment solutions for Machine-to-Machine and IoT technologies based on requirements contributed by its members.

ESP Easy is a free and open source MCU firmware for the Internet of things (IoT). and originally developed by the LetsControlIt.com community. It runs on ESP8266 Wi-Fi based MCU platforms for IoT from Espressif Systems. The name "ESP Easy," by default, refers to the firmware rather than the hardware on which it runs. At a low level, the ESP Easy firmware works the same as the NodeMCU firmware and also provides a very simple operating system on the ESP8266. The main difference between ESP Easy firmware and NodeMCU firmware is that the former is designed as a high-level toolbox that just works out-of-the-box for a pre-defined set of sensors and actuators. Users simply hook up and read/control over simple web requests without having to write any code at all themselves, including firmware upgrades using OTA updates.

<span class="mw-page-title-main">Thing Description</span>

The Thing Description (TD) (or W3C WoT Thing Description (TD)) is a royalty-free, open information model with a JSON based representation format for the Internet of Things (IoT). A TD provides a unified way to describe the capabilities of an IoT device or service with its offered data model and functions, protocol usage, and further metadata. Using Thing Descriptions help reduce the complexity of integrating IoT devices and their capabilities into IoT applications.

Matter is an open-source connectivity standard for smart home and IoT devices. It aims to improve interoperability and compatibility between different manufacturer and security, and always allowing local control as an option.

References

  1. "OGC SensorThings API". Open Geospatial Consortium. Retrieved 2018-02-20.
  2. "OGC seeks public comment on SensorThings API standard for Internet of Things | OGC". www.opengeospatial.org. Retrieved 2016-01-26.
  3. "Technical Specification D3.2 - SensorThings API - Sensing". www.itu.int. Retrieved 2019-07-17.
  4. "OGC seeks public comment on 'SensorThings API Part 2 – Tasking Core' Candidate Standard for use in the Internet of Things | OGC". www.opengeospatial.org. Retrieved 2018-02-21.
  5. "API Reference". www.sensorup.com. Archived from the original on 2016-02-03. Retrieved 2016-01-26.
  6. 1 2 Liang, Steve; Huang, Chih-Yuan; Khalafbeigi, Tania, eds. (2016-07-26). OGC® SensorThings API Part 1: Sensing.
  7. "SensorThings Data Model". ogc-iot.github.io. Retrieved 2016-01-26.
  8. tsbmail. "Y.2060 : Overview of the Internet of things". www.itu.int. Retrieved 2016-01-26.
  9. 1 2 "ISO 19156:2011 - Geographic information -- Observations and measurements". www.iso.org. Retrieved 2016-01-26.
  10. 1 2 Liang, Steve; Khalafbeigi, Tania, eds. (2019-01-08). OGC® SensorThings API Part 2: Tasking Core.
  11. "Sensor Model Language (SensorML) | OGC". www.opengeospatial.org. Retrieved 2018-02-21.
  12. 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.
  13. "OGC announces successful completion of Incident Management Information Sharing IoT Pilot".
  14. "S&T's Internet of Things Pilot Demonstrates 'State of the Practical'". 2016-01-25. Retrieved 2016-02-14.
  15. "Whisker, an Eclipse project proposal". 2016-03-11. Retrieved 2016-03-24.
  16. "Geodan/gost". GitHub. Retrieved 2016-06-30.
  17. "FraunhoferIOSB/FROST-Server". GitHub. Retrieved 2018-07-04.
  18. "FraunhoferIOSB/FROST-Client". GitHub. Retrieved 2018-07-04.
  19. "SensorThings Highchart and DataTable (HcDT) | SensorUp". www.sensorup.com. Archived from the original on 2016-08-20. Retrieved 2016-08-31.
  20. "mozilla-sensorweb/sensorthings". GitHub. Retrieved 2017-03-05.
  21. 52North/sensorweb-server-sta, 52°North Initiative for Geospatial Open Source Software GmbH, 2020-11-17, retrieved 2020-11-24
  22. "News Release: S&T, Industry, Responders Partner to Evaluate Tech". Department of Homeland Security. 2019-06-10. Retrieved 2019-07-17.
  23. "NGFR Integration Handbook". Department of Homeland Security. 2018-02-06. Retrieved 2019-07-17.
  24. "Calgary sensor pilot helps you plan a run with the best air quality | Metro News". metronews.ca. Archived from the original on 2016-11-04. Retrieved 2016-11-04.
  25. "Air Quality in Calgary". calgary-air.sensorup.com. Retrieved 2016-11-04.
  26. contributors, Just van den Broecke - Geonovum original: Mark Otto, Jacob Thornton, and Bootstrap. "Smart Emission". data.smartemission.nl. Retrieved 2016-11-04.{{cite web}}: |last= has generic name (help)CS1 maint: multiple names: authors list (link)
  27. "Geonovum/smartemission". GitHub. Retrieved 2016-11-04.
  28. Kepka, Michal; Černý, Lukáš; Brada, Premek (November 2020). "An open system for monitoring environmental phenomena: Poster abstract". Proceedings of the 18th Conference on Embedded Networked Sensor Systems. ACM. pp. 659–660. doi:10.1145/3384419.3430443. ISBN   9781450375900. S2CID   227154703.
  29. "Comparison of SensorThings API and Sensor Observation Service". Archived from the original on 2016-03-06. Retrieved 2016-02-29.