Hardware Templates

Last modified: Jan 18, 2019 @ 10:50

Hardware templates are based on the hardware types. In a template you can configure the actual settings/parameters values which will be associated with every gateway/device/smart object being registered to DDM based on the template.

Several templates can be created towards the same hardware types and the purpose is the control the behavior of a device/gateway/smart object by using different templates and setting different values of parameters etc.

You can create a special template for i.e each customer, vertical, use case and put data into the Meta Data groups that was assign to the HW-type. The settings/parameters can be overridden on a device instance level later on.

Smart Object templates

For every Smart Object template you create you will be able to choose sensor type, give it a name, edit the settings/parameters and also add Tags to it to be used when filtering etc.

For example, a temperature sensor might have different intervals when to send data based on being indoor/outdoor. With one profile for indoor and one for outdoor we can have different settings in combination with Tags (“Indoor” or “Outdoor”) to be able to do filtering on data in a processing step when consuming data.

Device templates

For every Device template you create you will be able to choose device type, give it a name, edit the Meta Data settings and also add Tags to it to be used when filtering etc.

You can aslo assign “contact lost” information on a template that is used in the rules engine to fire off alarms when a device has not been seen within the set time.

One of the main functions of a device template is that you can generate and create virtual sensors from the physical measurements coming in from the devices.

Lets say you want to know for how many minutes the temperature has been more than 20 degrees. By adding a transformer on a template you can easily get this value. Several transformers can be added to a template from the transformers library. For details about transformers se section Transformer.

Below is an example of a device template for a specific hardware type.

The screen shot below is an example of a device/smart object and resource type setup in the admin GUI in DDM. It shows from left to right

  • A device type with 6 smart object
  • A smart object of the type “temperature”
  • A resource of the type “sensor value” that is part of the temperature smart object.

Transformers

In DDM you can extend the collected data using transformers. Using transformers, you can create new virtual sensors and/or devices based on the incoming data.
Incoming sensor values are ingested into the transformer where the logic extends, join, split, calculate the data into new sensor types.

The following figure shows the concept of a transformer.

There are 2 different types of transformers in the system

  1. Device transformer, sits on a template for a device. This transformer has access to the native device sensors (smart objects) and can use them as input, the output is a new virtual sensor attached to the device.  The screen show below shows a transformer that counts have many times the temperature sensor has reported min 22 degrees.
  2. General transformer, a general transformer generates as the output a new device of the type transformer and the input is a collection of devices, a resource group, that is defined. A resource group can i.e  be all temperature sensors in the system or in one location having the tag outdoor. The screen shot below shows a transformer that takes a resource group “All temperature sensors” as input and counts every time a sensor is reporting a value greater than the previous one.

Example of pre-defined transformers:

DewPoint: Is used to calculate the steam pressure based on the temperature and humidity sensor values of a device. The result from the calculation is a new third virtual sensor.

Counter: The counter sensor is used to count how many times something has happened. Maybe you are looking for how many time an engine has started, how many times the door has been opened. This information is

Timer: A timer transformer is used if you want to measure for how long time a state has occurred i.e how many minutes the temperature has been more than 35 degrees or for how long the oil pressure has been lower than X.

Aggregator:  this transformer summarizes all measurement for the incoming sensors included.

A transformer can be executed based on 3 different criteria’s.

  1. One of the input sensors is reporting a new value
  2. All of the input sensors have sent in a new value
  3. Based on time, e.g every 60 minutes

New transformer types can be added to generate the logic and/or information that end-user applications or the rules engine need. The code is written and uploaded to DDM.

Below are some examples of transformers that can be written:

Data format converter: Convert a sensor input from one data type to another

Advanced Formulas: Use the transformer framework to apply mathematical formulas to your ingested data

Below is a transformer that compares the realtime value of a temperature sensor with the aggregated average value for the last 30 minutes. The rules engine can be set up to act on the result.

Resource Collection

DDM can have 100000s of devices registered to the system and it is important to be able to group them together in a flexible way based on several criteria and also be able to apply business logic to a device or a collection of devices

Device type, template, sensor type, tags and locations are some of the criteria that can be used to group them together into a resource collection.

A resource collection can be exposed via APIs, it can be used as the input of a transformer and also the rules engine can be configured to work against a resource group.

In DDM one or several reusable resource groups can be configured.

Below is a screen shot showing the creation of a resource group with all temperature values from all temperature sensors in the system.

The group is dynamically updated when a new device is registered, when a tag changes etc so it is always up to date.