Documentation

Introduction to OpenSensorHub

General OpenSensorHub Documentation (website)

Quick Start Guide to deploy and collect data using OpenSensorHub and an Android device:

Deploy and Collect Data with OSH (website)

OpenSensorHub Node (servers)

How to install and deploy OpenSensorHub:

Install OpenSensorHub (website)

How to use and configure a deployment of OpenSensorHub Nodes (servers):

OpenSensorHub Driver Development

Quick start project templates for driver development:
The following repositories should be used in conjunction with OSH Driver Development Presentation below.

OpenSensorHub v1.4: https://github.com/opensensorhub/osh-node-dev-template

OpenSensorHub v2.0: https://github.com/opensensorhub/osh-node-dev-template/tree/v2-upgrade

How to create new drivers for OpenSensorHub:

Your First Sensor – Driver Documentation (website)

Lab Based Training Modules

The following resources are lab-based training modules. These modules begin with development environment setup and progress through developing OpenSensorHub solutions (drivers, processes, etc.). The emphasis of these training modules is on building for OpenSensorHub 2.0. Lab modules will be added periodically.

OpenSensorHub Client Toolkit

Documentation and examples of how to use OSH-JS to create clients or a Common Operating Pictures (COP). This includes examples of requesting data and rendering it on a map, video, chart, audio player, etc…

OSH JS Toolkit Documentation (website)

v2.0 Sensor Web API

OpenSensorHub v2.0 adds the capabilities of accessing resources offered by OpenSensorHub nodes through a RESTful API. Information on the API can be found by reviewing the API Principles. In addition, sample requests can be found here.

In short all requests to OpenSensorHub using the SensorWeb API take the form:

[http | https]://[URL | IP]:[PORT]/sensorhub/api

The following is extracted from API Principles but have been modified to provide a more generic template, note that the hexadecimal values are ids of resources and are dependent and assigned on the OpenSensorHub node on which they are hosted.

Individual Resources

Individual resources can be retrieved by including their ID directly in the URL path, after the URL of the collection they belong to. This is shown in the examples below:

Top level collections:

  • [http | https]://[URL | IP]:[PORT]/sensorhub/api/systems/2ecd4713
  • [http | https]://[URL | IP]:[PORT]/sensorhub/api/datastreams/56de11a

One or more JSON properties can be included or excluded specifically with the select query parameter. The ! character is used to exclude fields:

  • [http | https]://[URL | IP]:[PORT]/sensorhub/api/systems/2ecd4713?select=id,name
  • [http | https]://[URL | IP]:[PORT]/sensorhub/api/systems/2ecd4713?select=!validTime

Resource Collections

Resource collections are accessed using plural in the URL path.

  • [http | https]://[URL | IP]:[PORT]/sensorhub/api/systems
  • [http | https]://[URL | IP]:[PORT]/sensorhub/api/datastreams
  • [http | https]://[URL | IP]:[PORT]/sensorhub/api/observations
  • [http | https]://[URL | IP]:[PORT]/sensorhub/api/features
Nested Collections

Nested collections can be accessed in the same way, provided the parent resource is identified:

  • [http | https]://[URL | IP]:[PORT]/sensorhub/api/systems/2ecd4713/members
  • [http | https]://[URL | IP]:[PORT]/sensorhub/api/systems/2ecd4713/featuresOfInterest
  • [http | https]://[URL | IP]:[PORT]/sensorhub/api/datastreams/56de11a/observations

Filtering Items

Collections can be filtered using query parameters:

  • [http | https]://[URL | IP]:[PORT]/sensorhub/api/systems?validTime=2019-03-18Z/2020-04-30Z
  • [http | https]://[URL | IP]:[PORT]/sensorhub/api/systems?q=temp

Paging

Paging is done by providing a offset and limit parameters. The offset is ommitted for the first fetch, and then included when continuing paging through results. The next offset is always provided along with the last page fetched:

  • [http | https]://[URL | IP]:[PORT]/sensorhub/api/systems?limit=100
  • [http | https]://[URL | IP]:[PORT]/sensorhub/api/systems?offset=44def6589c&limit=100

Note that the offset parameter should be considered an opaque identifier, not necessarily the sequential index of the next item. For certain data stores, it could be convenient to implement it as the row number at the start of the page (equivalent to the skip parameter in SQL) but it is not a requirement, and is not the most efficient way to implement paging in large datastores.

Schema

Schemas provide metadata on data streams, describing the structure and properties of data received via the data stream request. These can be access through a specific systems data streams collection or directly through the data stream

  • [http | https]://[URL | IP]:[PORT]/sensorhub/api/systems/14xxa6v8awbxw/datastreams/1t0ij9fyctks7/schema
  • [http | https]://[URL | IP]:[PORT]/sensorhub/api/datastreams/1t0ij9fyctks7/schema

Details

Details provide information about a particular system

  • [http | https]://[URL | IP]:[PORT]/sensorhub/api/systems/41s2wfnr/details
%d bloggers like this: