IoT based implemented comparison analysis of two well-known network platforms for smart home automation

Received Apr 2, 2020 Revised Jun 20, 2020 Accepted Aug 10, 2020 The developments of the internet of things (IoT) technologies fascinated the universe and provided great opportunities to introduce these innovations in smart house networks. Smart home automation is highly required these days. Smart home automation is a collection of electronic devices connected to monitor and control in the market home appliance remotely. However, it is still needed to design a friendly and reliable system since the system mainly depends on the devices used and the environment of the network. NETPI and BLYNK are IoT frameworks used for hardware-agnostic with smartphones, websites, private clouds, system security, data mining, and deep learning. The results confirmed that NETPI provides flexibility to deal with several NODEMCU controllers in a single control framework. The proposed system shows its applicability in monitoring and controlling home appliances remotely.


INTRODUCTION
Every minute in human life is on the rise needed to use the web and smart devices, where the network has become an essential part of life and being used widely all around the universe [1]. Nowadays, Controlling and monitoring smart houses in using Wi-Fi-based smartphones is the point of argument in this article. Indeed, the whole operation needs to be performed via robust and unique developed Microcontrollers, which act as a gateway to the internet [2,3]. These tasks can be done either automatically or manually and both dependent on the sensors of the system [4,5]. Automatically, the devices depend on the sensor being read and can make their own decision to run the system. In contrast, the use of smartphones or network sites used to control the system manually as long as the user is online [5,6]. Internet of things (IoT) is a new version of the web (network) that facilitates communication between devices that are linked to each other using the protocols of the internet [7,8]. These procedures include various tools, cameras, sensors, and software. This interpretation goes beyond the conventional concept of human beings Communication through computers and devices over a single global network and through a well-known conventional internet protocol [9,10].
The assumption that recognizes IoT is that it allows a person to be disconnected from a location, which ensures that an individual can access the devices without the need to be in a particular place to deal with a specific device [11,12]. However, there are still some countries that suffer from unstable electricity or water supply that need people to stay home and wait for the right time to power on home appliances,  [14]. Thus, the need to monitor and control home appliances remotely is highly needed in such a situation. In this paper, Smart home automation is designed and tested to overcome challenges in Iraq, such as water distribution, rationalization of electricity consumption and building security to improve the quality of life and comfort. The rest of this paper as follows. Section 2 explains the literature review. Sections 3 and 4 demonstrate the system architecture and the methodology, respectively. Section 5 explains the results. Finally, the conclusion is explained in section 6.

LITERATURE SURVEY
Smart homes based on IoT technology are becoming more and more popular. Recently, several studies have been proposed different designs. [15] Recommended how to track the health treatment of the individual (BP, pulse rate, heart rhythm, temperature) and inform the doctor whether an abnormal condition decreases or enhances shifts. People at risk can be tracked using an alarming device, so according to this initiative, anytime there is a rise or decline in health care (BP, pulse rhythm, heart pressure, temperature) it can be controlled using a DHT11 sensor and is alerted using an alarming device or warning sensor. Furthermore, in [16], they developed a system that gives the consumer the ability to either monitor their household appliances by application or by using voice commands. This allows users the ability to automate their home without the need to buy expensive smart devices; other innovations can be made to this initiative, by replacing the switch with the Wattmeter & Electric control package [17]. The manual electrical control can be triggered automatically and the energy logging is not always reliable since ESP8266 ESP-12F has only 1 ADC, implying that it can only use currently. At the same time, the voltage is stated statistically in the software panel. The new approaches to measure the temperature and the humidity were developed, as explained in [18].
The author added the DHT11 sensor to the IoT based smart window. This provides the window process with an efficient solution. For schools, orphanages and smart cities, this will be very beneficial. It is liable for the normal maintenance of the room temperature. The Arduino is linked to the Bluetooth network. All the devices can be operated with the Arduino. However, to link to the Bluetooth, it has to be within a short distance [19]. Moreover, in the field of a smart home system that uses WSN to monitor/control data, the solution is discussed and explained for the house automation system based on IoT, which focused on the transportation of hardware, software, and data [20]. The solution they gave is that the system's main application is run on the computer, which is located at home, connected to the sensors of the household appliance to collect data and to be the central device of the system which is connected to the server. The home automation program that has been built can be operated either by a web application or by a Chabot [21].
However, since the text Chabot is used instead of the voice Chabot, the user needs to input commands manually, which not only takes more time but is also not easy for the user. P. S. N. Reddy, et al. [22] has implemented a home maintenance and security system. This paper focuses primarily on addressing the daily problems faced by people in Nepal, where regular power cut-offs, unmanaged urbanization, lack of manpower in irrigation and fisheries are apparent. Most researchers used network clouds such as BLYNK Framework, which can be configured easily by IOS or Android apps to control Arduino, Raspberry Pi and the other microcontrollers that work over the internet. Moreover, NETPI framework can be the optimum choice to fulfill the specifications. NETPI is almost similar to BLYNK except with a bit programming complication than BLYNK.

SMART SYSTEM ARCHITECTURE
The cornerstone of today's project is the wi-fi compatible board that needs no introduction; the NodeMCU development board based on the ESP8266. It is an open-source framework to produce WiFi-based embedded systems and is based on the popular ESP8266 wi-fi module running the Lua based NodeMCU firmware [22,23]. ESP8266 NodeMCU is as shown in Figure 1(a). Furthermore, the temperature/humidity sensor shown in Figure 1(b) is known as DHT. It is measuring the values of (T) and (H) delivering compatible advanced yield. DHT is a low-cost optical temperature and humidity sensor. This sensor can be conveniently attached to any microcontroller such as Arduino and Raspberry Pi.
In order to measure humidity and temperature instantaneously, the sensor is considered reliable and stable due to the exclusive digital signal and data realization-based temperature/Humidity sensing module. It gives unwavering high quality and long-haul dependability [19,24]. The relay module is an electrically operated device that can be turned ON or OFF, let the current move through or not, and can be managed at low voltages, such as the voltage provided by the NODEMCU. Managing the Arduino relay module is as easy as managing any other output, as depicted in Figure 1(c). The sun delivers its energy to us as heat and light. There are two main types of solar power systems, namely solar thermal systems that trap heat to warm water and solar photovoltaic systems that directly convert sunlight to electricity as shown in Figure 1(d).
When the photovoltaic modules are exposed to sunlight, they generate direct electricity (DC) [25,26]. Besides, the SnO2-based gas liquefied petroleum gas (LPG) displays mild conductivity in clean air. Figure 1(e) shows the sensor module that the conductivity is directly proportional to higher levels of gas for propane, LPG, hydrogen, methane, and the other steam. The sensitivity of the MQ-2 sensor is considered extremely high. In addition, the module's cost limitations are acceptable for different applications [27,28]. The VH heater voltage provides the sensor with the working temperature, while VC discovers the voltage over the load resistance VRL. The efficiency of the proposed sensor can be increased by using a reasonable RL to fulfill (1) [27].
Where, Ps: Sensitive power of the body, Vc: Loop voltage, Rs: Sensing resistance, RL: Load resistance. For more clarity, Figure 1(e) depicts the proposed module and schematically. PIR sensor is the abbreviation derived from "Passive Infrared" or "IR motion." The proposed sensor is considered low-cost, easy to implement, small and low-power consumption. The PIR module consists of a pyroelectric sensor that measures the infrared radiation levels. In addition, the sensor is made in two different parts. This technique of development is carried out because the sensor aims not only to detect the corresponding motion but also to detect the levels of infrared radiation. It is worth mentioning that each half will finish each other so that if one-half senses low IR radiation, the performance can switch high or low as shown in Figure 1(f). Finally, an anemometer is a device used to calculate wind speed and is famed to be an efficient instrument for the weather station, as shown in Figure 1(g). The anemometer is designed for outdoor equipment to pass the signal to the microcontroller easily.
Nonetheless, most research papers and initiatives are not incorporating such a responsive feature as the wind speed sensor suggested. This sensor is the main feature combining the characteristics of the weather station. In this study, wind speed is calculated, processed and shown directly through BLYNK platform in the specified location with respect to provide the module by (9 -12)V external voltage [30].

METHODOLOGY
In this section, the devices will be connected using Internet service, linking the sensors to the nodes and controlling these devices remotely such that the smart system was built to carry the tasks of this research out. Two kinds of network platforms were utilized to control the NodeMCU that is used to monitor the household devices. One of these platforms is the BLYNK, which is one of the phones systems-based network control platforms with a restricted number of active microcontrollers in single project design (GUI). Under this act, only one controller can be programmed with BLYNK to satisfy the specifications of a subsystem. Depending on this assumption, NETPI platform can be the optimum choice due to its ability to customize several microcontrollers' connectivity with respect to programming methodology. The supervision processes on the entire sub-models shown in Figure 2.

NETPI based NODEMCU1
In this work, the connection of each NODEMCU differs from each other. Each NODEMCU will be assigned to perform a specific task. NODEMCU1 controls the quadruple relay ports through the digital pins such that the first digital pins are connected to the input ports of the relay from (IN1-IN4). Furthermore, the VCC and GND terminals of the relay are connected to the NODEMCU1. The other side of the relay controls four devices defined by the light system of the house, the HVAC (Heating, ventilation, and air conditioning systems) system, etc. The house devices can be turned ON/OFF manually based on the decision by the user.

NETPI based NODEMCU2
The NODEMCU2 is chosen to monitor and detect the existence of gas leakage in the environment remotely. The LPG gas sensor is connected to NODEMCU2 across one of the digital pins, VCC and GND. In order To measure the temperature and humidity, the DHT11 sensor is used and connected to NODEMCU2 across VCC to 3.3V pin, GND to GND and the data terminal to one of the digital pins. Besides, the power system-based PV panel is considered the distinctive part of the smart house due to the necessity for the clean energy provided by sun radiation to reduce the cost of the electric power. Measuring the voltage and the current in the battery remotely through the analog pin (ADC0) of NODEMCU2 and the criteria for the PV used shall be as follows: The rest of the IoT system parts that are connected can be modeled such that they fulfill the desired environment specifications described in Figure 4.

BLYNK based NODEMCU3
As shown in Figure 4, NODEMCU3 is the controller responsible for controlling the wind speed and motion sensors via BLYNK platform. The interesting part is that we could use the PV panels to charge the battery through NODEMCU2 and provide the wind speed sensor by the required power through NODEMCU3. Hence, the overall supervision methodology is satisfied such that the whole system is dependent regardless of the separated network platforms that are used to interact with the available NODEMCU modules. BLYNK platform needs to be configured and registered using an email such that any project design will be confirmed by an authentication code sent to that email address by BLYNK. Furthermore, the authentication code alongside with the SSID and the password of the network station must be included in the programming code of NODEMCU3. The BLYNK project design contains two gages to show the temperature and the humidity through an additional DHT11 sensor. In addition, the anemometer identified by the wind speed sensor is connected to NODEMCU3 across the analog pin (ADC0) with respect to the power given from the battery to measure the speed of the wind outdoor, which will be seen as another gage in the platform as shown in Figure 5. As shown in Figure 5, we used two tools available in BLYNK. These tools are the "Eventor" and the "Notification.". These two tools are utilized with the motion sensor (PIR) such that the platform sense the availability of any motion around the PIR through the "Eventor" with respect to the pin that the PIR is attached to NODEMCU3 and the phone that hold BLYNK will receive a notification showing a message states that motion is available.

RESULTS AND DISCUSSION
The overall system behaves by following user specifications that were itemized before. The specifications of the modules complete the tasks of each other under the supervision of the main supervisor. Firstly, the temperature and humidity sensor measure the real output through the DHT11 sensor. Furthermore, the instrument used for the gas intensity calculation (MQ2) passes the differences of air quality across the digital pin such that (0) indicates that there is no gas leak, (1) refers that a leak is detected. The key issue described above is that, unlike the other servers, the capacity to use more than one microcontroller to monitor multiple devices (in a single, specific GUI). Due to the direct usability of BLYNK platform, it is aimed to omit the flowchart of the device's work under the supervision of NODEMCU3. For the control system applicability, designing the control system is to fulfill a precaution manually and automatically during specific temperature conditions. Moreover, the wind sensor programming manner can be performed by satisfying specific parameters. The initial state and maximal wind velocity are determined according to (5) and (6) as follows: The adjustment factor can be accomplished by dividing the digital constant into the analog range which gives (0.005) which can be used to measure the speed of the wind across the analog pin (ADC0) of NODEMCU3 by satisfying (7) as follows: As a final spotlight, NODEMCU microcontroller deals only with 3.3V as a regular voltage. As a result of this, the 12V battery voltage must be stepped down to 3.3V across voltage divider role as applied in the overall connection in Figure 4 and given in (8): The value of the resistors R1 and R2 are specified by (15 and 5) kΩ, respectively, with respect to the 12V battery as the input voltage based on the connection manner exposed partially in Figure 4. Furthermore, HVAC refers to heating, ventilation and air conditioning systems and the whole lights of the house both are dependent on situational conditions, which supposed to be controlled even manually or automatically away from remote stations as depicted in NETPI platform result in Figure 6 alongside with the other output of the sensors. The condition of the weather was recorded on the 9 th of January 2020 at the "Roshanbiry" zone, Erbil governorate-Iraq over coordination (36.1385° N, 44.0342° E) for 12 hours from (17:00-4:00). Finally, the obtained results are shown in Figure 7.

CONCLUSION
This article introduces a complete design and implementation of an innovative, efficient, and low-cost smart house system. Under the guidance of IoT technologies, the system can act and effectively automates remote environments. This research project motivated mainly to compare the applicability and the cost limitation of NETPI and BLYNK network platforms. NETPI confirmed that many specifications could be fulfilled using several modules under the supervision of the main supervisor. However, BLYNK offered restrictions regarding projects' design in a unique sole GUI, especially when more than one microcontroller is used. Besides, the cost is considered expensive due to energy-based limits exist in BLYNK that constrain users to fulfill their design specifications. On the other hand, the BLYNK platform is friendly, helpful and easy to design considerable projects in less time, unlike the NETPI platform that needs great effort to deal with the complexity of the programming manner.