Book Contents

Book Index

Internet of things (IoT)

Book Contents

Book Index

General introduction to the module

The Internet of Things is increasingly making its way into manufacturing and wholesale companies. Many things around us today can collect certain data and send it on. Whether it is temperature, humidity, degree of wear or vibration, using active elements of the Internet of Things (IoT), all these quantities can be measured, responded to adequately by means of pre-set processes, and the data can be stored for further use.

In addition, links to other modules in K2 can be defined for the individual data from sensors and machines. For example, you can monitor the relationship between workplace conditions and employee performance, check whether a machine was actually in operation at the time the employee entered when reporting production, or automatically create requests for machine service maintenance. At the same time, you can compare the data with all other information stored in K2, analyse it and find interesting correlations that are not obvious at first sight.

Examples of use

Method of communication between K2 and IoT

Since the whole world of IoT devices is quite fragmented and uses a number of general or proprietary protocols, K2 always needs to be taught first how to communicate correctly with the given type of device. That is why the whole solution is designed so that data download can be handled using a K2 script.

K2 contains modules for recording devices and individual sensors, including storing measured or otherwise obtained data.

There is also the definition module IoT – Drivers, which defines how to communicate with the given device, and this driver also includes a script that handles all the communication. The communication as such is then performed by a Scheduled task, which runs at the required interval and downloads the data according to the properties of the given drivers.

Simply put, there are the following options for getting data from devices into K2:

  1. The data is downloaded directly from the device, typically via a network interface (Ethernet or Wi-Fi).
  2. The data is downloaded from the cloud of the device manufacturer using an API or HTTP requests.
  3. The data is actively sent to K2 by the device or the cloud through the K2 API.
  4. The data is imported into K2 using special scripts from files or another database.

Depending on the method of communication, there are then two basic ways of recording devices in K2:

  1. If the data is downloaded directly from the device, the device must be created in K2 manually and typically assigned at least its IP address. During communication, the script then contacts the device and can download additional information about the device and the sensors.
  2. If the data is downloaded from the cloud or by import, the devices as such can also be created directly by the communication script.

Supported devices

Scripts are currently available for the following two suppliers of IoT devices:

IoT - Driver

Defines the method of communication with the given device. Each IoT - Device in K2 therefore has exactly one driver assigned. Here we can name the given Driver and set whether it is Enabled. Communication takes place only through drivers that are enabled. Furthermore, it is necessary to assign the script that will perform the communication and, if needed, set its parameters. The other pages display all devices that use this driver, and any error situations during communication are written on the Logs page.

IoT - Device

A device means the IoT apparatus itself, which typically collects data from one or more connected sensors. Each device therefore has its own designation and an assigned IoT - Driver through which communication between it and K2 takes place.

Links to other modules in K2 can be defined directly on the device, thereby defining relationships for any further processing and evaluation of the data. A Device can therefore be assigned to one of the following modules in K2:

Each of these modules contains a button for displaying all sensors belonging to the connected device, including the option to display the measured data in a simple chart.

Other recorded data concern information for communicating with the device and internal data used for correct data synchronization.

The other pages display:

IoT - Senzors

A sensor is typically a probe connected to an IoT - Device that measures the required parameter. Several sensors can be connected to one device.

As with devices, links to other modules in K2 can also be defined for sensors, and information about these sensors can then be displayed on them.

The other pages display:

IoT - Measurement

The book displays all values for the recorded IoT - Sensors. It is therefore used for a quick overview of the complete data, with the option of filtering and broader evaluation of this data.

IoT - Parameters

The book displays all parameters for IoT – Devices and IoT – Sensors. It is used mainly for making bulk changes over groups of parameters.

IoT - Logs

The book displays all logs for IoT – Devices and IoT – Sensors.

IoT - Data update

This is a non-visual action that triggers communication for all enabled IoT - Drivers and downloads data from the devices and sensors, which it then writes to K2. This action is intended for use in a Scheduled task.