Internet of things (IoT)

Book Contents

Book Index

General introduction to the module

The Internet of Things is increasingly penetrating manufacturing and wholesale companies. Many things around us today can collect certain data and pass it on. Whether it is temperature, humidity, wear or vibration,   using the Internet of Things (IoT), all of these variables can be measured, responded to appropriately using pre-set processes, and store data for future use.

In addition, it is possible to define links to other modules in K2 for  individual data from sensors and machines . For example, you can monitor the relationship between workplace conditions and employee performance, check if the machine was actually in  operation at  the time the employee entered at the time of production, or automatically create machine maintenance requests. At the same time, you can compare the data with all other data stored in  K2, analyze them and find interesting correlations that are not obvious at first glance.

Book Contents

Book Index

Example of use

Book Contents

Book Index

Method of K2 communication with IoT

Because the whole world of IoT devices is quite fragmented and uses a number of general or proprietary protocols, it is always necessary to first learn K2 to communicate properly with  a given type of device. Therefore, the whole solution is prepared so that it is possible to solve the data download using the K2 script.

Modules for recording equipment and individual sensors are prepared in K2, including storage of measured or otherwise obtained data.

There is also a definition module IoT - Drivers, which defines how to communicate with  the device and part of this driver is a script that further solves the entire communication. The communication as such is then performed by the Scheduled task,  which starts at the required interval and downloads the data according to the properties of the given drivers.

Simply put, there are the following ways that data can get to K2 from the device:

  1. Data is downloaded directly from the device, typically via a network interface (Ethernet or Wi-Fi).
  2. Data is downloaded from  the device manufacturer's cloud using API or HTTP requests.
  3. Data is actively sent to K2 by device or cloud via K2 API.
  4. 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 registering devices in  K2:

  1. If the data is downloaded directly from the device, then it is necessary to create the device in K2 annually and typically assign it at least its IP address. The script then addresses the device during communication and can now download additional information about the device and sensors.
  2. If the data is downloaded from  the cloud or imported, then the device as such can create a communication script directly.

Book Contents

Book Index

Supported devices

Scripts are currently being prepared for the following two IoT suppliers:

Book Contents

Book Index

IoT - drivers

Defines the method of communication with  the device. Therefore, each IoT - Device in  K2 has exactly one driver assigned to it. Here we can name the given Driver and set its property whether it is Enabled. Communication takes place only via drivers that are enabled. It is also necessary to assign a script that will perform the communication and, if necessary, set its parameters. The following pages show all devices that use this driver and the Logs page lists any communication error situations.

Book Contents

Book Index

IoT - DEvices

By device is meant the IoT device itself, which typically collects data from  one or more connected sensors. Each device therefore has its own designation and is assigned IoT - Driver, which is used for communication between it and K2.

It is possible to define links to other modules in K2 directly on the device  and thus define the context for possible further processing and evaluation of data. It is therefore possible to assign the Device  to one of the following modules in K2:

In each of  these modules there is a button for displaying all sensors that belong to the connected device, including the ability to  display the measured data in a simple graph.

Other recorded data relate to information for communication with the device and internal data used for correct data synchronization.

The following pages show:

Book Contents

Book Index

IoT - Sensors

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

As with the device, it is possible to define links to other modules in K2,  on which information about these sensors can then be displayed.

The following pages show:

Book Contents

Book Index

IoT - measurement

The book shows all values for registered IoT - Sensors. It therefore serves for a quick overview of complete data with the  possibility of filtering and wider evaluation of this data.

Book Contents

Book Index

IoT - Parameters

The book shows all parameters for IoT - Device and IoT - Sensors. It is used mainly for the need to make bulk changes over groups of parameters.

Book Contents

Book Index

IoT - Logs

The book shows all logs for IoT - Device and IoT - Sensors.

Book Contents

Book Index

IoT - Data update

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