Keywords

1 Introduction

In recent times, real-time environment monitoring has become significant for many applications and maintenance of specific devices at a particular environmental condition. In relation to this, temperature and humidity are two crucial constraints on such systems, and hence monitoring these, in particular, becomes significant. Such monitoring is used in devices such as heating, ventilation, air conditioning systems, equipment management to maintain the machines at specific environmental conditions etc. On the other hand, these data are also used in weather stations and smart power grids [9] for predicting weather and generating renewable energy, respectively.

Technology has helped a lot to ease the complexity of monitoring the environment in real-time. One such technology is cloud computing. Cloud Computing is playing a significant role in relation to IoT systems [17, 27,28,29]. It is an easy and convenient way to store data, access the data remotely and even analyze it. Cloud resources consist of servers and storage that can be quickly released with no or less management and service provider interaction [1].

Here, for practical implementations, we have used IoT devices, i.e. NodeMCU and DHT11 sensor. We have used the ThingSpeak cloud services [13] for data storage and analysis purposes. ThingSpeak is an IoT analytic cloud platform service for live stream aggregation, visualization and analysis in the cloud. ThingSpeak1 can be interconnected to any user interface for easier access to data and data visualization. The implementation of IoT solutions using ThingSpeak is depicted in Fig. 1. Privacy and security [11] of the data gathered from these connected IoT devices play a vital role with no margin for errors, as most of the task involved here will be mission-critical. Henceforth, we use symmetric-key block cipher Advanced Encryption Standard algorithm for data security in the IoT sensor data collected.

Fig. 1
An illustration of the interactions between data aggregation and analytics, smart connected devices, and algorithm development sensor analytics connected with double-headed arrows.

IoT solution using cloud (https:www.thingspeak.com/pages/ learn more)

This paper consists of details of practical implementation of IoT solutions for detecting temperature and humidity using the ThingSpeak cloud platform. Furthermore, we will be discussing the related work, proposed system, implementations and results. The final section will consist of concluding remarks.

2 Motivation and Contribution

Real-time environment monitoring systems are beneficial in industrial applications where constraints like temperature and humidity significantly impact product quality and lifespan. The real problem of these environmental constraints arrives during shipping and warehousing. With the current situation of the pandemic and the need to keep the vaccine at a specific temperature and monitoring the temperature is essential. The implementation of the project is applicable in:

  • Humidity and Temperature monitoring Laboratories.

  • Food Safety.

  • Warehouse and Inventory Management.

  • Shipping vehicle temperature during the transport of goods.

  • Special equipment management where certain devices must be in certain environmental conditions.

  • Accessible from remote locations.

The main contribution of this research paper are as follows:

  • We design and develop an intelligent and secure real-time environment monitoring system for collecting real-time data from sensors to the ThingSpeak cloud platform and notify the same through a mobile application.

  • We also integrate AES encryption and decryption technique for data security in the cloud platform

3 Related Work

Cloud computing has been widely used in various aspects, and domains like Fog computing [4] Artificial Intelligence in different big data fields like health, sports and web services [7, 15, 18, 19, 20], etc. Likewise, IoT with cloud computing strategy has its benefits in Industry 4.0 applications [21]. In this section, we discuss some related works with respect to the usage of IoT and cloud computing in real-time environment monitoring systems.

Armbrust et al. [9] in their research paper explained about the assimilation of the future technology called Smart grid. The main requirement of smart grid is an efficient and robust hardware i.e. resources and storage. The technology used is cloud computing to integrate resources and provide storage. Chen et al. [3] have put forward their research on smart grids using cloud computing technology for security, storage and faster computations with a design idea on achieving such systems. The idea is a cloud computing intelligent data device with cloud service, security, data integrity checks and high storage. The main focus is the data collection using the device. S Thilaga et al. [25] investigated the increasing complexity of the power meter, which is made of many sensors, and its service requirements of security, reliability and efficiency. It briefs about using a trustworthy cloud, i.e. (Tclouds), to reduce hardware issues and improve protection.

R Sonawane et al. [21] in their research work, have conducted testing of the developed temperature and humidity monitoring system at various locations of their college campus to monitor plant growth and cope with the agricultural changes. Here, the monitoring system was developed at a low cost, and the system showed a percentage variation of 0 to 8\% for temperature and 0 to 5.97\% for humidity. Also, accuracy for the same was measured. Utomo et al. [26] proposed a cost-effective system to monitor the two parameters, i.e. temperature and humidity for server rooms. It is an IoT system that is capable of providing details regarding the changing temperature and humidity continuously. The system is connected to the cloud, and data is sent whenever the temperature is read. The proposed idea uses Microsoft Azure as the cloud service provider for storage, computations and security. The authentication of users is performed, and the telegram application is used to send notifications to the users.

Sumarudin et al. [24] proposed a system to monitor the soil status. The system prominently collected data collection and monitored the data to help increase the soil quality. The data is contained in the form of tables and stored in the cloud. Rathod et al. [12] implemented a real-time environmental monitoring method to achieve optimal efficiency and accuracy of collecting real-time data of temperature, humidity and moisture of the soil. A mobile app was developed with farmers as the end-users to help them in increasing yield by providing the correct environmental conditions information.

P Avula [2] says that the countries in the Tropical regions reflected significantly less death percentage due to covid-19. In the same way, the recovery rate is high in the countries of Tropical areas ranging from 88 to 99\%. It is observed that the subtropical countries' death rate is relatively high compared to the Tropical regions. It can be predicted that the low temperature has facilitated the survival and the spread of Covid-19 in the Subtropical region when compared to that of the Tropical region. Mecenas et al. [8] in their research work, have discussed how the change in the climatic condition affects the spread of the coronavirus. It was observed that in extreme temperature, the spread was minimal. This was supported by statistics and its analysis.

The above literature review provided us with the significance of IoT and Cloud computing in the various real-time environmental monitoring system. This implied us to design and develop a cost-effective intelligent and secure real-time monitoring application using IoT and cloud computing. Our proposed system can be used for a wide variety of applications like health, food safety, smart grid, goods transportation, etc.

3.1 Summary of the Literature

We have summarized the overall literature survey in the Table 1.

Table 1 Summary of the Literature Review

4 Proposed Methodology

The proposed system is an IoT device, a real-time environment monitoring system primarily focusing on temperature and humidity constraints. The system setup is connected to the ThingSpeak cloud, and in turn, the cloud is connected to the user interface. The IoT device consists of sensors that will collect data and send it to the ThingSpeak cloud for storage in real-time. This real-time data sent to ThingSpeak is then read by the mobile App created using MIT-App inventor [6].

Figure 2 shows the architecture of the proposed system. It consists of three main modules. The first module is the IoT sensor Layer consisting of a DHT11 sensor, a temperature and humidity sensor; the sensor is connected to the NodeMCU, which has an inbuilt WiFi module connected to the next module (i.e., Cloud Computing Platform). The NodeMCU has a flash memory where AES encryption takes place, which is a security technique. The encryption takes place in flash memory, and decryption occurs when the data reaches the WiFi module from the second module, i.e., a Cloud computing platform using ThingSpeak cloud. A detailed explanation of AES working is given further in the section. At the top layer, the mobile application then reads the data from the ThingSpeak cloud and displays it for the user’s view.

Fig. 2
An illustration of the architecture of the real-time environment. It explains the exchange of data between the mobile application and the cloud computing platform through the internet. The I O T sensor layer comprising node M C U and D H T 11 is connected to the cloud computing platform through the Wifi.

Proposed Architecture of an intelligent and secure real-time environment monitoring system

4.1 Advanced Encryption Standard for Data Security

The Security of the data is provided in the device’s flash memory using the Advanced Encryption Standard (AES) algorithm. AES algorithm is a symmetrical key cipher block algorithm. Here, AES128 has been used, which means that it can convert data into 128 bits cipher blocks.

Algorithm 1: Advanced Encryption Standard Algorithm

  • START

  • Step 1: Byte substitution

  • There are predefined substitution boxes which are rules for the block text bytes.

  • Step 2: Row shift

  • Exclude the first row and shift every other row by one.

  • Step3: Column mixing

  • the cipher data is jumbled by mixing the columns.

  • Step 4:Addition of round key

  • XOR of data with the key.

  • STOP

AES is proposed in various modes. Here, we have used AES Cipher Block Chaining (CBC) which uses the following formula where Eq. (1) is for encryption, where EK represents the block encryption using the symmetrical key, and Ci-1 is the cipher for Bi-1. Eq. (2) is for decryption where DK is the block description using symmetrical key k

$$ {C}_i={E}_K\left({B}_i\right)\oplus \left({C}_{i-1}\right) $$
(1)
$$ {B}_i={D}_K\left({C}_i\right)\oplus \left({C}_{i-1}\right) $$
(2)

5 Experimental Setup and Results

The implementation setup architecture of the proposed intelligent and secure real-time environment system using IoT and cloud computing is shown in Fig. 3.

Fig. 3
A diagram illustrates the flow of processes from the D T H 11 sensor through the Node M C U, a device with wifi, and the think-speak cloud before reaches the mobile app.

Implementation setup flowchart of the proposed Real-time environment monitoring system

5.1 Hardware Implementation

The major components are NodeMCU and DHT11 sensor (see Fig. 4.). The Vcc and GND of DHT11 is connected to the Vcc and GND of NodeMCU respectively. The data of DHT11 is connected to D3 of NodeMCU (See Table. 2. for components). The USB cable is connected from NodeMCU to the COM port-3 of the system with WiFi connectivity. NodeMCU consists of WiFi module ESP8266 which connects the hardware to the ThingSpeak cloud using WiFi. (See Fig. 3.). The hardware is programmed in Arduino IDE. The board used is NodeMCU-ESP (see Fig. 4).

Fig. 4
2 magnified photographs of the hardware components of the node M C U and D H T 11 sensor.

Hardware Components requirement. (a) NodeMCU, (b) DHT11 Sensor

Table 2 Component requirements

Detailed circuit connections and the experimental setup of the proposed real-time environment system is depicted in Fig. 5. The header files like AES.h, DHT.h, ESP8266WiFi.h and ThingSpeak.h needs to be installed and included. The SSID and password of the WiFi must be specified. ESP8266 module should be programmed in the setup function for accessing the WiFi connectivity. The sensor should read the temperature and humidity values, encrypt the data and decrypt it as soon as the data reaches the cloud in the loop function. ThingSpeak is connected using the Write API key and channel ID.

Fig. 5
2 magnified photographs of the detailed circuit connection and the experimental setup of the real-time environment system.

Detailed Circuit connection and the experimental setup of the proposed system. (a) Detailed Circuit Connection, (b) Proposed experimental setup

5.2 ThingSpeak Cloud Platform and Mobile Application

The sensor data is stored in the ThingSpeak database. Two parameters are considered and are collected in every iteration: Temperature in Celsius and Humidity in %. The data is stored in the public channel of ThingSpeak for everyone to view the data on a daily basis. The data can be retrieved in .CSV, .XML and .JSON formats. The data can be accessed altogether, or just the recent data or just temperature data and so on. The write API key allows the hardware to store the data, and the read API key allows the user interface (Mobile App) to read the data (See Fig.3.). Using the widgets, we can see the real-time data for checking the correctness of the sensor reading. For analysis and visualization purposes, various graphs can be plotted.

The ThingSpeak is then connected to the mobile app. The mobile app is made using MIT App inventor. The code uses the channel ID and Read API key of ThingSpeak to read the data and visualize the same through the graphs. Thus, the mobile application provides a detailed analysis of the humidity and temperature data collected in real-time and provides a visualization of the same through the graph-based representation. (See Fig. 6).

Fig. 6
A screenshot of a mobile screen represents 2 graphs denoting the trend temperature at the top and humidity at the bottom during different times of the day. The lines in both graph progress with multiple peaks and throughs.

Mobile application providing the detailed analysis of the humidity and temperature data

5.3 Result Analysis and Discussion

The final implementation of the setup leads to hardware connecting to ThingSpeak cloud, and in turn, it is connected to the mobile app. In total, 641 temperature and humidity data have been collected over a week. A sample of the result is shown in Table. 3. The table consists of four fields, namely created_at, entry_id, field1 and field2. The field ‘created\_at’ gives the date and time in Indian Standard Time, ‘entry_id’ is the id assigned to every value stored in the cloud. field1 represents the temperature value in degree Celsius, and field2 is the humidity value in percentage.

Table 3 Sample Results

In our proposed work, we designed and implemented a cost-effective real-time environment monitoring system to collect the temperature and humidity. This system is secure as it uses one of the best encryption scheme (i.e., AES) for encryption and decryption of the data collected and stored in the Thinkspeak cloud platform. The data collected can be analyzed and visualized through a mobile application designed by us. This overall proposed system can be utilized in various industry 4.0 application to recommend and provide automatic notification about the machines or devices used in the industry.

6 Conclusion and Future Work

Intelligent and secure Real-time environment monitoring IoT system is a critical IoT solution for various fields of the power industry, heating, air conditioning, smart power grids etc., based applications. We have considered temperature and humidity as parameters for the implementation. Cloud computing is an essential aspect for the above applications in terms of storage, security, integrity and access to the data anywhere. We have done a practical implementation of storing the real-time environmental constraints' data with security using one IoT DHT11 sensor. If we were to use millions of such IoT systems together connected to the cloud, there would be more significant improvements and innovations in the field of renewable energy production, smart power grid, environmental monitoring, equipment management, etc. These innovations would be beneficial economically and environmentally.

In future works, the system can be upgraded to a web-based application using the GPRS technique and MQTT protocol for security. This will not only help in a remote place but also boost the system for monitoring larger area. Along with temperature and humidity, other parameters like pressure using the barometric sensor, different components of air to check air quality etc., could be integrated into a single system and stored in the cloud for better analysis. Further, the Artificial Intelligence-based techniques can be applied to the data collected and can provide the recommendation system to various industry 4.0 applications by predictive analysis.