Skip to main content

General Configuration

While you will be mainly configuring OpenSensorHub nodes via the Admin UI, there are some important things to know about the node configuration, as well as configuration for important OpenSensorHub modules.

Config File

OpenSensorHub's configuration is centralized in a single file. It is in JSON format, so it can be easily viewed or modified in any text editor.

This file contains a list of modules' configuration that are loaded in order when starting OpenSensorHub.

This file will be found at /osh-node-*.*.*/config/config.json.

Common Config Parameters

Each module configuration contains a common set of parameters that are described below:

  • objClass: The class of the configuration object itself (needed for deserialization)
  • id: Local ID of the module instance
  • name: Name of the module instance
  • description: Description of the module instance
  • moduleClass: The class of the module to instantiate
  • autoStart: Boolean flag indicating if the module should be automatically started when the hub starts

Any other parameter is specific to the module and should be described in the module documentation.

Sensor Driver Configuration

System drivers share some common configuration properties inherited from the SensorConfig class:

  • sensorML: URL pointing to a SensorML file describing the sensor characteristics (the content of the file will be merged with information generated automatically by the framework, see below)
  • lastUpdated: The date at which the SensorML description generated by the driver starts to be valid. Note that everytime this value is changed (or the validTime in the SensorML document is manually updated), the procedure description is versioned in OSH data stores.

Rules for merging an external SensorML file:

  • Input, output and taskable parameter descriptors generated by the driver code will always override the ones provided in the external SensorML description referenced by the sensorML property
  • If not provided in the external SensorML file, a validTime is generated using the lastUpdated config property. In this case, the validity period starts at the specified time stamp and ends 'now'
  • If not provided in the external SensorML file, the module name is used as the process name in the generated SensorML description.
  • If not provided in the external SensorML file, the module description is used as the process description in the generated SensorML description.

Datastore Identifiers

The federated database needs each storage module deployed on an OSH hub to be assigned a unique number (in the hub scope) in order to generate unambiguous resource IDs.

A common configuration field called databaseNum is shared by all modules implementing data stores. The configuration of each storage module must set a different positive integer number to this field or the hub won't start.

Backups

Each time your node's configuration is updated, a backup of the previous configuration will be stored in the node's directory.

Network Config

Under the Network tab, you can see the OpenSensorHub node's HTTP server configuration. networkconfig.png This is useful for configuring authentication, CORS, HTTPS/SSL, and static content directory/URL.

Static Content

The default static content directory in an OpenSensorHub node will be at /osh-node-*.*.*/web. Any static web files that are placed here will be served at the root URL of the OpenSensorHub node.

The directory and URL from which these static files are served may be configured in the node's HTTP server configuration.

Security Config

Under the Security tab, you will find a basic security module that includes an interface for managing users, roles, and permissions.

You will see some default users and roles. Permissions are used to enable granular access-control to different modules. The standard set of permissions cover the Connected Systems API Service Module, the SOS Service Module, and the AdminUI Module, which enables access-control of the Admin web interface.

config.json network security roles