The OGC SensorThings API is a serious candidate to become a standard for the group OGC Sensor Web for IoT Standards Working Group (SW-IoT SWG). It offers an open and unified way to interconnect IoT devices, data and web applications.
The SensorThings API is an open source standard built over Web protocols with REST style. The objective is to offer a unified way to show all the IoT information to the world.
In order to provide a unified way to access the data and capabilities of IoT devices, the SensorThing API defines an IoT data model where the core of this model is a Thing.
· Every Thing may have 0..*locations in time or space
· Every Thing may have 0..*DataStreams (Data streams core from Sensing Profile)
The data model consists of 2 parts:
· Sensing Profile: allows IoT devices and applications to: CREATE, READ, UPDATE, and DELETE (HTTP POST, GET, PUT and DELETE) IoT data from a SensorThings Service.
· Tasking Profile: allows applications take the control of IoT devices through a SensorThings Service
The following figure shows the Data Model:
· Thing object has a location property in space and time
· Thing may have multiple DataStreams, which are Observation collections grouped by the same Observed Property
· An Observation is an event run by a sensor that produces a result whose value is an estimate from an Observed Property of the Feature of Interest
· Thing may have multiple Tasking Capabilities as a runnable function that is run by an Actuator
· Users can create Task entities for services.
An example of instantiating a Thing (with hyperlinks) would look like this in JSON language:
Where the Location would be:
And this is how it fits with Sofia2:
Firstly, it fits the main objective of Sofia 2: be interoperable with different protocols, languages, platforms and standards
In the practical part, if you know enough about Sofia 2 Ontologies concept (if not, take a look of this doc) you will have noticed that nothing prevents to model this SensorThing Data Model using a Sofia2 Ontology. Indeed, Sofia2 supports the Ontology Definitions based on AMON model, that has many similarities with this model.
And, on the other hand, thanks to the new Sofia2 API Manager feature that allows to easily publish any Ontology as a REST API, the similarities between the SensorThing API REST and the Sofia2 API REST will be even greater.