Difference between revisions of "Edge Gateway Adapter Common Configuration"

From Datonis
Jump to: navigation, search
(Created page with " Edge Gateway Home > '''Adapter Common Configuration''' == Overview == An adapter in Datonis Gateway refers to an independent module/plugin that allo...")
(No difference)

Revision as of 07:46, 18 July 2017

Edge Gateway Home > Adapter Common Configuration

Overview

An adapter in Datonis Gateway refers to an independent module/plugin that allows data to be fetched from an environment or protocol (e.g. Modbus, OPC UA) and pushes data to Datonis platform. 

The various adapters are available in Services sections of Gateway interface's left pane.

Common Configuration

A typical configuration of Pull Data Adapter. The configuration of any adapter has two common properties:

  • enabled - this property value is responsible for enabling or disabling an adapter. A true value enable the adapter and based on configJson value, will start pushing data.
  • configJson - this property value holds actual configuration of any specific adapter. The value of this property has to be a valid json data.

Common-config.png

Setting configJson property value

The configJson is a special kind of property that holds entire configuration of the adapter. A valid value must be a proper JSON data structure. Elements of the JSON are described as below:

Root object

adapter_type String The type of the adapter, its generally a constant string and no need to modify
thing_configs thing_config Array An array of thing_config object. Each thing_config object contains mapping required to transform source data into metric data

thing_config object

thing_key String The thing key, Datonis UI location: Home → Things → Thing Key
name String Name of the thing, Datonis UI location: Home → Things → Name
description String Optional, Description of the thing, Datonis UI location: Home → Things → {thing name} → Description
thing_template_key String Optional, Thing template key, this is filled automatically
bi_directional Boolean Signifies whether the thing can accept instructions, Home → Things → Bi-directional
send_interval_ms Number In pull data adapter case, this is a minimum interval (in milli seconds) at which thing metric data will be sent to Datonis
scan_interval_ms Number In pull data adapter case, at this interval (in milli seconds) the data will be scanned from underlying source
heartbeat_interval_ms Number The interval (in milli seconds) at which thing heart beat will be communicated to Datonis platform.
source_tags source_tag Array An array of source_tag object. Each source_tag object defines the source specific connection object and source specific tag object.
derived_tags derived_tag Array An array of derived_tag object. Each derived_tag object defined the expression based tag that is derived from either source_tag value or earlier defined derived_tag value.
monitor_tag_ids String Array An array of tag_id defined in source_tags or derived_tags section. This list will be used to monitor the tag values at each scan defined by scan_interval_ms. 

If any of the tag values change during a scan then the thing metrics will be sent at that scan interval other wise thing metrics will be sent at send_interval_ms irrespective of

any tag value change.

scan_tag_ids String Array An array of tag_id defined in source_tags or derived_tags section. This list will be used to send the tag values at each scan defined by scan_interval_ms triggered by change in 

monitor_tag_ids. An empty array or null value means all tag values will be sent during the scan interval. It does not affect send interval tags, at send interval all tags will be sent.

If specific tags are defined then those tags will be sent during scan interval rest other will be ignored. (Version 4.0.92 onwards supported)

metric_mappings metric_mapping Array An array of metric_mapping object. metric_mapping object defines the mapping between thing metric and source or derived tag. The mapping is kept as a separate object in order 

to evolve source_tag and derived_tag definitions  independent of thing metric relation.

source_tag object

protocol_connection Object This is an adapter specific JSON object. This will have adapter specific connection properties e.g. Modbus adapter may have properties like ip_address, port while OpcUA adapter may have

server_url, cert_alias properties.

protocol_tags Object Array An array of protocol_tag objects. A protocol_tag object is specific to adapter only the tag_id property is common, it is used for metric mapping and must be unique in a thing_config. E.g. Modbus 

adapter properties may be device_id, read_count while OpcUA adapter may have properties like node_id.

derived_tag object

tag_id String The unique tag_id within a thing_config object. This is used further in metric_mapping object to map to thing metric
expression String In case of an expression, you can specify any simple mathematical formula. There are three context arrays available for the expression: latest, prev_scanned and prev_sent. Each context returns

tag values that are computed just now, last scanned (via scan_interval_ms) or last sent (via send_interval_ms). E.g.

metric_mapping object

metric_id String This is metric name of the thing mentioned at thing_config level. Datonis UI location: Home → Thing Templates → {template name} → Metric (Name column)
tag_id String The unique tag_id which is defined either in source_tags or derived_tags section
type Enum Allowed values are number, boolean and string. This type has to match with Datonis metric type. Datonis UI location: Home → Thing Templates → {template name} → Metric (Data Type column)