Научная статья на тему 'MODELING IOT SMART HOME NETWORK'

MODELING IOT SMART HOME NETWORK Текст научной статьи по специальности «Медицинские технологии»

CC BY
48
5
i Надоели баннеры? Вы всегда можете отключить рекламу.
Ключевые слова
SMART HOME IOT NETWORK STRUCTURE / MQTT / CLOUD PLATFORM / SIMULATION / ALGORITHMS

Аннотация научной статьи по медицинским технологиям, автор научной работы — Vishnyakou U.A., Chuyue Yu.

The purpose of the article is to present the process of modeling the IoT smart home (SH) network, which combines both user needs and efficiency requirements. The use of Alibaba cloud platform, which reduces complexity and development time, reduces costs, was justified in the project of building the IoT SH network. The structure of this platform is given, its main components are considered and an algorithm for its configuration is given. MQTT is used as an access protocol in the IoT SH network to achieve fast and reliable data transmission. Open source code, reliability, simplicity and other characteristics justify the choice of this data transfer protocol. Modeling of the network IoT SH is based on the knowledge gained in the process of practical implementation. First, the online problems of the system are tested, after the system is able to work after modification and debugging of programs, a street lamp is used as an example to create an instance of an IoT SH network on a cloud platform. The process of creating an example of an IoT SH network is described in detail in steps, in which data from a street lamp is transmitted to a cloud platform, processed there, and then displayed on a mobile device. A mobile phone was used to implement two-way interaction, simulate the sensor of the IoT SH network and display the results. The algorithms for configuring the platform, modeling the sensor and creating an object model of the device of the IoT SH network are given. For some modern control systems, this system is compatible and suitable for a larger number of cases, which contributes to the development of intelligent control in the IoT network.

i Надоели баннеры? Вы всегда можете отключить рекламу.
iНе можете найти то, что вам нужно? Попробуйте сервис подбора литературы.
i Надоели баннеры? Вы всегда можете отключить рекламу.

Текст научной работы на тему «MODELING IOT SMART HOME NETWORK»

M

http://dx.doi.org/10.35596/1729-7648-2022-20-6-78-84 Original paper UDC 339.138

MODELING IOT SMART HOME NETWORK

U.A.VISHNIAKOU, Y. CHUYUE

Belarusian State University of informatics and Radioelectronics (Minsk, Republic of Belarus)

Submitted 29 March 2022

© Belarusian State University of Informatics and Radioelectronics, 2022

Abstract. The purpose of the article is to present the process of modeling the IoT smart home (SH) network, which combines both user needs and efficiency requirements. The use of Alibaba cloud platform, which reduces complexity and development time, reduces costs, was justified in the project of building the IoT SH network. The structure of this platform is given, its main components are considered and an algorithm for its configuration is given. MQTT is used as an access protocol in the IoT SH network to achieve fast and reliable data transmission. Open source code, reliability, simplicity and other characteristics justify the choice of this data transfer protocol. Modeling of the network IoT SH is based on the knowledge gained in the process of practical implementation. First, the online problems of the system are tested, after the system is able to work after modification and debugging of programs, a street lamp is used as an example to create an instance of an IoT SH network on a cloud platform. The process of creating an example of an IoT SH network is described in detail in steps, in which data from a street lamp is transmitted to a cloud platform, processed there, and then displayed on a mobile device. A mobile phone was used to implement two-way interaction, simulate the sensor of the IoT SH network and display the results. The algorithms for configuring the platform, modeling the sensor and creating an object model of the device of the IoT SH network are given. For some modern control systems, this system is compatible and suitable for a larger number of cases, which contributes to the development of intelligent control in the IoT network.

Keywords: smart home IoT network structure, MQTT, cloud platform, simulation, algorithms. Conflict of interests. The authors declare no conflict of interest.

For quoting. Vishnyakou U.A., Chuyue Yu. Modeling IoT Smart Home Network. Doklady BGUIR. 2022; 20(6): 78-84.

Introduction

IoT networks make it possible to implement automation of production processes, management of transport, energy, agriculture, medicine facilities at a new level, create smart shops, smart homes, districts and cities [1].

In accordance with the needs and different technologies, the devices used are selected, and a smart home solution is proposed using cloud platform technology to simulate the implementation of an IB network. To automate the creation of IoT systems, the world's leading companies have developed design tools in the form of IoT cloud platforms [2]. On the basis of a cloud platform, authors will consider the process of modeling the IoT network. To simulate the network IoT SH authors use the scheme that includes a Smartphone (to simulate sensors, communication, display results) and a cloud platform.

Choosing of cloud platform

The choice of a cloud platform for a IoT netwotk is directly related to the entire process of developing. For the IoT networks, cloud platforms have become the focus of attention of large cloud computing manufacturers, in details are given in article [2]. In combination with the requirements for the network modeling of smart homes in this project, Alibaba's IoT cloud platform is explored as the platform of this system. In comparing with better anthers world IoT platforms from Amason, Google, IBM, Alibaba IoT platform has same parameters, but more assessable in Belaeus.

Alibaba Cloud IoT platform is a universal device management platform, specially released by Alibaba Group in September 2009 for developers in the field of the IoT, which allows devices to carry out two-way communication with cloud servers with low latency [3]. Currently Alibaba cloud platform mainly offers three types of cloud services: IaaS, PaaS, SaaS, as well as many product areas such as cloud computing, big data and IoT. Alibaba cloud platform has a high level of security. In 2014 it helped the gaming company to resist the largest DDoS attack in the history of IoT in the world.

When using the platform, users can rely on the platform's powerful device status management capabilities to implement remote device management, and the SDK tool provides large-scale connections to devices without purchasing a server. Alibaba's cloud platform has more than 200 data centers around the world. It supports connecting multiple devices and collecting data from devices with further storage in the cloud.

Alibaba is an integrated platform that integrates capabilities such as device management, data security, and messaging to users. To implement the latter, cloud APIs are used, which are implemented by the server. That's why we chose Alibaba's IoT cloud platform as the basis for modeling the IoT network.

Choosing of transport protocol

MQTT (Message Queue Telemetry Transport ) protocol [4] it is similar to the HTTP protocol, both of which are application layer transmission protocols based on the TCP transmission protocol [5]. But the MQTT protocol can implement the reverse control of the device, at the same time it is data-oriented, and the amount of data is small and simple, so it is used in the process of use (as protocol CoAP - Constrained Application Protocol, which support datagram). A small amount of code can implement remote connection of devices, for example, a connection between some small devices and satellites, which saves traffic and electricity, and management is simple and convenient. Ultimately, the protocol itself has low overhead and high efficiency.

Compared to the HTTP protocol and the DTS protocol, the MQTT protocol has many advantages in terms of protocol standards, so its performance will be better in the Internet of Things environment [6]. MQTT includes the application of several languages, such as PHP, JAVA, Python, C, C#, which can be used on any platform. The protocol transfers data between several devices simultaneously, so it is suitable for the IoT [7-9] and mobile applications [10], which can be applied in many areas, such as smart homes, smart cities and medical care.

After the above analysis and comparison, the MQTT protocol has great advantages over the HTTP protocol, it has been chosen as a transmission protocol in the IoT SH network.

Structure and configuration of the Alibaba cloud platform

The architecture of Alibaba's IoT cloud platform is divided into parts: the IoT Hub, Data analyses, Device management, Rules engine and Security authentification, as shown in Fig. 1.

Let's consider the structure and functioning of the Alibaba IoT cloud platform [4]. The IoT hub is responsible for access to devices; the device management function provides management of the device lifecycle, object model, etc.; the rules mechanism is used for further processing of data downloaded from sensors.

ffoKmfíbiErYHP Doklady BGUIR T. 20, № 6 (2022)_V. 20, No. 6 (2022)

Fig 1. IoT Platform Architecture

The security authentication module is the main link in ensuring the security of the IoT, when a device is connected to the IoT platform, authentication information and security certification are required. Access to the device is supported by the following points.

1. The device-side code provides guidance on cross-platform migration and allows businesses to access devices based on multiple platforms.

2. Availability of MQTT and CoAP communication protocol devices in the SDK, which not only meet the requirements of real-time exchange with long connections, but also support the requirements for low power consumption with short connections.

3. Providing NB-IoT, LoRa and other various solutions for access to network equipment for access control problems to heterogeneous enterprise network equipment.

Devices can use the IoT platform for bidirectional communication with the cloud via the IoT Hub. The IoT platform provides upstream and downstream channels between devices and the cloud, providing stable and reliable support for device reports and issuing commands.

Device management requirements for the IoT platform is the following.

1. Providing device announcement function, registration support, function definition, scenario analysis, online debugging, remote configuration, firmware update, remote maintenance, real-time monitoring, group management and device removal.

2. Providing an object model of the device to simplify application development.

3. Availability of online and offline notification of equipment changes, which is convenient for obtaining the status of equipment in real time.

4. Providing data storage capability, which is convenient for storing and accessing massive device data in real time.

5. Support for OTA (over the air) updates, allowing remote hardware updates.

6. Provide a device shadow caching mechanism to separate the device from the application and solve the problem of unreliable communication in an unstable wireless network.

Security support (sensor authentication):

1. Providing a device authentication mechanism using one machine and one password, reduce the risk of device hacking and is suitable for devices that have the ability to pre-distribute identification keys in batches and write them to each chip. High level of security.

2. Providing pre-recording of a device with one type and one density and receiving data during authentication.

Communication security capabilities.

1. Support for Transport Layer Security (TLS for MQTTYHTTP), Datagram Transport Layer Security (DTLS for CoAP) data transmission channels to ensure confidentiality and data integrity, suitable for devices with sufficient hardware resources and not very sensitive to power consumption.

2. Availability of user-defined symmetric data encryption channels over TCP (MQTT) and UDP (CoAP), which are suitable for devices with limited resources and power consumption

3. The presence of a device management mechanism to ensure secure communication between it and the cloud platform.

4. Maintain isolation of communication resources at the device level (THEMES, etc.) to prevent problems such as unauthorized access to the device.

The platform's rules engine analyzes the forwarding data using the following algorithm.

1. Setting up rules for implementing communication between devices and fast implementation of M2M scenarios.

2. We redirect the data to the message queue (MQ) to ensure the stability and reliability of the uplink data of the consumer device of the application.

3. We redirect the data to the table storage to provide a joint solution: device data collection and structured storage.

4. Redirecting data to streaming computing to provide a joint solution: device data collection and streaming computing.

5. We forward the data to the TSDB database to provide a joint solution: collecting equipment data and storing time series data.

6. We redirect data to functional calculations to collect data about equipment and events.

After connecting the device to the Internet of Things platform, the data is transmitted directly to the platform server via the HTTP/2 protocol. At this step, we will configure the subscription function on the HTTP/2 server side. The server can receive device data by connecting to HTTP/2 via the SDK.

Simulation of the IoT SH network using the Alibaba cloud platform

Let's simulate the sensor. The first step in using the IoT platform is to create a product and the corresponding device in the cloud platform and obtain a device certificate (ProductKey, DeviceName and DeviceSecret). A street lamp is used as an example of a SH network sensor for modeling. Let's describe the algorithm for modeling the device.

1. Create an account and log in to the cloud platform console.

2. In the upper-left corner of the console, select the region where the Internet of Things platform is located, and then click "Public Instances" on the instance overview page.

3. On the left navigation panel, select Device Management > Products and click Create Product.

4. On the New Product page, after setting the parameters, click OK. The product name in the example in this section is a street lamp, and the category it belongs to is a custom category. Default values are used for other parameters.

5. On the Product Creation page, click the Go button to add the device.

6. On the Device List tab, click the Add Device button, enter the device name (DeviceName) as device2, set the note name as device 2 and click OK.

7. After successfully creating the device, in the pop-up dialog box "Add Full", click the "Copy device certificate with one click" button to get the device certificate. On the device details page, click View on the right side of DeviceSecret to get the device certificate. The device certificate contains the ProductKey, DeviceName and DeviceSecret components, which are an important authentication for the device when communicating with the IB cloud platform.

The Alibaba platform supports the definition of an object model for a product, abstracting the actual product into a data model consisting of attributes, services and events, which facilitates cloud management and data interaction. After creating the device, we will execute the algorithm for creating an object model, the device within the product will automatically inherit the contents of the object model.

1. Log in to the console of the IoT cloud platform

2. In the upper-left corner of the console, select the region where the platform is located, and then on the Instance Overview page, click Public Instances.

3. On the left navigation panel, select Device Management > Products. In the list of products, we will find the created product for street lighting and click "View" on the action bar.

4. On the Product Details page, go to the Function Definitions tab, and then click Edit Draft.

5. In the default module, on the Function Definition page, click the Add Custom Function button, configure the object model, and then click OK. We will install the main light switch and the operating current properties of the street lighting device, as shown below. Fill in the page.

6. After creating the full object model, you can click the TSL of the object model, and on the "Full Object Model" tab you can see the full JSON file of the product object model.

Click the release button in the lower left corner of the page, the "Online Release Model" dialog box will appear, click "Add Release Notes" and enter the version number or version description, click "OK" to view the model.

The algorithm for connecting the sensor to the platform:

1. On the Device page, click the "Add device" button.

2. In the "Add Device" dialog box, enter the device name: LightSwitch. Then click the Confirm button. Let's prepare the development environment.

3. Configure the file parameters in the project.

4. Click the "Form" button to complete the compilation of the project.

Performing a device simulation on a smartphone includes steps.

1. After the project is compiled, click the "Start" button to launch the project, the demo program is successfully launched on a virtual device, the device is connected to the Internet of Things platform.

2. Click on the "Mqtt Example" button.

3. On the Mqt example page, after setting up the theme, click "Subscribe".

4. After a successful subscription, we will return to the platform. On the List of Topics tab of the device details page, click Publish message on the control panel of the subscribed topic and enter the message input field in the Publish Message dialog box, enter a message, for example: Hello, world!, to simulate sending a message from the Internet of Things platform to the device.

5. On the "Mqtt Example" page, click the "Publish" button.

6. In the left navigation panel, select "Device Management > Device", find the device and view its status. If the device status is displayed as online, it means that the device is successfully connected to the platform.

7. In the navigation bar on the left, click on the menu "Monitoring Operation > Registration Service", select the product "night light switch" and view the logs of the device's Internet access, subscriptions to topics and reports.

Results and its discussion

After the project was compiled, clicked the green triangle button to run the project, As shown in the Fig.2., the demo program ran successfully in the virtual device, and the device was successfully connected to the IoT platform.

Object Model Access Example

Device label

COTA

device shadow

Gateway Access Example

OTA example

Mqtt example

H2 file upload example

mqtt log real-time upload

initialization

deinitialization

The device will be reset, and the app will be exited svhen finished

Fig. 2. Virtual phone show sub-page

After the topic was subscribed successfully, returned to the IoT platform. On the Topic list tab of the device details page, clicked Publish Message in the operation bar of the subscribed Topic, and then entered the message input field in the Publish Message dialog box, input a message as shown in Fig.4., for example: hello world!, to simulate sending a message from the IoT platform to the device.

iНе можете найти то, что вам нужно? Попробуйте сервис подбора литературы.

Clicked on the Mqtt example, on the Mqtt example page, after set the Topic, clicked Subscribe as shown in Fig. 3, 4.

Fig. 3. Subscribe page

Fig. 4. Entered a message

On the Mqtt example page, after set the topic of the message to be published, clicked Publish, On the left navigation bar, selected Device Management > Device, found the device, and viewed the device status. If the device status was displayed as online, it means that the device is successfully connected to the IoT platform. In the navigation bar on the left, selected Monitoring Operation > Log Service, selected the night light switch product, and viewed the logs of the device going online, subscribed to topics, and reported messages as shown in Fig. 5.

Fig. 5. The mobile phone received the message sent by the platform

Conclusion

1. Alibaba IoT cloud platform has been selected as a cloud server for the IoT network project. Based on this cloud platform, the process of modeling the IoT network is considered. When modeling the IoT network, the structure was used that includes a smartphone (to simulate sensors, communication, display results) and a cloud platform. The use of Alibaba cloud platform, which reduces complexity of development process, was justified in the project of building the IoT smart home network.

2. The structure of the Alibaba IoT cloud platform is given, its main components are considered and the algorithm of its configuration is given. MQTT is used as an access protocol in the IoT network to achieve fast and reliable data transmission. As a sensor, a street lamp was used to create an instance of an IoT network on a cloud platform. The process of creating an IoT network is described in detail in steps, in which data from a street lamp is transmitted to a cloud platform, processed there, and then displayed on a mobile device. A mobile phone was used to implement two-way interaction, simulate the sensor of the IoT SH network and display the results. The algorithms for configuring the platform, modeling the sensor and creating an object model of the device of the IoT SH network are given. Results were shown.

References

1. Roslyakov A.V., Vanyashin S.V., Grebeshkov A.Yu. [Internet of Things]. Samara: PGUTiI; 2015. (In Russ)

2. Vishnyakov V.A. [Platforms for the development of Internet of Things networks]. Bulletin of Communications. 2021;2:62-65. (In Russ)

3. Analysis of the Advantages of China's Five Internet of Things Platforms. Internet of Things Technology. 2018;8(04):3-4.

4. Shuqing J., Ying F. A data acquisition control system based on MQTT protocol. Information and Communication. 2019;37(08):80-82.

5. Yao D., Xie X.S., Yang J.J. Research and Implementation of Internet of Things Communication System Based on MQTT Protocol. Information Communication. 2016;(3):33-35.

6. Luthfi F., Juanda E., Kustiawan I. Optimization of Data Communication on Air Control Device Based on Internet of Things with Application of HTTP and MQTT Protocols. Materials Science and Engineering. 2018, July: 1-9.

7. Amnalou S., Bakar K.A.A. Lightweight security mechanism over MQTT protocol for IoT devices. International Journal of Advance Computer Science. Application. 2020;11(7):202-207.

8. Hussein N.A. Shujaa M.I. DNA computing based stream cipher for internet of things using MQTT protocol. International Journal of Electrical and Computer Engineering. 2020;10(1):1035-1042.

9. Jingang Yu. Research on key technologies of converged communication based on IMS. University of Chinese Academy of Sciences (Shenyang Institute of Computing Technology, Chinese Academy of Sciences). 2018: 1-13.

10. Chen S.L, Lee K.M., Li I.C. Using MQTT IIo T gateway to implement bi-direction communication manufacturing information system for smart factory. Journal of the Chinese Society of Mechanical Engineers. 2020;41(5):585-594.

Authors' contribution

All authors have equally contributed to writing the article.

Information about the authors

Vishnyakou U.A. - Dr. of Sci. (Tech.), Professor, Professor at the Department of Infocommunication Technologies of the Belarusian State University of Informatics and Radioelectronics.

Yu Chuyue - M. of Sci. at the Department of Infocommunication Technologies of the Belarusian State University of Informatics and Radioelectronics.

Address for correspondence

220013, Republic of Belarus, Minsk, P. Brovki St., 6, Belarusian State University of Informatics and Radioelectronics; tel. +375 44 486-71-82; e-mail: [email protected] Vishniakou Uladzimir Anatolievich

i Надоели баннеры? Вы всегда можете отключить рекламу.