Internet of things (IoT)
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
- Measurement of conditions during transport – with a wireless sensor with its own SIM card, you have all the data on the conditions during transport at your disposal. This allows you to guarantee the quality of the product and the conditions during transport.
- Automatic creation of reports for audits – thanks to sensors measuring temperature and humidity in your warehouse, you can easily prove the conditions under which you store your raw materials during an external audit.
- Monitoring of electricity consumption – given the rising energy prices, you will certainly be interested in how much electricity a certain workplace consumes and whether, for example, some machine is needlessly consuming energy even outside working hours.
- An option to look at the data in a fresh way – are you wondering why on some days you manage to produce more goods in one shift than at other times? Try comparing the production reporting data with, for example, the amount of CO2 in the plant or the temperature. You may discover correlations that would not occur to you at first sight.
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:
- The data is downloaded directly from the device, typically via a network interface (Ethernet or Wi-Fi).
- The data is downloaded from the cloud of the device manufacturer using an API or HTTP requests.
- The data is actively sent to K2 by the device or the cloud through the K2 API.
- 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:
- 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.
- 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:
- HW group s.r.o. (https://www.hw-group.com) – method of communication: 1, 2
- COMET SYSTÉM, s.r.o. (https://www.cometsystem.cz/) – method of communication: 2
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:
- Warehouse
- Zone
- Location
- Vehicle
- Resource (production)
- Serviced device
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:
- A list of all sensors connected to this device.
- Parameters downloaded from the given device and parameters that can be used to define the communication.
- Logs typically showing error events when obtaining data from the device or its cloud.
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:
- A list of measurements recorded for this sensor. In addition to the display in the table, the course of value changes is also shown here in a chart.
- Parameters downloaded from the given device for this sensor and parameters that can be used to define the communication.
- Logs typically showing error events when obtaining data for the sensor.
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.