Create/Update/Delete Device Template

Create Template

To successfully create device, you need to clearly define its Template.
Template is a placeholder for device. It helps you create a number of identical devices which contain the same type of data.

Navigate to the Device Template button in the Devices tab and click the button.

  • Drop-down menu will appear
  • Choose one option

Upload enables you to upload a device template to another instance/environment.

  • Select template you want to upload to another platform
  • Export to JSON
  • Open file (if you want to upload it to the same platform, you have to change the existing name)
  • Click the Upload icon

Click From scratch and a new dialog will appear requiring you to enter:

  • Device template name - a unique name that distinguishes and describes device
  • Description - tells you what kind of device it is, e.g. temperature, pressure… etc.
  • Device type - choose between Standard and WolkSensor - for WolkSensor device
  • Connectivity type - type of connectivity the Platform uses to communicate with your device (Actility, HTTP, MQTT, LoRa TTN, Tele2 Jasper)
  • Protocol - format of the message; the available exchange protocols at the moment are: Cayenne, JSONsingle, JSONmulti, JSON and WolkSensor

Each device can include sensor, actuator and alarm.

The next step is to add specific description of sensors, actuators or alarms in accordance with the device you are adding.

Note: All sensors, actuators or alarms created can be deleted later in the process.

Add Sensors

The first tab is Sensors.

Click the button and enter the following:

  • Sensor name - descriptive sensor name, e.g. Temperature sensor 1
  • Sensor reference - unique identifier of a sensor on a device used as a contract with the Platform when collecting sensor data, meaning that device has to be configured to send the data to the Platform with the same sensor reference, e.g. T
  • Reading type - represents sensor’s physical property type
    You can select reading type from a drop-down list, previously created in the Settings module. Reading type includes: data type, data size, delimiter. After you select reading type - data type, unit and data size will be displayed, by default.

For more information on the Reading type feature, please check Reading Types/Measurement Units/Unit Conversions section of this user guide.

  • Unit - defines a unit for selected reading type, e.g. °C, mbar, %
  • Data type - defines the type of data coming from the sensor
    Depending on the data, select one of the following: NUMERIC, STRING or BOOLEAN
  • Data size - represents the number of data coming from device sensors
    Select minimum 1 depending on the type of data
  • Delimiter - a symbol used to separate reading values if the data size is more than one, e.g. comma (,)
  • Maximum and minimum values - physical device limitation for data values that can be measured and sent by the sensor
  • Enter all the parameters
  • Click Create to finalise the process

Note: It is possible to add all the sensors that are already on a device.

Add Actuators

Actuator allows user to switch devices on and off, set up a value of a feed, or send an actuation value to a device.
Click the button to connect the actuator and enter the following:

  • Actuator name - descriptive actuator name, e.g. Air Condition Switch
  • Actuator reference - unique ID of an actuator, used as a contract with the Platform when sending commands back to the device, meaning that the physical actuator has to be configured to use the same actuator reference, e.g. SW
  • Reading type - e.g. switch/count for different types of actuators, (for example, an ON/OFF switch that may control A/C)

Note: Reading type for actuator is marked!

  • Data type - NUMERIC, STRING or BOOLEAN for different types of actuators
  • Data size - represents the amount of data coming from the device actuators; depending on the data, select minimum 1
  • Minimum and maximum values - physical device limitation for data values that can be sent by an actuator

All fields should be filled in before you take the next step.

Note: It is possible to add all the actuators that are already on a device.

Add Alarms

Alarm represents an occurrence of an event detected by a device. This way, device alerts the Platform of some alarming situation (problem or specific device condition).

For example, smoke detection device will send smoke detected alarm when a certain level of smoke is detected, suggesting the possibility of fire.
This means that the device is responsible for detecting such events and signalling it to the Platform.
The Platform will perform actions, upon receiving an alarming event, such as sending notifications to users or performing custom business rules.

Follow the same procedure as described above and enter the following:

  • Name - descriptive, recognisable name, e.g. High Temperature
  • Reference - unique identifier of an alarm on a device, e.g. HT
  • Message - short notification of a problem that occurred, e.g. Temperature is above 5°C
  • Description detailed description of a message; content which will be displayed in Messages
  • Severity - refers to the severity level of an alarm and you can select: alert - state of alertness; error - problems that should be fixed and critical - requires an immediate fix

After clicking Save button you will finalise the process, and the template will be listed on the Device templates page.

Add Configuration

Apart from adding all the sensors, actuators, and alarms, you can remotely configure the device by following the same procedure.
Configurations consist of set of commands sent to the embedded software e.g. changing heartbeat or WiFi credentials.
A device has to support the use of commands for specific parameters, otherwise this feature cannot be used.

  • Click the button and start adding configuration parameters:
  1. Parameter name
  2. Description - provides more details about the configuration parameter including meaning and the unit if it exists
  3. Reference - unique parameter identifier for a device used as a contract with the Platform when exchanging data, meaning that the device has to be configured to send the data with the same parameter reference, e.g. T
  4. Data type - defines the type of data coming from the device; select one of the following: BOOLEAN, NUMERIC and STRING depending on the type of data
  5. Data size - represents the number of separated data values packed together and coming from the device in one message; if data size is more than 1, delimiter is used (symbol used to separate reading values, e.g. comma (,))
  6. Minimum - value used for numeric data type validation only; defines minimum valid value
  7. Maximum - value used for numeric data type validation only; defines maximum valid value

  • Click Create
  • Your device configuration is created

Import Template

The Import from templates button is located at the top right corner within Create device template. It enables either importing an already populated template in order to update (add new references) or merging two or more existing templates.

To import template do the following:

  • Click the Import from templates button as shown below

  • Within the List of items select one or more templates and selected items will be displayed in the Import list
  • Click the Import button

  • In the Device template name field enter the name of the merged templates
  • Click Save

In case there are some duplicated references for the selected templates, you will be asked to rename them in order to complete the action.

Newly imported template will be in the Device template list. It can be easily found within the Search template field.

Edit/Update Template

Updating template means you can update: name, version, description, device type and protocol.

  • Select one of the existing templates
  • Click the Edit device template button

/uploads/editing

  • The Device template details dialog will appear
  • Update the template
  • Click Save to complete the process

Duplicate Template

The Duplicate template button is located at the top right in the Details screen of the specific device template.

  • Click to duplicate the existing template

A new dialog will appear requiring you to enter:

  • Device template name (different from the original)
  • Description and protocol

This action will create new device template already pre-populated with the data from the previously opened one (sensors, actuators, alarms and specific configuration).

After you made a duplicate, new template can be freely edited. Each element can be changed, added or deleted.

Delete Template

  • Select one of the device templates
  • Click Delete

  • Confirm deleting to finalise the process