The first step in creating device is to clearly define its template.
Template is a placeholder for a device and it enables you to 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 where you can choose between two options. After you have chosen, fill in the requested fields.
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 (MQTT, LoRa TTN, Tele2 Jasper)
- Protocol (format of the message; the available exchange protocols at the moment are: JSONsingle, JSONmulti, JSON and WolkSensor)
Each device can include sensor, actuator and alarm.
The next step is to add a 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.
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 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 reading type feature, please check chapter Reading Types/Measurement Units/Unit Conversions.
- 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. Depending on data, select minimum 1)
- 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)
- Entering all data, and click Create
Note: It is possible to add all the sensors that are already on a device.
Actuator allows user to switch devices on and off, set up a value of a feed, or send an actuation value to a device.
To connect the actuator, click the button 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 actuator; for example, an ON/OFF switch that may control A/C)
Note: Reading type for actuator is marked!
- Data type (e.g. it can be NUMERIC, STRING or BOOLEAN for a different type of an actuator)
- Data size (represents the amount of data coming from the device actuators. Depending on 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.
Alarm represents an occurrence of an event detected by a device. It enables the device to alert the Platform of some alarming situation (problem or specific device condition) occurred.
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. Upon receiving alarming event, the Platform will perform actions, 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 (represents a 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 - it requires an immediate fix)
After clicking Save button you will finalise the process, and the template will be listed on the Device templates page.
Apart from adding all the sensors, actuators, and alarms, you have 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:
- Parameter name
- Description (giving more details about configuration parameter including meaning and unit if it exists)
- Reference (unique parameter identifier for a device used as a contract with the Platform when exchanging data, meaning that device has to be configured to send the data with the same parameter reference, e.g. T)
- Data type (defines the type of data coming from the device. Depending on the data select one of the following: BOOLEAN, NUMERIC and STRING)
- 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 (,))
- Click Create
- Minimum (value used for numeric data type validation only; defines minimal valid value)
- Maximum (value used for numeric data type validation only; defines maximal valid value)
- You have created your device configuration
The Import template button is located at the top right corner within Template info. It is one of the options that 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 template button as shown below
- Within the List of items select one or more templates and selected items will show on the Import list
- Click the Import button
- Enter the name of the merged templates in the Device template name field
- 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 along with other templates and it can be easily found within the Search template field.
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
- The Device template details dialog will appear
- Update the template
- Click Save to complete the process
The Duplicate template button is located at the top right in the details page 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 have made a duplicate, the new template can be freely edited. Each element can be changed, added or deleted.
- Select one of the device templates and click Delete
- Confirm deleting