eDNA Hint Filter

The foglamp-filter-ednahint filter allows hints to be added to assets within FogLAMP that will be used by the eDNA North plugin. These hints allow for individual configuration of specific assets within the EDNA plugin.

A EDNA hint filter may be added to either a south service or a north task. In a south service it will be adding data for just those assets that originate in that service. In a north task it causes EDNA hints to be added to all assets that the FogLAMP is sending to the upstream system, it would normally only be used in a north that was using the EDNA plugin, however it could be used in a north that is sending data to another FogLAMP that then forwards to EDNA.

To add an EDNA hints filter:

  • Click on the Applications add icon for your service or task.

  • Select the ednahint plugin from the list of available plugins.

  • Name your EDNA hint filter.

  • Click Next and you will be presented with the following configuration page

ednahint

  • Enter your EDNA Hints in the JSON editor shown. You may add multiple hints for multiple assets in a single filter instance. See EDNA Hint data.

  • Enable the filter and click on Done to activate it.

EDNA Hint data

EDNA Hints comprise of an asset name which the hint applies, the datapoints within the asset and then for each datapoint a JSON document that is the hint. A hint is a name/value pair: the name is the hint type and the value is the value of that hint.

The asset name may be expressed as a regular expression, in which case the hint is applied to all assets that match that regular expression.

The following hint are currently supported by eDNA North:

  • shortid: Specify the short ID to be used for the datapoint.

  • longid: Specify the long ID to be used for the datapoint.

  • extid: Specify the extended ID to be used for the datapoint.

  • description: Specify a description to add to the eDNA point. This is only used if FogLAMP is creating points in eDNA.

  • extDescription: The extended description to add to the eDNA point. This is only used if FogLAMP is creating points in eDNA.

  • units: The units to add to the eDNA point. This is only used if FogLAMP is creating points in eDNA.

  • history: Control if a point created in eDNA for a particular datapoint should be sent to the history service.

  • expiry: Set the history expiry for a point created in eDNA. This is expressed in days.

  • minPeriod: Set the minimum period between reporting a point to history.

  • deadband: Set the deadband limit for a point created in eDNA.

Note

All hint values should be expressed as a string in the JSON document created regardless of the value expressing a numeric or boolean.

In the example below we explicitly set the short id to use for the datapoint temperature on an asset pump1

{
    "pump1": {
        "temperature": {
            "shortid": "PMP1TEMP"
        }
    }
}

To apply a hint to all assets, the single hint definition can be used with a regular expression.

{
  ".*": {
      "temperature": { "description" : "Temperature Value" }
      }
}

Regular expressions may also be used to select subsets of assets, in the following case only assets with the prefix OPCUA will have the hint applied.

{
  "pump.*": {
      "temperature": { "description" : "Pump Coolant Temperature" }
      }
}

Multiple hints can be given for a single datapoint

{
  "pump1": {
      "temperature": {
           "shortid" : "PMP1TEMP",
           "longid" : "PUMP 1 TEMPERATURE",
           "extid" : "SLURRY PUMP 1 COOLANT TEMPERATURE",
           "description" : "Pump1 Coolant Temperature",
           "extDescription" : "Slurry Pump1 Coolant Temperature",
           "units" : "C",
           "history" : "true",
           "expiry" : "100",
           "deadband" : "0.5",
           "minPeriod": "60"
           }
      }
}

Likewise hints may be given for multiple datapoints within an asset

{
    "pump1": {
        "temperature": {
            "shortid": "PMP1TEMP",
            "description": "Pump1 Coolant Temperature"
        },
        "speed": {
            "shortid": "PMP1SPD"
        }
    }
}

And also multiple assets

{
    "pump1": {
        "temperature": {
            "shortid": "PMP1TEMP",
            "description": "Pump1 Coolant Temperature",
            "units": "C"
        },
        "speed": {
            "shortid": "PMP1SPD",
            "units": "RPM"
        }
    },
    "pump2": {
        "temperature": {
            "shortid": "PMP2TEMP",
            "description": "Pump2 Coolant Temperature"
        },
        "speed": {
            "shortid": "PMP2SPD",
            "units": "RPM"
        }
    }
}

Macro substitution

Simple macro substitution within the values of the hints based on the content of the reading can be done.

Let us assume we have a string based datapoint in our asset that gives the location of the asset. Macro $location$ replaced by the value of datapoint location.

{
     "motor4": {
                     "speed": {
                                     "description": "Speed at $location$",
                             }
                     ]
     }
}

Macro $ASSET$ will be replaced by asset name.

{
    ".*": {
        "temperature": {
            "description": "$ASSET$ Coolant temperature"
        }
    }
}

See Also

foglamp-filter-conditional-labeling - Attach labels the reading data based on a set of expressions matched against the data stream.

foglamp-filter-enumeration - A filter to map between symbolic names and numeric values in a datapoint.

foglamp-filter-expression - A FogLAMP processing filter plugin that applies a user define formula to the data as it passes through the filter

foglamp-filter-fft - A FogLAMP processing filter plugin that calculates a Fast Fourier Transform across sensor data

foglamp-filter-metadata - A FogLAMP processing filter plugin that adds metadata to the readings in the data stream

foglamp-filter-omfhint - A filter plugin that allows data to be added to assets that will provide extra information to the OMF north plugin.

foglamp-filter-rms - A FogLAMP processing filter plugin that calculates RMS value for sensor data

foglamp-filter-scale-set - A FogLAMP processing filter plugin that applies a set of sale factors to the data

foglamp-filter-statistics - Generic statistics filter for FogLAMP data that supports the generation of mean, mode, median, minimum, maximum, standard deviation and variance.