applied sciences

Article Application of Internet of Things in a Kitchen Prevention System

Wei-Ling Hsu 1 , Ji-Yun Jhuang 2, Chien-Shiun Huang 3, Chiu-Kuo Liang 4 and Yan-Chyuan Shiau 5,*

1 School of Urban and Environmental Science, Huaiyin Normal University, Huai’an 223300, China 2 Program of Technology Management, Chung Hua University, Hsinchu 30012, Taiwan 3 Department of Civil Engineering, Chung Hua University, Hsinchu 30012, Taiwan 4 Department of Computer Science and Information Engineering, Chung Hua University, Hsinchu 30012, Taiwan 5 Department of Landscape Architecture, Chung Hua University, Hsinchu 30012, Taiwan * Correspondence: [email protected]; Tel.: +886-916-047-376

 Received: 15 June 2019; Accepted: 22 August 2019; Published: 27 August 2019 

Featured Application: The results of this research can be used make an installation in the kitchen area of the home to improve the safety of cooking with gas.

Abstract: When using a gas stove to cook, the food or oil in the pot or pan may catch fire because of an excessively high temperature. In addition, people may be uncertain as to whether they have turned off the gas stove before leaving home and therefore feel compelled to return home to check. To solve these problems, this study has developed a smart kitchen fire prevention system that possesses the following devices and functions. (1) Sensors are installed above the stove top. When they detect flames, high temperature, or a gas leak, they immediately activate the gas shutoff device to turn off the gas supply. (2) The alarm produces a loud sound and flashes to warn the residents. (3) The Line reporting system sends Line messages to notify the residents and the community management center, and the main entrance door is automatically unlocked to allow relevant personnel to enter the house to deal with the accident. (4) An Internet protocol camera is installed in the kitchen to enable the residents to monitor the gas stove on their mobile phones. If they find the gas stove is still turned on, they can activate the gas shutoff device to shut off the gas supply from their phones. The system developed in this study can effectively reduce the loss that results from a kitchen fire.

Keywords: flame detector; temperature sensor; gas sensor; gas shutoff device; Line reporting system

1. Introduction

1.1. Background When a fire breaks out, it can often cause major loss of life and damage to property, due to the spread of the fire. Early detection of fire sources and effective countermeasures have become important issues in fire prevention and protection of life and property [1]. As building fires tend to increase the number of casualties and property damage, it is necessary to take appropriate action accordingly. There has been an increasing effort to develop such disaster management systems worldwide by applying information communication technology (ICT), and many studies have been conducted in practice. The core idea behind the smart city is to collaborate and integrate the information from urban areas and utilize ICT, which includes computing, Internet of Things and so on. The main characteristics of smart city are scalability, interoperability, limited power consumption, fast deployment, multi-modal

Appl. Sci. 2019, 9, 3520; doi:10.3390/app9173520 www.mdpi.com/journal/applsci Appl. Sci. 2019, 9, 3520 2 of 22 access and robustness [2,3]. The need for a basic unified architecture for smart city based applications is not new, but a proper solution that can map real world smart city applications to the standard architecture is not currently available [4]. The smart building is also an important part of the smart city. The gas stove is a type of cooking device used in most households in Taiwan. Compared with an electric stove, it saves electricity and can cook food rapidly because it produces large flames. However, users or older adults may forget they are cooking or forget to turn off the stove because they are busy or have memory problems. Double-income couples may be unsure whether they have turned off the stove and therefore feel compelled to, during their commute to work, return home and check. These problems affect numerous households. Business Insider, a British magazine, commissioned an online survey of 14,300 expats who represented 174 nationalities and lived in 191 countries to rate various aspects of life, including leisure options, personal happiness, travel, transport, health and well-being, and safety and security. The company published the ranking of top 21 countries with the best quality of life in January 30, 2017, and Taiwan was ranked first because of a comprehensive medical care system and affordable price level [5]. Among the aspects measured by the assessment, personal happiness, travel, and leisure options are related to food in Taiwan. Taiwanese people prefer to cook over a large flame and high heat; however, the oil in woks may catch fire because of the excessively high temperature that is produced, which could lead to kitchen fires. Therefore, devising a method to automatically shut off gas when a gas stove catches on fire is of critical importance to home safety.

1.2. Research Motivation and Objectives In order to prevent stoves from catching fire because of a pot or pan boiled dry or heated over an extremely high temperature, this study has developed a smart kitchen fire prevention system that has the following main functions.

1.2.1. Kitchen Fire Prevention (1) A sensor is installed above the stove top. When it detects overly high flames or temperature or a gas leak, the automatic shutoff device will be activated to shut off gas supply to the stove. (2) A reporting system then reports the accident to the family members and the community management center via Line, a messenger app, and the main entrance door of the house in question is automatically unlocked to enable the emergency personnel to enter the house to extinguish the kitchen fire.

1.2.2. Remote Monitoring and Gas Shutoff (1) An Internet protocol (IP) camera is installed in the kitchen at a location and height that allows users to see the gas stove. (2) When users are unsure whether they have turned off the gas stove, they can check the live video of their cameras from their phones. When necessary, they can activate the gas shutoff device to shut off the gas supply by using voice control or clicking on an activation button on their phones, thereby ensuring home safety.

1.3. Problems to be Solved To provide a complete kitchen accident prevention mechanism, problems that must be solved include the following:

(1) Users may forget they have something cooking on the stove when they are busy. Therefore, when a pot or pan boils dry, a sensing element is required to detect the high temperature and issue light or sound alarms to warn residents and neighbors. Appl. Sci. 2019, 9, 3520 3 of 22

(2) When a pot or pan catches fire because of an overly high temperature or a high alcohol content in food, the fire incident may become more serious if it is not handled appropriately. Therefore, an automatic gas shutoff device is necessary in such a situation. (3) When a household kitchen catches on fire, the owner must report the accident to the management center or emergency units immediately via a communication mechanism. However, if the main entrance door to the house is locked, the optimal time for rescue may be missed. Therefore, the kitchen fire prevention system automatically unlocks the door to enable others to enter the house for rescue operations. (4) When users are unsure whether they have turned off the stove, they can view the live video of the stove by using the remote monitoring system. If the stove is still turned on, a remote control system is required for the users to shut off the gas supply to the stove.

2. Literature Review According to the Exploration of Causes of Housing in Taiwan conducted by the Architecture and Building Research Institute, Ministry of the Interior [6], the total number of fire incidents in 1999 in Taiwan was 16,389, 36.1% of which were building fires, comprising 5,913 cases. In addition, among the building fire incidents, 61.3% of those were housing fire incidents, totaling 3,626 cases, indicating a high percentage of housing fire incidents among all fire incidents in Taiwan. The term “Smart Sensors”, one of the most strategic devices of Micro System Technologies (MST), refers to sensors that contain both sensing and signal processing capabilities with objectives ranging from simple viewing to sophisticated remote sensing, surveillance, search/track, weapon guidance, robotics, perceptron and intelligence applications [7]. Many services and applications integrating these technologies into daily life have come to form an Internet of Things (IoT) [8].

2.1. The Development Trend of Smart Building At present, most cities are faced with high-rise and dense buildings, so it is the most important task to prevent and solve any type of fire situation quickly and effectively, in order to most effectively reduce losses in terms of life and property [9]. The introduction of new technologies has provided us with many new options to achieve security in smart buildings and smart cities. The intelligent feature is that when such disasters occur, these buildings and cities should be able to implement emergency response measures quickly and holistically. Key technologies and factors that help prevent fires should also be noted. Some of the key technologies that can be used to achieve this ideal include:

(1) Significant growth and easy access to Internet connectivity and bandwidth. (2) Ubiquity of Smart Phones and Tablets along with their inbuilt notification systems. (3) Advancement of wireless technologies, especially for IoT enabled sensors. (4) Economical access to Cloud-based Apps and data storage. (5) Adoption of Computer aided Facility Management (CAFM), Building Information Modeling (BIM) and virtual reality (VR) technologies for efficient operation and management of buildings.

2.2. Kitchen Fire People suffering from a loss of autonomy caused by a cognitive deficit generally have to perform important daily tasks (such as cooking) using devices and appliances designed for healthy people, which do not take into consideration their cognitive impairment. Using these devices is risky and may lead to a fire tragedy [10]. Cognitively-impaired persons, such as elderly people with Alzheimer’s disease or young people with brain injuries, suffer from a loss of autonomy. This deficit induced by their condition limits these individuals in performing their essential activities of daily living (ADL), such as bathing or cooking [11]. These people generally have to routinely perform tasks, in their home, using devices that do not necessarily take into consideration their cognitive deficit. These devices are Appl. Sci. 2019, 9, 3520 4 of 22 not adapted to their conditions, and they often come with unacceptable fire risks [12]. In order to successfully escape a fire and to douse the fire source, the fire must be detected at its initial stage. The installation of a fire alarm system is the most convenient way to detect a fire early and avoid losses. Fire alarms consist of different devices working together that have the ability to detect fire and alert people through visual and audio appliances. The detection devices (i.e., heat, , and gas detectors) detect events and activate the alarm automatically, or sometimes the alarms are activated manually. The alarm may consist of bells, mountable sounders, or horns [1]. According to the fire statistics released by the National Fire Agency [13], cooking is the second leading cause of building fires (7,579 incidents), with only electrical appliances causing more fires from 2013 to 2018 (Table1). From 2017 onward, the statistical data indicate a considerable change. This is because the National Fire Agency implemented a new fire categorization system in 2017 to clearly present the type of fires, which facilitates fire policy formulation in accordance with international standards. Specifically, fire incidents are categorized into A1, A2, and A3. A1 refers to fire incidents leading to deaths; A2 refers to fire incidents that lead to injuries, involve legal disputes, are categorized as arson, or have causes requiring further investigation; and A3 refers to fire incident cases that are closed after a “fire rescue attendance form” is completed. In view of the high percentage of fires caused by stove-cooking, determining the adequate measures to adopt to prevent kitchen fires caused during cooking is pivotal to ensuring home safety.

Table 1. Number of fire incidents and fire losses in Taiwan from 2013 to 2018.

Time Item 2013 2014 2015 2016 2017 2018 Total Total 1451 1417 1704 1856 30,464 27,922 64,814 Arson 210 213 268 278 323 285 1577 Suicide 19 27 21 22 72 64 225 Lights and candles 11 6 18 16 67 51 169 Cooking 63 69 72 125 3659 3591 7579 God and ancestor worship and 42 43 45 31 1936 1604 3701 tomb sweeping Cigarette 135 146 147 169 1461 1530 3588 Electricity 508 451 582 608 3433 2972 8554 Mechanical equipment 41 30 29 40 469 365 974 Playing with fire 12 12 13 16 57 39 149 Fires started for warmth 5 3 4 4 28 24 68 Construction accidents 35 42 38 51 272 283 721 Spontaneous combustion of 7 9 8 10 32 26 92 flammable products Gas leak or explosion 26 16 28 25 98 88 281 Chemicals 11 8 5 10 24 19 77 Burning of firecrackers 15 19 27 22 181 229 493 Traffic accidents 15 6 18 23 121 91 274 Natural disasters 1 3 2 2 19 7 34 Unattended small sources of fire - - - 142 5810 6353 12,305 Unknown causes 17 25 17 23 48 32 162 Other 278 289 362 239 12,354 10,269 23,791 Appl. Sci. 2019, 9, 3520 5 of 22

2.2.1. Three Steps for Extinguishing a Grease Fire Many fire accidents start from the kitchen, and if such fires are not extinguished immediately, they result in irreparable harm, perhaps even tragedy. A common cause for kitchen fires is excessively hot oil catching on fire, which could be caused by overheating cooking oil or stew. Many people intuitively pour water onto the oil to put out the fire, but doing so causes the oil to splatter, making the situation more dangerous. The boiling point of oil is generally higher than 100 ◦C, at which point water vaporizes. When water enters the oil that has caught on fire and vaporizes, the carries burning oil droplets into the air and spreads the fire. The correct three steps for extinguishing a grease fire are as follows [14]:

(1) When the fire is only within the pot or pan, turn off the gas stove. (2) Cover the pot that is on fire with a lid because this puts out the fire by blocking its access to air. (3) If the fire has been put out but the temperature in the pot remains high, directly opening the lid may cause the fire to reignite. Therefore, leave the pot alone and let it cool down naturally.

Every kitchen should be equipped with a dry-powder fire extinguisher for emergency use. Installing home smoke alarms can enable residents to become aware of the fire early and respond to it in a timely manner.

2.2.2. Effective Strategies for Kitchen Fire Prevention Fire is a fundamental element for cooking; with fire, people create their food culture. However, fire can lead to disaster and cause irreparable harm. Fire prevention is thus crucial, particularly in the kitchen where fire is frequently used. Various food businesses operate on the basis of different standards use different types of fuels in the kitchen, thereby having different kitchen facilities and cooking environments. With the continuous advancement of kitchen facilities and changes in the methods of using fire, numerous factors are present that may cause a fire in addition to inherently flammable nature of stoves, coal gas, diesel fuel, and liquefied petroleum gas. The following characteristics of a kitchen make it a potential place for fire accidents [15]:

(1) Abundance of fuel

The kitchen is a place where fire is used for cooking. Commonly used fuels include liquefied petroleum gas, coal gas, , carbon, and alcohol, all of which are likely to leak, combust, and even explode.

(2) Large amount of cooking oil fumes

A kitchen environment is typically humid, and products of incomplete combustion and cooking oil fumes produced from oil evaporation accumulate and form a thick layer of a combustible oily and powdery substance that attaches to walls and collects in air ducts. If the cooking oil fumes are not cleaned off immediately, they can cause fire easily.

(3) Complex power lines for electrical appliances

A kitchen is usually a small space, but kitchens tend to be occupied by numerous large kitchen appliances, most of which are powered by electricity or involve the use of fire. Inappropriate use of these appliances in the usually humid kitchen can easily lead to a short circuit and further result in electric shocks or fire disasters.

2.2.3. Causes of Kitchen Fires The causes of kitchen fires include the following:

(1) Users putting too much oil in a pot when deep frying food; the excessive amount of oil may splash out of the pot when boiling and make contact with the cooking fire. Appl. Sci. 2019, 9, 3520 6 of 22

(2) Heat cooking oil for an excessively long time when deep frying; an oil temperature exceeding 240 ◦C leads to spontaneous combustion of the oil. (3) Ignition of a gas stove with a hot pot placed improperly on it causes the combustible substances to catch fire. (4) Leaving stew unattended on a gas stove while cooking; oil that floats on the soup spills out of the pot and make contact with the cooking fire. (5) Because of the high humidity and temperature in the kitchen, a large amount of oil residue is attached to the kitchen surface and the plastic wire insulation layers are oxidized. In addition, the constant presence of smoke, dust, and oil residue in a kitchen may easily lead to a short circuit among electrical appliances, electrical kitchen facilities, lighting devices, and switches in the kitchen, which then causes a fire accident. (6) The excessive accumulation of oil and grease on the surface of the exhaust hood can draw flame up into the ventilation ducts when pan-frying, which usually creates a high flame, and result in fire.

2.3. Internet of Things Based on people’s demand for energy saving in their homes, the development of smart house technology is an inevitable result [16–20]. A smart house refers to the integration of all automation equipment through the network system to provide a service that is highly efficient overall, thereby ensuring that the public’s needs are met in terms of home safety, a healthy and humane living environment, convenience, and quality of life [21]. The modern smart home system includes the following subsystems: lighting, climate control, security, technical incidents prevention subsystem and others [22–24]. There are four common methods of IoT connection control: Internet Control (W-Fi), Area Network Control (WebSocket), Bluetooth and Serial Port. Each of these four methods has its own advantages. For example, to control US devices in Taiwan, you must use Wi-Fi control. If you want to control multiple devices at the same time, you can consider WebSocket and Bluetooth connection. If you only want simple wiring control, you can use the Serial Port approach. The wireless sensor network, being a dominant prerequisite in the modern pervasive environment, has nodes connected with multi-hop to transmit and reinforce continuous monitoring with real-time updates from the field environment [25]. In this context, IoT will also play an active role by connecting and enabling devices to the Internet [26]. Most of the fire alarm systems use the technology of a wireless sensor network (WSN). WSNs have gained popularity because they have a variety of uses in different applications, such as target tracking [27,28], localization [29], healthcare [30,31], Smart Transpiration [32], environmental monitoring, and industrial automation [33]. A WSN is also used to automatically or manually collect data and security monitoring [34,35]. Most of the smartphone-based applications either employ crowdsourcing or crowd sensing, utilizing smartphone sensors of citizens. However, a few can also be found that takes input from other sensor devices (such as wearable sensors) but collect data through the smartphone interface of citizens. Here, in this work, we have considered an opportunistic crowd sensing based application [36]. The level of such system’s intellectualization increases with time. Therefore, the practice of neuro controllers for the smart home system implementation is an important and urgent task [37–40]. The IoT enables various devices and appliances that are attached with micro sensor chips, such as radio-frequency identification tags, sensors, and wireless communication chips, to communicate and interact with each other through wireless and wired networks (communication and interactions between objects, between people and objects, and between people). In recent years, sensors have been widely used for fire detection [41–46]. The IoT provides management and service functions that coordinate comprehensive types of objects, achieve high efficiency, energy saving, safety, and environmental protection, and offer integrated services of management, control, and operation. Appl. Sci. 2019, 9, 3520 7 of 22

The key characteristics of an IoT setup include the following: (1) instrumentation, (2) interconnectivity, (3) intelligence, and (4) facilitation of smart life and services through instrumentation and networking technologies. Teslyuk et al. have developed the technical structure of the accident prevention subsystem for the smart home system. In the development process, the subsystem model is built on the Petri network and neural network, and the physical model is built using the Arduino microcontroller. The subsystem was developed using this technical model, and software and hardware tools were also presented [20].

2.4. Current Research on Kitchen Fire Prevention The security concerns of elderly people have become a significant issue around the world. The ratio of the elderly population is getting higher and higher. By 2036, the proportion of people above 65 in Canada will account for 23% to 25% of the total population, and by 2061 will reach 24% to 28% [47]. Japan is the country with the highest proportion of the world’s elderly population. In 2013, the 65-year-old population accounted for 25.1% of the total population, and by 2050 it will reach 40% [48]. Many studies have established preventive methods to improve safety in the kitchens of elderly people. Proactively responding to hazards in the kitchen can prevent cooking-related hazards. Researchers have managed to use a culinary safety system consisting of perceptron nodes to process sensory data based on risk prevention algorithms to monitor and prevent dangerous events that may occur in the kitchen environment [49]. In this section, we mainly discuss and summarize the progress of IoT technology and the latest smart disaster prevention system in recent years. Due to advances in sensors and microelectronics, fire detection technology has made great progress in the past decade [50,51]. Advances in various emerging sensor technologies for fire detection and monitoring are explained by Liu and Kim [52]. Most fire detection techniques fall into two categories, one that uses visual analysis video and image processing techniques to detect fires, and the other that uses sensors to perform fire detection [53,54]. After the sensor detects various types of kitchen disaster signals, the system performs intelligent alarm notification, remote information notification, and automatically shuts off the gas supply. Many studies on gas leak safety systems have been published [17,55,56]. These systems use gas sensors to detect gas leaks, initiate alarm procedures, send relevant information to households, and take precautions to avoid accidents [57,58]. The Global System for Mobile Communications (GSM) module is used, which alerts the user by sending an Short Message Service (SMS) [59]. Past research has focused on the GSM system, but with the advancement of the technology, various communication software (such as WhatsApp, Line, and WeChat) has gradually replaced traditional communication modes. This study uses the "Line" communication software to replace the traditional SMS, and uses the smart phone’s App to perform remote control.

2.4.1. Video Frames and Process Images Technologies Traditional single-point heat and smoke detectors are widely used, and they are usually only responsible for detecting limited areas in space. In large rooms and high-rise buildings, smoke particles and heat can take a long time to be detected. In the detection of fires, we prefer to use video-based fire detectors because it can effectively perform large-scale room and high-rise building fire monitoring, and even perform outdoor fire detection needs [60,61]. Currently most video fire detections use the visual characteristics of fire, including color, texture, geometry, flicker and motion. [55,62] The can detect the sign of the disaster even before the fire occurs [56]. Several smoke detection studies have been published using cameras to detect smoke. Since the smoke is grey and translucent, the edges of the high frequency image frame lose clarity and become an indicator of smoke. The distinction between different types of smoke is through the examination of changes in background tones, smoke pixels, blurred backgrounds, and illumination segmentation [51,63]. Due to the risks associated with the use of video frame detectors, this study used a combination of sensors to detect fires. Appl. Sci. 2019, 9, 3520 8 of 22

2.4.2. Sensor-Based Fire Detection Technologies The actuator provides a wide range of possibilities for human–machine interaction, including appropriate interventions for each detected risk situation, and an appropriate response based on user needs. Establishing a sensor-based safe cooking environment requires in-depth risk analysis [49]. The disaster risk of the kitchen consists of three factors: fire, burn and intoxication. The following is a summary of these three factors. The sensor-based fire detection technology is highly accurate, easy to install, inexpensive, and easy to deploy [51]. The vision-based visual fire detection algorithms are used for fire color modeling and motion detection, and the sensor network can be combined with this system. These network combinations seem attractive, but they increase system overhead and increase the complexity of system installation and deployment [64]. Compared with the above techniques and methods, safe from fire (SFF) has a simple strategy for detecting fires, and can inexpensively and efficiently deal with fraudulent fire scenarios. It is also effective for early detection of fires. In this study, Arduino sensing components were used as fire detectors for home kitchens. These detectors include a flame detector, a temperature detector, and a gas detector. Information about the program and control modules will be discussed in detail in Section3.

2.4.3. Related Patents This study searched patents related to kitchen fire prevention on the Global Patent Search System and found the following two patents:

(1) TW M501536 (Fire detection and extinguishing equipment) [65]

Name: Fire detection and extinguishing equipment. This kitchen fire detection and extinguishing equipment consists of natural gas pipelines, a gas stove, an exhaust hood, a flame detector, and an extinguishing device. The extinguishing device consists of a gas cylinder connected to a branch pipe through a solenoid valve; the branch pipe and its nozzle are installed on the exhaust hood. When the flame detector detects flames, it outputs a signal to the driver through a signal transmission device. After receiving the signal, the driver turns off the gas supply and opens the solenoid valve to discharge the fire extinguishing gas from the cylinder to the solenoid valve, branch pipe, and then the nozzle to extinguish the fire on the gas stove. The drive motor of the exhaust hood is automatically turned on, which activates the exhaust fan to clear the air. Thus, the equipment effectively suppresses fire accidents and improves safety in kitchens. Comparison between patent TW M501536 and this study: The patented system and this study both use the same fire detection module and gas shutoff device. However, the patented system does not have an alarm device, an automatic door unlocking function, or a Line message reporting mechanism.

(2) TW 201709157 (Kitchen fire prevention system and kitchen monitoring device) [66]

Name: Kitchen fire prevention system and kitchen monitoring device. The system can be installed on the gas stove and gas pipelines. When a fire accident occurs, it can send a message to a portable warning device to wirelessly notify users. The kitchen monitoring device starts to count time as it detects the user moving a certain distance away from the gas stove. The device sends warning messages to the portable warning device wirelessly at certain time intervals. As the device detects that the user has left the gas stove for a certain time period, it controls the solenoid valve and shuts off the gas supply. The kitchen monitoring device and portable warning device can repeatedly remind the user to check the gas stove after leaving the kitchen. Once the user leaves the gas stove for a particularly long time or particularly long distance, the device automatically shuts off the gas supply, thereby effectively preventing fire accidents. Thus, this is a convenient and feasible fire prevention system. Comparison between TW 201709157 and this study: The patented kitchen monitoring system encompasses an automatic shutoff device, a wireless reporting mechanism, and an alarm system, all of Appl. Sci. 2019, 9, 3520 9 of 22

which are also proposed in this study. However, the patented system does not have flame, temperature, and gas detection and automatic door unlocking functions. Appl. Sci. 2019, 9, x FOR PEER REVIEW 9 of 21 3. Research Design Arduino [67] is a technology with open authorization applied in an interactive development 3.1.environment Software and and Hardware is comprised Used inof thishardware, Study software, and expansion components. The hardware is a prefabricatedFor any IoT-based control application,board, and the a common software factordevelopment is the presence environment of various is an sensorsopen source which code, are actuallywhich can sensing be downloaded the environment from [the3]. TheArduino sensing offici elementsal website. employed With progra in thismming study are language introduced syntax as follows:similar to C/C++, Arduino possesses a text editing interface, a toolbar, a graphical control interface, Appl.and Sci. an 2019 error, 9, xeditor. FOR PEER We REVIEW uploaded programs to Arduino, which facilitated communication between9 of 21 (1)variousArduino sensors. The console interface can record the complete execution messages and can be used to monitorArduino the [67] Arduino is a technology I/O values with (Figure open 1). authorization applied in an interactive development Arduino [67] is a technology with open authorization applied in an interactive development environment and is comprised of hardware, software, and expansion components. The hardware is environment and is comprised of hardware, software, and expansion components. The hardware is a a prefabricated control board, and the software development environment is an open source code, prefabricated control board, and the software development environment is an open source code, which which can be downloaded from the Arduino official website. With programming language syntax can be downloaded from the Arduino official website. With programming language syntax similar similar to C/C++, Arduino possesses a text editing interface, a toolbar, a graphical control interface, to C/C++, Arduino possesses a text editing interface, a toolbar, a graphical control interface, and an and an error editor. We uploaded programs to Arduino, which facilitated communication between error editor. We uploaded programs to Arduino, which facilitated communication between various various sensors. The console interface can record the complete execution messages and can be used sensors. The console interface can record the complete execution messages and can be used to monitor to monitor the Arduino I/O values (Figure 1). the Arduino I/O values (Figure1).

Figure 1. Arduino Uno control board and the screenshot of the editing software.

(2) Webduino Webduino (Figure 2) has been developed based on Arduino [68]. Arduino is based on C/C++, whereas Webduino is controlled using HTML and JavaScript and operated through Wi-Fi, WebSocket, Bluetooth, and a serial port. The name Webduino is a combination between Web and Arduino. Webduino allows its users to execute controlFigureFigure actions 1. 1. ArduinoArduino by simpUno Uno controlly control using board board syntax and and forthe the scrwebsites; screenshoteenshot ofit of enablesthe the editing editing users software. software. to connect Arduino to the Internet, update firmware in the cloud, write codes using various programming languages, (2)and(2) executeWebduino Webduino control actions using Wi-Fi. Because Webduino involves the use of web development technology,Webduino which (Figure facilitates 2) has been cross-platform developed basedand cross-deviceon Arduino [68].operations, Arduino programs is based ondeveloped C/C++, whereasusingWebduino Webduino Webduino (Figure show is 2 applicabilitycontrolled) has been developedusing beyond HTML the based co annventionally ond ArduinoJavaScript used [ 68and]. Arduino Arduino operated development is basedthrough on CWi-Fi,boards/C++ , WebSocket,whereasto other Webduinodevelopment Bluetooth, is controlled andboards a serial such using port. as Raspberry HTML and Pi JavaScript and esp8266. and operatedNumerous through engineers Wi-Fi, have WebSocket, engaged Bluetooth,in theThe development name and Webduino a serial of port.Webduino is a combination to realize betweenthe true valueWeb and Arduino.meaning ofWebduino the IoT. allows its users to execute control actions by simply using syntax for websites; it enables users to connect Arduino to the Internet, update firmware in the cloud, write codes using various programming languages, and execute control actions using Wi-Fi. Because Webduino involves the use of web development technology, which facilitates cross-platform and cross-device operations, programs developed using Webduino show applicability beyond the conventionally used Arduino development boards to other development boards such as Raspberry Pi and esp8266. Numerous engineers have engaged in the development of Webduino to realize the true value and meaning of the IoT.

FigureFigure 2.2. Webduino controlcontrol board.board.

(3) detector A flame detector (Figure 3) is sensitive to and also reactive to normal light. It is generally used for fire alarms and fire source detection and is able to detect flame or light with a wavelength ranging from 760 to 1100 nm. The maximum distance for detection of the flame of a

Figure 2. Webduino control board.

(3) Flame detector A flame detector (Figure 3) is sensitive to flames and also reactive to normal light. It is generally used for fire alarms and fire source detection and is able to detect flame or light with a wavelength ranging from 760 to 1100 nm. The maximum distance for detection of the flame of a Appl. Sci. 2019, 9, 3520 10 of 22

The name Webduino is a combination between Web and Arduino. Webduino allows its users to execute control actions by simply using syntax for websites; it enables users to connect Arduino to the Internet, update firmware in the cloud, write codes using various programming languages, and execute control actions using Wi-Fi. Because Webduino involves the use of web development technology, which facilitates cross-platform and cross-device operations, programs developed using Webduino show applicability beyond the conventionally used Arduino development boards to other development boards such as Raspberry Pi and esp8266. Numerous engineers have engaged in the development of Webduino to realize the true value and meaning of the IoT.

(3) Flame detector

A flame detector (Figure3) is sensitive to flames and also reactive to normal light. It is generally Appl.used Sci. for 2019 fire, 9 alarms, x FOR PEER and REVIEW fire source detection and is able to detect flame or light with a wavelength10 of 21 Appl. Sci. 2019, 9, x FOR PEER REVIEW 10 of 21 ranging from 760 to 1100 nm. The maximum distance for detection of the flame of a lighter is 80 cm. lighter is 80 cm. The larger the flame, then the larger the maximum distance between the flame and Thelighter larger is 80 the cm. flame, The thenlarger the the larger flame, the then maximum the larger distance the maximum between distance the flame between and the detectorthe flame [ 69and]. the detector [69]. the detector [69].

Figure 3. Flame detector. Figure 3. Flame detector.

(4) (4)DHT11 DHT11 temperature temperature sensor sensor (4) DHT11 temperature sensor The DHT11 digital temperature and humidity sensor (Figure 4) is a temperature and humidity The DHT11DHT11 digitaldigital temperaturetemperature and humidity sensor (Figure4 4)) isis aa temperaturetemperature andand humidityhumidity composite sensor with a corrected digital signal output. It uses dedicated digital module acquisition compositecomposite sensorsensor withwith aa correctedcorrected digitaldigital signalsignal output.output. ItIt usesuses dedicateddedicated digitaldigital modulemodule acquisitionacquisition technology and temperature and humidity sensing technology to ensure high reliability and technologytechnology andand temperature temperature and and humidity humidity sensing sensing technology technology to ensure to ensure high reliability high reliability and excellent and excellent long-term stability. The product has the advantages of excellent quality, ultra-fast long-termexcellent long-term stability. The stability. product The has product the advantages has the of advantages excellent quality, of excellent ultra-fast quality, response, ultra-fast strong response, strong anti-interference ability and high cost performance. The single-wire connection anti-interferenceresponse, strong abilityanti-interference and highcost ability performance. and high cost The performance. single-wire connection The single-wire makes theconnection system makes the system combination easy and quick to install. Ultra-small size, extremely low power combinationmakes the system easy and combination quick to install. easy Ultra-smalland quick size,to install. extremely Ultra-small low power size, consumption, extremely low and power signal consumption, and signal transmission distances of up to 20 meters make it the best choice for transmissionconsumption, distances and signal of up transmission to 20 meters distances make it the of bestup to choice 20 meters for applications. make it the [70 ].best choice for applications. [70] . applications. [70] .

Figure 4. DHT11temperature sensor. Figure 4. DHT11temperature sensor.

(5) MQ-4 natural gas methane sensor (5) (5)MQ-4 MQ-4 natural natural gas gas methane methane sensor sensor The gas-sensitive material used in the MQ-4 gas sensor (Figure 5) is SnO2. When a combustible The gas-sensitive material used in the MQ-4 gas sensor (Figure 5) is SnO2. When a combustible gas existsThe gas-sensitive in an environment material usedwhere in the MQ-4gas sensor gas sensor is located, (Figure 5the) is conduc SnO 2. Whentivity of a combustible the sensor gas exists in an environment where the gas sensor is located, the conductivity of the sensor increasesgas exists inas anthe environment concentration where of the gascombustible sensor is located, gas increases. the conductivity The MQ-4 of thegas sensor sensor increases is highly as increases as the concentration of the combustible gas increases. The MQ-4 gas sensor is highly sensitivethe concentration to methane of the as combustiblewell as to gas increases. and buta Thene. MQ-4 It can gas detect sensor numero is highlyus types sensitive of combustible to methane sensitive to methane as well as to propane and butane. It can detect numerous types of combustible gases,as well particularly as to propane natural and butane.gas, and It thus can detectis suitable numerous for detecting types of methane combustible gas and gases, natural particularly gas in gases, particularly natural gas, and thus is suitable for detecting methane gas and natural gas in householdsnatural gas, andand thusfactories. is suitable The fordetection detecting range methane for natural gas and gas natural and methane gas in households is from 300 and to factories. 10,000 households and factories. The detection range for natural gas and methane is from 300 to 10,000 Theppm detection [71]. range for natural gas and methane is from 300 to 10,000 ppm [71]. ppm [71].

Figure 5. MQ-4 natural gas methane sensor. Figure 5. MQ-4 natural gas methane sensor.

(6) IP camera (6) IP camera The camera employed in this study to monitor the gas stove is the 5th generation advanced The camera employed in this study to monitor the gas stove is the 5th generation advanced version Yosef 1080P surveillance IP camera (Figure 6). It was installed at a height in the kitchen that version Yosef 1080P surveillance IP camera (Figure 6). It was installed at a height in the kitchen that allows for monitoring the situation of the gas stove; therefore, the users can monitor the gas stove allows for monitoring the situation of the gas stove; therefore, the users can monitor the gas stove from a remote distance [72] . from a remote distance [72] . Appl. Sci. 2019, 9, x FOR PEER REVIEW 10 of 21 lighter is 80 cm. The larger the flame, then the larger the maximum distance between the flame and the detector [69].

Figure 3. Flame detector.

(4) DHT11 temperature sensor The DHT11 digital temperature and humidity sensor (Figure 4) is a temperature and humidity composite sensor with a corrected digital signal output. It uses dedicated digital module acquisition technology and temperature and humidity sensing technology to ensure high reliability and excellent long-term stability. The product has the advantages of excellent quality, ultra-fast response, strong anti-interference ability and high cost performance. The single-wire connection makes the system combination easy and quick to install. Ultra-small size, extremely low power consumption, and signal transmission distances of up to 20 meters make it the best choice for applications. [70] .

Figure 4. DHT11temperature sensor.

(5) MQ-4 natural gas methane sensor The gas-sensitive material used in the MQ-4 gas sensor (Figure 5) is SnO2. When a combustible gas exists in an environment where the gas sensor is located, the conductivity of the sensor increases as the concentration of the combustible gas increases. The MQ-4 gas sensor is highly sensitive to methane as well as to propane and butane. It can detect numerous types of combustible gases, particularly natural gas, and thus is suitable for detecting methane gas and natural gas in Appl.households Sci. 2019, 9and, 3520 factories. The detection range for natural gas and methane is from 300 to 10,00011 of 22 ppm [71].

Figure 5. MQ-4 natural gas methane sensor. Figure 5. MQ-4 natural gas methane sensor.

(6) (6)IP cameraIP camera The camera employed in this study to monitor the gas stove is the 5th generation advanced versionThe Yosef camera 1080P employed surveillance in this IP studycamera to (Figure monitor 6). theIt was gas installed stove is theat a 5thheight generation in the kitchen advanced that versionallows for Yosef monitoring 1080P surveillance the situation IP cameraof the gas (Figure stove;6). therefore, It was installed the users at a can height monitor in the the kitchen gas stove that fromallows a forremote monitoring distance the [72] situation . of the gas stove; therefore, the users can monitor the gas stove from a remote distance [72]. Appl. Sci. 2019, 9, x FOR PEER REVIEW 11 of 21

Figure 6. TheThe Internet Internet Protocol Protocol (IP) ca cameramera used in this study.

3.2. The Smart Alarm and Control Mechanism In a smart building, various sensors are used to obtain environmental values at home, on the basis of which relevant control mechanisms are activatedactivated through the control board and software to issue notificationsnotifications or or switch switch on on appliances appliances to change to change the environment the environment according according to detected to detected physical physicalindicators, indicators, thereby constructing thereby constructing a safe and a comfortable safe and comfortable home environment. home environment. The devices The used devices in this usedstudy in to this control study the to environment control the environment and issue warnings and issue are warnings as follows: are as follows: (1) Relay (1) Relay Relay (Figure 7) [73] is an electronic control device that has a control system (also known as an inputRelay circuit) (Figure and 7a)[ controlled73] is an electronicsystem (also control known device as an that output has a controlcircuit). systemIt is typically (also known used asin automatican input circuit) control and circuits. a controlled It is an system“automatic (also switch” known asthat an uses output a small circuit). current It is to typically control useda large in current.automatic Therefore, control circuits.it plays Itthe is role an “automaticof automatic switch” adjustment, that uses safety a small protecti currenton, conversion to control acircuit, large etc.,current. in the Therefore, circuit. it plays the role of automatic adjustment, safety protection, conversion circuit, etc., in the circuit.

Figure 7. Relay.

(2) Display This study used a 1602/16x2 monochrome character liquid–crystal display (LCD) module (Figure 8) to display the gas concentration, temperature, and flame intensity [74] .

Figure 8. Liquid–crystal display (LCD) module.

(3) Sound and light alarm If the sensor detects flames, high temperatures, or gas, then the sound and light alarm (Figure 9) produces an alarm sound and flashes to notify residents to adopt appropriate response measures. Appl. Sci. 2019, 9, x FOR PEER REVIEW 11 of 21

Appl. Sci. 2019, 9, x FOR PEER REVIEW 11 of 21

Figure 6. The Internet Protocol (IP) camera used in this study. Figure 6. The Internet Protocol (IP) camera used in this study. 3.2. The Smart Alarm and Control Mechanism 3.2. TheIn aSmart smart Alarm building, and Control various Mechanism sensors are used to obtain environmental values at home, on the basisIn of awhich smart relevant building, control various mechanisms sensors are are used activated to obtain through environmental the control values board atand home, software on the to issuebasis ofnotifications which relevant or switchcontrol onmechanisms appliances are to ac changetivated throughthe environment the control according board and tosoftware detected to physicalissue notifications indicators, orthereby switch constructing on appliances a safe to andchange comfortable the environment home environment. according Theto detected devices usedphysical in this indicators, study to therebycontrol theconstructing environment a safe and and issue comfortable warnings are home as follows: environment. The devices used(1) in thisRelay study to control the environment and issue warnings are as follows: Relay(1) Relay (Figure 7) [73] is an electronic control device that has a control system (also known as an inputRelay circuit) (Figure and 7)a controlled[73] is an electronic system (also control known device as that an hasoutput a control circuit). system It is (alsotypically known used as anin automaticinput circuit) control and circuits.a controlled It is ansystem “automatic (also known switch” as that an usesoutput a smallcircuit). current It is totypically control useda large in Appl. Sci. 2019, 9, 3520 12 of 22 current.automatic Therefore, control circuits. it plays Itthe is rolean “automatic of automatic switch” adjustment, that uses safety a small protecti currenton, conversion to control acircuit, large etc.,current. in the Therefore, circuit. it plays the role of automatic adjustment, safety protection, conversion circuit, etc., in the circuit.

Figure 7. Relay. Figure 7. Relay. (2) (2)Display Display This(2) Display study used a 1602/16x2 monochrome character liquid–crystal display (LCD) module This study used a 1602/16x2 monochrome character liquid–crystal display (LCD) module (Figure8) (FigureThis 8) tostudy display used the a gas1602/16x2 concentration, monochrome temperature, character and flameliquid–crystal intensity display[74] . (LCD) module to display the gas concentration, temperature, and flame intensity [74]. (Figure 8) to display the gas concentration, temperature, and flame intensity [74] .

Figure 8. Liquid–crystal display (LCD) module. Figure 8. Liquid–crystal display (LCD) module. (3) Sound and light alarmFigure 8. Liquid–crystal display (LCD) module. If the sensor detects flames, high temperatures, or gas, then the sound and light alarm (Figure (3) (3)Sound Sound and and light light alarm alarm 9) producesIf the sensor an alarm detects sound flames, and flasheshigh temperatures, to notify residents or gas, to then adopt the appropriate sound and responselight alarm measures. (Figure 9) producesIf the sensor an alarm detects sound flames, and highflashes temperatures, to notify residents or gas, to then adopt the soundappropriate and light response alarm measures. (Figure9) produces an alarm sound and flashes to notify residents to adopt appropriate response measures. Appl. Sci. 2019, 9, x FOR PEER REVIEW 12 of 21

FigureFigure 9. 9. SoundSound and and light light alarm. alarm.

(4) (4)Gas Gas shuto shutoffff device device When the sensor detects flames, high temperature, or gas, the fire prevention system immediatelyWhen the activates sensor detectsthe gas flames, shutoff high device temperature, (Figure 10). or gas,The thevalve fire is prevention turned 90 system degrees immediately clockwise toactivates turn off the the gas gas shuto supply,ff device thereby (Figure ensuring 10). The the valveresidents’ is turned safety 90 [75] degrees . clockwise to turn off the gas supply, thereby ensuring the residents’ safety [75].

Figure 10. Gas shutoff device.

(5) IFTTT If This Then That (IFTTT) [76] is an automation tool that integrates many common web services. Users can create a conditional statement specifying that when a condition in Channel A is satisfied, it will trigger an action in Channel B; the entire process is a recipe. Currently, IFTTT is a free web service, but users must register an account with their e-mail address. (6) Line reporting system Line [77] has been a popular mobile app in recent years because of its combination of communication and online services and the convenience of group chats in addition to individual chats. It not only can be installed on smartphones (e.g., iPhone, Android phones, Windows phones, Black Berry, and Nokia Asha) but can also be used on personal computers. Line facilitates the transmission of text, pictures, and videos and topic discussions in groups, serving as an extensively used tool for social networking, communication, and management. In this study, the IFTTT platform was used to obtain the data detected by various sensors in the smart building. The data were then sent to relevant Line users or groups in a timely manner (Figure 11).

Figure 11. Notification messages on Line.

(8) Door lock When the sensor detects flames, high temperatures, or gas, the system automatically unlocks the main entrance door (Figure 12) to enable community management team and emergency personnel to enter the house to extinguish the fire. Appl. Sci. 2019, 9, x FOR PEER REVIEW 12 of 21

Appl. Sci. 2019, 9, x FOR PEER REVIEW 12 of 21

Figure 9. Sound and light alarm.

(4) Gas shutoff device When the sensor detects flames,Figure high 9. Sound temperat and lighture, alarm. or gas, the fire prevention system immediatelyAppl. Sci. 2019, 9activates, 3520 the gas shutoff device (Figure 10). The valve is turned 90 degrees clockwise13 of 22 (4) Gas shutoff device to turn off the gas supply, thereby ensuring the residents’ safety [75] . When the sensor detects flames, high temperature, or gas, the fire prevention system immediately activates the gas shutoff device (Figure 10). The valve is turned 90 degrees clockwise to turn off the gas supply, thereby ensuring the residents’ safety [75] .

FigureFigure 10. 10. GasGas shutoff shutoff device.device.

(5) (5)IFTTT IFTTT If This Then That (IFTTT) [76]Figure is an 10. automation Gas shutoff device.tool that integrates many common web services.If This Users Then can That create (IFTTT) a conditional [76] is an statement automation specifying tool that that integrates when manya condition common in Channel web services. A is (5) IFTTT satisfied,Users can it create will trigger a conditional an action statement in Channel specifying B; the thatentire when process a condition is a recipe. in Channel Currently, A is IFTTT satisfied, is a it If This Then That (IFTTT) [76] is an automation tool that integrates many common web freewill web trigger service, an action but users in Channel must register B; the entire an account process with is arecipe. their e-mail Currently, address. IFTTT is a free web service, services. Users can create a conditional statement specifying that when a condition in Channel A is but users(6) Line must reporting register system an account with their e-mail address. satisfied, it will trigger an action in Channel B; the entire process is a recipe. Currently, IFTTT is a Line [77] has been a popular mobile app in recent years because of its combination of (6)free webLine service, reporting but system users must register an account with their e-mail address. communication and online services and the convenience of group chats in addition to individual (6) Line reporting system chats.Line It not [77 only] has can been be installed a popular on smartpho mobile appnes (e.g., in recent iPhone, years Androi becaused phones, of its Windows combination phones, of Line [77] has been a popular mobile app in recent years because of its combination of Blackcommunication Berry, and and Nokia online Asha) services but and can the also convenience be used on of grouppersonal chats computers. in addition Line to individual facilitates chats. the communication and online services and the convenience of group chats in addition to individual transmissionIt not only can of betext, installed pictures, on and smartphones videos and (e.g., topi iPhone,c discussions Android in groups, phones, serving Windows as an phones, extensively Black chats. It not only can be installed on smartphones (e.g., iPhone, Android phones, Windows phones, usedBerry, tool and Nokiafor social Asha) networking, but can also communication be used on personal, and computers.management. Line In facilitates this study, the transmission the IFTTT Black Berry, and Nokia Asha) but can also be used on personal computers. Line facilitates the platformof text, pictures, was used and to videosobtain andthe topicdata detected discussions by invarious groups, sensors serving in asthe an smart extensively building. used The tool data for transmission of text, pictures, and videos and topic discussions in groups, serving as an extensively weresocial then networking, sent to relevant communication, Line users and or groups management. in a timely In this manner study, (Figure the IFTTT 11). platform was used to used tool for social networking, communication, and management. In this study, the IFTTT obtain the data detected by various sensors in the smart building. The data were then sent to relevant platform was used to obtain the data detected by various sensors in the smart building. The data Line users or groups in a timely manner (Figure 11). were then sent to relevant Line users or groups in a timely manner (Figure 11).

Figure 11. Notification messages on Line.

(8) Door lock When the sensor detects flames,Figure 11.high NotificationNotification temperatur messages es, or gas, on Line. the system automatically unlocks the main entrance door (Figure 12) to enable community management team and emergency (7) (8)Door Door lock lock personnel to enter the house to extinguish the fire. When the sensor detects flames, high temperatures, or gas, the system automatically unlocks the mainWhen entrance the sensor door detects (Figure flames, 12) high to temperatures,enable community or gas, themanagement system automatically team and unlocksemergency the mainpersonnel entrance to enter door the (Figure house 12 to) toextinguish enable community the fire. management team and emergency personnel to enter the house to extinguish the fire. Appl. Sci. 2019, 9, x FOR PEER REVIEW 13 of 21

FigureFigure 12. 12.DoorDoor lock lock that that can can be be controlled controlled automatically automatically and and manually. manually The brand, name,name, model,model, functionfunction quantity quantity and and price price of of hardware hardware used used in in this this study study are are listed listed on Tableon Table2. The 2. The total total cost cost of the of materialsthe materials used used on thison this study study is US$188.6. is US$188.6.

Table 2. The hardware used in this study.

Price Name Brand/Model Function (US$) Detects sensor signals and initiates controlled Arduino Uno 6.0 facilities Remote control facility, such as shutting off gas Webduino Mark1 28.0 supply D1 Mini Esp8266 Transfer IFTTT and Line information 3.0 Flame detector CSE0005-1 Detect flame intensity 0.5 Gas methane sensor MQ-4 CSS0013 Detecting gas concentration 2.0 Temperature sensor DHT11 Detecting the temperature above the gas stove 1.6 IP camera Yoose/1080P Remote monitoring for kitchen fire usage 23.0 Display Winstar1602/16x2 Display detection values of the environment 3.0 LED alarm Generate alert flash to warn residents 3.5 Audible alarm K 845755 Generate alarm sounds to warn residents 1.0 Relay (3 pieces) Automatic switch 3.0 Gas shutoff device Sunwe/ AD-704T Automatically cut off, manually recover 75.0 Door lock Bird Can be automatically opened by the system 29.0 Miscellaneous Wiring and other materials 10.0 hardware Total 188.6 Software for the remote control of gas stove. This study employed Webduino to develop remote control software. The software was connected with the IP camera through Wi-Fi to enable users to monitor the gas stove. The users can remotely control the gas shutoff device by simply clicking on a button to turn off the gas supply.

4. Results The architecture of the smart kitchen fire prevention system constructed in this study is displayed in Figure 13. Appl. Sci. 2019, 9, 3520 14 of 22

Table 2. The hardware used in this study.

Name Brand/Model Function Price (US$) Detects sensor signals and initiates Arduino Uno 6.0 controlled facilities Remote control facility, such as shutting Webduino Mark1 28.0 off gas supply D1 Mini Esp8266 Transfer IFTTT and Line information 3.0 Flame detector CSE0005-1 Detect flame intensity 0.5 Gas methane sensor MQ-4 CSS0013 Detecting gas concentration 2.0 Detecting the temperature above the gas Temperature sensor DHT11 1.6 stove IP camera Yoose/1080P Remote monitoring for kitchen fire usage 23.0 Display detection values of the Display Winstar1602/16x2 3.0 environment LED alarm Generate alert flash to warn residents 3.5 Audible alarm K 845755 Generate alarm sounds to warn residents 1.0 Relay (3 pieces) Automatic switch 3.0 Gas shutoff device Sunwe/AD-704T Automatically cut off, manually recover 75.0 Can be automatically opened by the Door lock Bird 29.0 system Miscellaneous hardware Wiring and other materials 10.0 Total 188.6 Software for the remote control of gas stove.

This study employed Webduino to develop remote control software. The software was connected with the IP camera through Wi-Fi to enable users to monitor the gas stove. The users can remotely control the gas shutoff device by simply clicking on a button to turn off the gas supply.

4. Results The architecture of the smart kitchen fire prevention system constructed in this study is displayed in Figure 13. In this study, the Arduino, Webduino and D1 Mini are used as the control panels (the middle part of Figure 13). The environmental data is collected by the gas detector, temperature detector, and flame detector (the upper part of Figure 13). The measured values are passed to Arduino and shown on the display. The editor and Blockly on the right of the figure is the program editing software of Arduino and Webduino respectively. The mobile phone can be connected to the IP Camera to check the cooking fire condition of the kitchen. When you find that you have not turned the stove off, you can connect to the Webduino by pushing the phone button and activate the relay to turn off the main gas switch. When any of the sensors detect any value exceeding the set value, the controllable mechanism on the bottom of the figure can be activated to trigger the alarm, open the door lock, send the Line notification message, as well as turn off the main gas switch. This study employed IoT to develop a smart kitchen fire prevention system. Creating the system architecture entailed integrating the control board, sensing elements, and controlled devices and developing control software. The setting of the controlled devices and Line notifications was established. The proposed system can serve as a reference for designing kitchen fire prevention systems. Appl. Sci. 2019, 9, 3520 15 of 22 Appl. Sci. 2019, 9, x FOR PEER REVIEW 14 of 21

Figure 13. ArchitectureArchitecture of the smart kitc kitchenhen fire fire prevention system.

In this study, threethe Arduino, control panels,Webduino Arduino, and D1 Webduino Mini are andused D1 as Mini,the control were used.panels Arduino (the middle sets partup the of connectionFigure 13). andThe readsenvironmental the sensor’s data detection is collected data. by It connectsthe gas detect to theor, D1 temperature Mini for notification, detector, and activatesflame detector the sound (the andupper flash part alarm of Figure facility. 13). It isThe also measured connected values to the are electrical passed appliance to Arduino to open and shownthe door on and the close display. the gas The main editor switch. and Blockly These jobs on dothe not right require of the the figure use of is Wi-Fi. the program This study editing uses Webduinosoftware of to Arduino perform relatedand Webduino remote invalidation respectively. controls. The mobile Because phone Webduino can be itself connected already hasto the Wi-Fi IP Cameracommunication to check capabilities, the cooking it fire can condition be connected of the to kitchen. the network When with you a simplefind that setup. you have not turned the stoveIn this off, study, you thecan MQ-4connect gas to sensor the Webduino was used. by We pushing used the the gas phone produced button from and a lighteractivate to the simulate relay tothe turn liquefied off the petroleum main gas gas switch. or natural When gas any to triggerof the sensors the gas sensor.detect Hotany airvalue blown exceeding from a hairthe dryerset value, was theused controllable to simulate mechanism a high temperature on the bottom to trigger of the figu temperaturere can be sensor, activated and to a mobiletrigger phonethe alarm, flashlight open wasthe door used lock, to simulate send the a strongLine notification light to trigger message, the flame as well detector. as turn off the main gas switch. This study employedAfter theIoT connectionto develop and a smart testing kitchen of sensors, fire prev controlention board, system. and controlled Creating devicesthe system were architecture completed, weentailed triggered integrating the gas sensor,the control temperature board, sensing sensor, andelements, flame detectorand controlled by using devices gas from and the developing lighter, hot controlair from software. the hair dryer,The setting and strong of the light controlled from the devi mobileces and phone Line flashlight, notifications respectively. was established. The detected The Appl. Sci. 2019, 9, x FOR PEER REVIEW 15 of 21 proposedchanges of system gas concentration, can serve as a temperature, reference for anddesigning light intensity kitchen fire shown prevention on the LCDsystems. are presented in Figure 14. When the gas concentration, temperature, and light intensity reached the set threshold, shutoffIn this devicestudy, threewas activatedcontrol panels, to turn Arduino, 90 degrees Webduino to turn and off D1 the Mini, gas were supply used. (Figure Arduino 16), sets Line the alarm device emitted a warning light and sound (Figure 15), the gas shutoff device was activated up notificationthe connection messages and reads were the sent sensor's to the detectionuser’s mobi daleta. phone It connects (Figure to 17),the andD1 Mini the main for notification, entrance door to turn 90 degrees to turn off the gas supply (Figure 16), Line notification messages were sent to the andwas activates automatically the sound unlocked and flash (Figure alarm 18). facility. When Itthe is sy alsostem connected reads that to any the detected electrical value appliance exceeds to the user’s mobile phone (Figure 17), and the main entrance door was automatically unlocked (Figure 18). opensafe the range, door andthen close the warningthe gas main system, switch. Line These notifi jobscation, do openingnot require the the door use lock of Wi-Fi. and closing This study the gas When the system reads that any detected value exceeds the safe range, then the warning system, Line useswill Webduino be triggered to perform immediately. related The remote automatic invalidat gasion shut-off controls. device Because takes Webduinoabout 5 s to itself completely already cut notification, opening the door lock and closing the gas will be triggered immediately. The automatic hasoff Wi-Fi the communicationgas supply. capabilities, it can be connected to the network with a simple setup. gas shut-oIn thisff devicestudy, takesthe MQ-4 about gas 5 s tosensor completely was used. cut o ffWethe used gas supply.the gas produced from a lighter to simulate the liquefied petroleum gas or natural gas to trigger the gas sensor. Hot air blown from a hair dryer was used to simulate a high temperature to trigger the temperature sensor, and a mobile phone flashlight was used to simulate a strong light to trigger the flame detector.

After the connection and testing of sensors, control board, and controlled devices were completed,Normal wedisplay triggered values the High gas gas sensor, concentration temperatur e Increasedsensor, and flame flame detectorIncrease by using in gas from the lighter, hot air from the hair dryer, and strong intensitylight from the mobiletemperature phone flashlight, respectively. The FiguredetectedFigure 14. changesChanges14. Changes ofof gas gasof gas concentration, concentr concentration,ation, light temperature,light intensity intensity and andand temperature. temperature. light intensity shown on the LCD are presented in Figure 14. When the gas concentration, temperature, and light intensity reached the set threshold, the alarm device emitted a warning light and sound (Figure 15), the gas

Alarm before activation Activated alarm

Figure 15. Activation of the alarm device.

Gas completely Shutoff device activated Gas supply being cut off Gas supply completely ventilated cut off

Figure 16. Gas shutoff device turned 90 degrees to turn off the gas supply.

High temperature notification Flame notification Gas notification

Figure 17. Line notification messages on the mobile device. Appl. Sci. 2019, 9, x FOR PEER REVIEW 15 of 21 Appl. Sci. 2019, 9, x FOR PEER REVIEW 15 of 21 shutoffAppl. Sci. device2019, 9, x wasFOR PEERactivated REVIEW to turn 90 degrees to turn off the gas supply (Figure 16),15 Line of 21 shutoffnotification device messageswas activated were sentto turn to the 90 user’s degrees mobi tole turnphone off (Figure the gas 17), supply and the (Figure main entrance 16), Line door shutoff device was activated to turn 90 degrees to turn off the gas supply (Figure 16), Line notificationwas automatically messages unlockedwere sent (Figureto the user’s 18). When mobi lethe phone system (Figure reads 17),that andany thedetected main valueentrance exceeds door the notification messages were sent to the user’s mobile phone (Figure 17), and the main entrance door wassafe automatically range, then unlocked the warning (Figure system, 18). When Line notifithe sycation,stem reads opening that theany doordetected lock value and closingexceeds the the gas was automatically unlocked (Figure 18). When the system reads that any detected value exceeds the safewill range, be triggeredthen the immediately.warning system, The Lineautomatic notifi cation,gas sh ut-offopening device the doortakes lockabout and 5 sclosing to completely the gas cut safe range, then the warning system, Line notification, opening the door lock and closing the gas willoff be the triggered gas supply. immediately. The automatic gas shut-off device takes about 5 s to completely cut off thewill gas be supply. triggered immediately. The automatic gas shut-off device takes about 5 s to completely cut off the gas supply.

Normal display values High gas concentration Increased flame Increase in Normal display values High gas concentration Increasedintensity flame Increasetemperature in Normal display values High gas concentration intensity Increased flame temperatureIncrease in Figure 14. Changes of gas concentration, lightintensity intensity and temperature.temperature Figure 14. Changes of gas concentration, light intensity and temperature. Appl. Sci. 2019, 9, 3520 Figure 14. Changes of gas concentration, light intensity and temperature. 16 of 22

Alarm before activation Activated alarm Alarm before activation Activated alarm Alarm before activationFigure 15. Activation of the alarm device. Activated alarm Figure 15. Activation of the alarm device. FigureFigure 15. Activation 15. Activation of the of alarm the alarm device. device.

Gas completely Shutoff device activated Gas supply being cut off Gas supply completely Gas completelyventilated Shutoff device activated Gas supply being cut off Gas supply cutcompletely off ventilatedGas completely Shutoff device activated Gas supply being cut off Gas cutsupply off completely ventilatedFigure 16. Gas shutoff device turned 90 degrees to turn off the gas supply. cut off FigureFigure 16. 16. GasGas shutoff shutoff devicedevice turned turned 90 90 degrees degrees to turn off off the gas supply. Figure 16. Gas shutoff device turned 90 degrees to turn off the gas supply.

High temperature notification Flame notification Gas notification HighAppl. temperature Sci. 2019, 9, x FOR notification PEER REVIEW Flame notification Gas notification 16 of 21 High temperature FigurenotificationFigure 17. Line17. Line notification notification Flame messagesnotification messages on the on the mobile mobile device. device. Gas notification Figure 17. Line notification messages on the mobile device. Figure 17. Line notification messages on the mobile device.

Front door locked Front door unlocked

FigureFigure 18. 18.Door Door being being automatically automatically unlocked. unlocked.

ThisThis study study has has mainly mainly used used three three kinds kinds of sensors of sensor to detects to thedetect possible the possible fire in the fire kitchen. in the Whenkitchen. anyWhen of these any sensors of these exceeds sensors our exceeds set range, our the set relevant range, the alarms, relevant notifications, alarms, notifications, gas shuts and gas door shuts locks and aredoor immediately locks are activated. immediately Their activated. startup values, Their response startup values, time and response completion time/ended and completion/ended time are shown in Tabletime 3are. When shown the in detected Table 3. values When reachthe detected the startup valu values,es reach the the system startup accurately values, the starts system the relevant accurately facilitiesstarts allthe the relevant time. facilities all the time.

Table 3. The startup value, response time and complete time of sensors/devices used in this study.

Sensor/Device Startup Value Response Time Complete/Ended Time Flame detector ≤600 Immediately N/A Gas methane sensor ≥500 Immediately N/A Temperature sensor ≥50 °C Immediately N/A Sound and light alarm N/A Immediately Detected values below/above startup values Line reporting system N/A 1–2 s Detected values below/above startup values Gas shutoff device N/A Immediately 4–5 s, manually open Front door N/A Immediately N/A, manually lock

Regarding the remote monitoring of the gas stove, the IP camera was turned on to check whether the stove had been turned off. If not, the user clicked on the “Turn off the main switch” button (Figure 19) to activate the gas shutoff device and turn off the gas supply (Figure 16). Figure 20 shows images of the gas stove before and after the gas was shut off.

Figure 19. Interface for remotely turning off the gas supply. Appl. Sci. 2019, 9, x FOR PEER REVIEW 16 of 21

Front door locked Front door unlocked

Figure 18. Door being automatically unlocked.

This study has mainly used three kinds of sensors to detect the possible fire in the kitchen. When any of these sensors exceeds our set range, the relevant alarms, notifications, gas shuts and doorAppl. Sci.locks2019 ,are9, 3520 immediately activated. Their startup values, response time and completion/ended17 of 22 time are shown in Table 3. When the detected values reach the startup values, the system accurately starts the relevant facilities all the time. Table 3. The startup value, response time and complete time of sensors/devices used in this study.

TableSensor 3./Device The startup value, Startup response Value time Response and complete Time time of sensors/devices Complete/ Endedused in Time this study. Sensor/DeviceFlame detector Startup600 Value Response Immediately Time Complete/Ended N/A Time ≤ GasFlame methane detector sensor ≤600500 Immediately Immediately N/A N /A ≥ GasTemperature methane sensorsensor ≥50050 CImmediately Immediately N/A N /A ≥ ◦ TemperatureSound and light sensor alarm ≥50 N °C/A Immediately Immediately Detected values N/A below /above startup values SoundLine reportingand light system alarm N/A N/A Immediately 1–2 s Detected Detected values values below/above below/above startup startup values values Line reporting system N/A 1–2 s Detected values below/above startup values Gas shutoff device N/A Immediately 4–5 s, manually open Gas shutoff device N/A Immediately 4–5 s, manually open Front door N/A Immediately N/A, manually lock Front door N/A Immediately N/A, manually lock

Regarding thethe remoteremote monitoring monitoring of of the the gas gas stove, stove, the IPthe camera IP camera was turned was turned on to check on to whether check whetherthe stove the had stove been had turned been oturnedff. If not, off. theIf not, user th clickede user clicked on the “Turnon the o“Turnff the mainoff the switch” main switch” button button(Figure (Figure 19) to activate 19) to activate the gas shutothe gasff deviceshutoff and device turn and off theturn gas off supply the gas (Figure supply 16 (Figure). Figure 16). 20 Figureshows 20images shows of images the gas of stove the gas before stove and before after theand gas after was the shut gas owasff. shut off.

Figure 19. Interface for remotely turning off the gas supply. Appl. Sci. 2019, 9, x FOR PEERFigure REVIEW 19. Interface for remotely turning off the gas supply. 17 of 21

(a) Before gas shutoff (b) After gas shutoff

Figure 20. InterfaceInterface for for remotely remotely turning turning off off the gas supply.

5. Discussion Discussion This study originally adopted the normally open open solenoid solenoid valve valve for for the the gas gas shutoff shutoff device.device. However, thisthis type type of of valve valve must must be continuously be continuously powered powered on to remainon to closed,remain which closed, is unsuitablewhich is unsuitablefor use in the for shutting use in the off ofshutting the gas off supply, of the because gas supply, gas would because continue gas would to be suppliedcontinue whento be thesupplied valve whenis not powered,the valve resultingis not powered, in danger. resulting To completely in danger. shut To ocompletelyff the gas supply, shut off this the study gas adoptedsupply, this the AD-704Tstudy adopted gas shuto the AD-704Tff device developedgas shutoff by device Sunwe de Technology.veloped by Sunwe When Techno the sensorslogy. detect When flames, the sensors high detecttemperatures, flames, orhigh a gas temperatures leak, the shuto, orff devicea gas isleak, automatically the shutoff turned device 90 degreesis automatically clockwise turned to shut o90ff degreesthe gas supply,clockwise ensuring to shut residents’ off the gas safety. supply, ensuring residents’ safety. The traditionaltraditional point-type point-type smoke smoke detectors detectors have have the disadvantage the disadvantage of not beingof not able being to eff ectivelyable to effectivelyexert their exert fire detection their fire edetectionffects in buildingseffects in buil withdings large with areas large and areas high and floors high [20 floors,52]. The[20,52]. biggest The biggestdrawback drawback of video of fire video detectors fire detectors is that these is that cannot these detect cannot early detect fires early in time. fires This in makestime. This it impossible makes it impossiblefor the system for tothe perform system the to mostperform effective the most fire extinguishing effective fire functionextinguishing in the earlyfunction stages in ofthe the early fire. Thestages flame of the sensor fire. and The temperature flame sensor sensor and usedtemperat in thisure study sensor will used immediately in this study trigger will the immediately sound and trigger the sound and light alarm, transmit the notification messages, cut off the gas supply and open the door lock when the flame intensity or temperature reaches the set value, so as to effectively serve the function of kitchen fire prevention and control. When the detected values reach the set values in program, the system starts the relevant facilities immediately. It takes 1–2 s to transfer the Line notification. The gas shutoff device takes 4–5 s to complete the turning off of the gas. While the kitchen fire prevention system in this study has sensors and a gas shutoff device, which is the same as the patent TW M501536, it also includes an alarm device, an automatic door unlocking function, and a Line message reporting system, thereby rendering the proposed kitchen fire prevention system more comprehensive. This study’s system is also similar to the patent TW 201709157 insofar as both systems have an automatic gas shutoff device, a wireless reporting function, and an alarm device. However, the proposed system further includes the functions of the detection of flame, temperature, and gas and automatic door unlocking, which enable the community management team and rescue personnel to immediately enter the house to fight the fire. Our team has a lab space wherein the research results of the system have been displayed. There are many members of faculty, students and other users who have been able to experience the system and exchange opinions. Most of the friends and colleagues who have visited have given positive comments. In addition, our research team has organized the user opinions as a reference for future study and as potential direction for improvement of the system.

6. Conclusion This study constructed a kitchen fire prevention system that can instantly activate an alarm device to issue warnings to the residents and shut off the gas supply when it detects a gas leak, flame, or high temperature in the kitchen. In addition, Line messages are sent to notify the Appl. Sci. 2019, 9, 3520 18 of 22 light alarm, transmit the notification messages, cut off the gas supply and open the door lock when the flame intensity or temperature reaches the set value, so as to effectively serve the function of kitchen fire prevention and control. When the detected values reach the set values in program, the system starts the relevant facilities immediately. It takes 1–2 s to transfer the Line notification. The gas shutoff device takes 4–5 s to complete the turning off of the gas. While the kitchen fire prevention system in this study has sensors and a gas shutoff device, which is the same as the patent TW M501536, it also includes an alarm device, an automatic door unlocking function, and a Line message reporting system, thereby rendering the proposed kitchen fire prevention system more comprehensive. This study’s system is also similar to the patent TW 201709157 insofar as both systems have an automatic gas shutoff device, a wireless reporting function, and an alarm device. However, the proposed system further includes the functions of the detection of flame, temperature, and gas and automatic door unlocking, which enable the community management team and rescue personnel to immediately enter the house to fight the fire. Our team has a lab space wherein the research results of the system have been displayed. There are many members of faculty, students and other users who have been able to experience the system and exchange opinions. Most of the friends and colleagues who have visited have given positive comments. In addition, our research team has organized the user opinions as a reference for future study and as potential direction for improvement of the system.

6. Conclusions This study constructed a kitchen fire prevention system that can instantly activate an alarm device to issue warnings to the residents and shut off the gas supply when it detects a gas leak, flame, or high temperature in the kitchen. In addition, Line messages are sent to notify the community management team and emergency units and the main entrance door of the residence is automatically unlocked to allow the rescue personnel to enter the house to extinguish the fire. This can effectively reduce the annual casualties in kitchen fire accidents. In addition, the remote monitoring function enables users to monitor the gas stove at any time and turn off the stove by simply clicking on a button on their mobile phone. Future research directions can be combined with prevention of carbon monoxide poisoning to effectively protect the home and the safety of the residents.

Author Contributions: Conceptualization, Y.-C.S.; Funding acquisition, C.-K.L.; Investigation, W.-L.H.; Methodology, C.-S.H.; Project administration, W.-L.H.; Resources, J.-Y.J.; Software, C.-S.H.; Supervision, Y.-C.S.; Validation, J.-Y.J.; Visualization, C.-K.L.; Writing—original draft, Y.-C.S.; Writing—review and editing, W.-L.H. Funding: This research received no external funding. Acknowledgments: Our deepest gratitude goes to the anonymous reviewers for their careful work and thoughtful suggestions that have helped improve this paper substantially. Conflicts of Interest: The author declares no conflict of interest.

References

1. Saeed, F.; Paul, A.; Rehman, A.; Hong, W.; Seo, H. Iot-based intelligent modeling of smart home environment for fire prevention and safety. J. Sens. Actuator Netw. 2018, 7, 11. [CrossRef] 2. Cimmino, A.; Pecorella, T.; Fantacci, R.; Granelli, F.; Rahman, T.F.; Sacchi, C.; Carlini, C.; Harsh, P. The role of small cell technology in future smart city applications. Trans. Emerg. Telecommun. Technol. 2014, 25, 11–20. [CrossRef] 3. Dutta, J.; Roy, S.; Chowdhury, C. Unified framework for iot and smartphone based different smart city related applications. Microsyst. Technol. 2019, 25, 83–96. [CrossRef] 4. Datta, S.K.; Da Costa, R.P.F.; Bonnet, C.; Härri, J. Onem2m architecture based iot framework for mobile crowd sensing in smart cities. In Proceedings of the 2016 IEEE European Conference on Networks and Communications (EuCNC), Athens, Grece, 27–30 June 2016; pp. 168–173. Appl. Sci. 2019, 9, 3520 19 of 22

5. Brinded, L. The 21 Countries with the Best Quality of Life in the World for Expats. Available online: https://www.businessinsider.com/internations-countries-with-the-best-quality-of-life-in-the-world- for-expats-2017-1?r=UK (accessed on 26 May 2019). 6. Cheng, S.T.; Lei, M.Y. Causes of Residential Fire in Taiwan; Architecture and Building Research Institute, Ministry of Interior: Taipei, China, 1999. 7. Corsi, C. Smart sensors. Microsyst. Technol. 1995, 1, 149–154. [CrossRef] 8. Chen, C.-L.; Deng, Y.-Y.; Lee, C.-F.; Zhu, S.; Chiu, Y.-J.; Wu, C.-M. An internet-of-things-based sensing rural medical care system. Sens. Mater. 2019, 31, 1037–1063. [CrossRef] 9. Khera, B.S. Iot Technologies for in Smart Buildings and Cities. Available online: https:// ifpmag.mdmpublishing.com/iot-technologies-for-fire-safety-in-smart-buildings-and-cities/ (accessed on 21 February 2019). 10. Bouchard, B.; Bouchard, K.; Bouzouane, A. A smart range helping cognitively-impaired persons cooking. In Proceedings of the 26th IAAI Conference, Québec City, QC, Canada, 29–31 July 2014. 11. Lapointe, J.; Bouchard, B.; Bouchard, J.; Potvin, A.; Bouzouane, A. Smart homes for people with alzheimer’s disease: Adapting prompting strategies to the patient’s cognitive profile. In Proceedings of the 5th International Conference on Pervasive Technologies Related to Assistive Environments ACM, Crete, Greece, 6–8 June 2012; p. 30. 12. Abdulrazak, B.; Giroux, S.; Bouchard, B.; Mokhtari, M.; Pigot, H. Towards useful services for elderly and people with disabilities. In Proceedings of the 9th International Conference on Smart Homes and Health Telematics, Montreal, QC, Canada, 20–22 June 2011; Springer: Berlin, Germany, 2011; Volume 6719. 13. National Fire Agency Ministry of the Interior. Number of Fire Accidents and Fire Loss Between 2013 and 2018; National Fire Agency Ministry of the Interior: Taipei, Taiwan, 2019. 14. Apple Online. Three Steps to Fight the Fire of Kitchen Oil Pan. Available online: https://tw.appledaily.com/ new/realtime/20160901/939710/ (accessed on 26 May 2019). 15. Kknews.ooo. How to Effectively Prevent Kitchen Fires? Available online: https://kknews.cc/zh-tw/home/ 33e9vng.html (accessed on 26 May 2019). 16. Chan, M.; Estève, D.; Escriba, C.; Campo, E. A review of smart homes—Present state and future challenges. Comput. Methods Programs Biomed. 2008, 91, 55–81. [CrossRef][PubMed] 17. Wilson, C.; Hargreaves, T.; Hauxwell-Baldwin, R. Benefits and risks of smart home technologies. Energy Policy 2017, 103, 72–83. [CrossRef] 18. Noury, N.; Virone, G.; Barralon, P.; Ye, J.; Rialle, V.; Demongeot, J. New trends in health smart homes. In Proceedings of the 5th IEEE International Workshop on Enterprise Networking and Computing in Healthcare Industry, Santa Monica, CA, USA, 7 June 2003; pp. 118–127. 19. Liu, Y.; Qiu, B.; Fan, X.; Zhu, H.; Han, B. Review of smart home energy management systems. Energy Procedia 2016, 104, 504–508. [CrossRef] 20. Teslyuk, V.; Beregovskyi, V.; Denysyuk, P.; Teslyuk, T.; Lozynskyi, A. Development and implementation of the technical accident prevention subsystem for the smart home system. Int. J. Intell. Syst. Appl. 2018, 11, 1. [CrossRef] 21. Sanchez, V.G.; Pfeiffer, C.F.; Skeie, N.-O. A review of smart house analysis methods for assisting older people living alone. J. Sens. Actuator Netw. 2017, 6, 11. [CrossRef] 22. Briere, D.; Hurley, P. Smart Homes for Dummies; John Wiley & Sons: Hoboken, NJ, USA, 2011. 23. Mahmoud, A. Al-Qutayri Smart Home Systems; InTech: London, UK, 2010. 24. Batov, E.I. The distinctive features of “smart” buildings. Procedia Eng. 2015, 111, 103–107. [CrossRef] 25. Prabakaran, N.; Kannan, R.J. Sustainable life-span of wsn nodes using participatory devices in pervasive environment. Microsyst. Technol. 2017, 23, 651–657. [CrossRef] 26. Jin, J.; Gubbi, J.; Marusic, S.; Palaniswami, M. An information framework for creating a smart city through internet of things. IEEE Internet Things J. 2014, 1, 112–121. [CrossRef] 27. Bhatti, S.; Xu, J.; Memon, M. Clustering and fault tolerance for target tracking using wireless sensor networks. IET Wirel. Sens. Syst. 2011, 1, 66–73. [CrossRef] 28. Li, W.; Zhang, W. Sensor selection for improving accuracy of target localisation in wireless visual sensor networks. IET Wirel. Sens. Syst. 2012, 2, 293–301. [CrossRef] Appl. Sci. 2019, 9, 3520 20 of 22

29. Pagano, S.; Peirani, S.; Valle, M. Indoor ranging and localisation algorithm based on received signal strength indicator using statistic parameters for wireless sensor networks. IET Wirel. Sens. Syst. 2015, 5, 243–249. [CrossRef] 30. Rathore, M.M.; Ahmad, A.; Paul, A.; Wan, J.; Zhang, D. Real-time medical emergency response system: Exploiting iot and big data for public health. J. Med Syst. 2016, 40, 283. [CrossRef][PubMed] 31. Rathore, M.M.; Paul, A.; Ahmad, A.; Anisetti, M.; Jeon, G. Hadoop-based intelligent care system (hics): Analytical approach for big data in iot. ACM Trans. Internet Technol. 2017, 18, 8. [CrossRef] 32. Rathore, M.M.; Paul, A.; Hong, W.-H.; Seo, H.; Awan, I.; Saeed, S. Exploiting iot and big data analytics: Defining smart digital city using real-time urban data. Sustain. Cities Soc. 2018, 40, 600–610. [CrossRef] 33. Yick, J.; Mukherjee, B.; Ghosal, D. Wireless sensor network survey. Comput. Netw. 2008, 52, 2292–2330. [CrossRef] 34. Potter, C.; Hancke, G.; Silva, B. Machine-to-machine: Possible applications in industrial networks. In Proceedings of the 2013 IEEE International Conference on Industrial Technology (ICIT), Cape Town, South Africa, 25–28 February 2013; pp. 1321–1326. 35. Opperman, C.A.; Hancke, G.P. In Using nfc-enabled phones for remote data acquisition and digital control. In Proceedings of the IEEE Africon, Livingston, Zambia, 13–15 September 2011; pp. 1–6. 36. Dutta, J.; Pramanick, P.; Roy, S. Energy-efficient gps usage in location-based applications. In Information and Decision Sciences; Springer: Berlin/Heidelberg, Germany, 2018; pp. 345–353. 37. Aharonov, R.; Segev, L.; Meilijson, I.; Ruppin, E. Localization of function via lesion analysis. Neural Comput. 2003, 15, 885–913. [CrossRef][PubMed] 38. Doncieux, S.; Meyer, J.-A. Evolution of neurocontrollers for complex systems: Alternatives to the incremental approach. In Proceedings of the International Conference on Artificial Intelligence and Applications, Innsbruck, Austria, 16–18 February 2004; pp. 1–6. 39. Jalili-Kharaajoo, M.; Mohammadi-Milasi, R. Design of simple neuro-controller for global transient control and voltage regulation of power systems. Int. J. ControlAutom. Syst. 2005, 3, 302–307. 40. Floreano, D.; Mondada, F. Evolutionary neurocontrollers for autonomous mobile robots. Neural Netw. 1998, 11, 1461–1478. [CrossRef] 41. Silva, B.; Fisher, R.M.; Kumar, A.; Hancke, G.P. Experimental link quality characterization of wireless sensor networks for underground monitoring. IEEE Trans. Ind. Inform. 2015, 11, 1099–1110. [CrossRef] 42. Chiwewe, T.M.; Mbuya, C.F.; Hancke, G.P. Using cognitive radio for interference-resistant industrial wireless sensor networks: An overview. IEEE Trans. Ind. Inform. 2015, 11, 1466–1481. [CrossRef] 43. Buratti, C.; Conti, A.; Dardari, D.; Verdone, R. An overview on wireless sensor networks technology and evolution. Sensors 2009, 9, 6869–6896. [CrossRef][PubMed] 44. Tan, W.; Wang, Q.; Huang, H.; Guo, Y.; Zhang, G. Mine fire detection system based on wireless sensor network. In Proceedings of the IEEE 2007 International Conference on Information Acquisition, Jeju, Korea, 8–11 July 2007; pp. 148–151. 45. Zhang, J.; Li, W.; Han, N.; Kan, J. Forest fire detection system based on a zigbee wireless sensor network. Front. For. China 2008, 3, 369–374. [CrossRef] 46. Arrue, B.C.; Ollero, A.; De Dios, J.M. An intelligent system for false alarm reduction in forest-fire detection. IEEE Intell. Syst. Appl. 2000, 15, 64–73. [CrossRef] 47. M Martel, L.; Menard, F. Canadian Census; Statistics Canada, Demography Division: Ottawa, ON, Canada, 2011. 48. Obi, T.; Iwasaki, N. Innovative applications and strategy on ict applications for aging society: Case study of japan for silver ict innovations. In Proceedings of the 7th International Conference on Theory and Practice of Electronic Governance, Seoul, Korea, 22–25 October 2013; pp. 218–226. 49. Abdulrazak, B.; Yared, R.; Tessier, T.; Mabilleau, P. Toward pervasive computing system to enhance safety of ageing people in smart kitchen. In Proceedings of the ICT4AgeingWell, Lisbon, Portugal, 20–22 May 2015; pp. 17–28. 50. San-Miguel-Ayanz, J.; Ravail, N. Active fire detection for fire emergency management: Potential and limitations for the operational use of remote sensing. Nat. Hazards 2005, 35, 361–376. [CrossRef] 51. Mobin, M.I.; Abid-Ar-Rafi, M.; Islam, M.N.; Hasan, M.R. An intelligent fire detection and mitigation system safe from fire (sff). Int. J. Comput. Appl. 2016, 133, 1–7. Appl. Sci. 2019, 9, 3520 21 of 22

52. Liu, Z.; Kim, A.K. Review of recent developments in fire detection technologies. J. Fire Prot. Eng. 2003, 13, 129–151. [CrossRef] 53. Celik, T.; Demirel, H.; Ozkaramanli, H.; Uyguroglu, M. Fire detection using statistical color model in video sequences. J. Vis. Commun. Image Represent 2007, 18, 176–185. [CrossRef] 54. Dedeoglu, N.; Toreyin, B.U.; Gudukbay, U.; Cetin, A.E. Real-time fire and flame detection in video. In Proceedings of the IEEE 2005 International Conference on Acoustics Speech, and Signal Processing, Philadelphia, PA, USA, 23 March 2005; Volume 662, pp. ii/669–ii/672. 55. Celik, T. Fast and efficient method for fire detection using image processing. ETRI J. 2010, 32, 881–890. [CrossRef] 56. Somov, A.; Spirjakin, D.; Ivanov, M.; Khromushin, I.; Passerone, R.; Baranov, A.; Savkin, A. Combustible gases and early fire detection: An autonomous system for wireless sensor networks. In Proceedings of the 1st International Conference on Energy-Efficient Computing and Networking, Passau, Germany, 13–15 April 2010; ACM: New York, NY, USA, 2010; pp. 85–93. 57. Tang, Z.; Shuai, W.; Jun, L. Remote alarm monitor system based on gsm and arm. Procedia Eng. 2011, 15, 65–69. [CrossRef] 58. Apeh, S.; Erameh, K.; Iruansi, U. Design and development of kitchen gas leakage detection and automatic gas shut off system. J. Emerg. Trends Eng. Appl. Sci. 2014, 5, 222–228. 59. Dubey, A. Design & development of arm7tdmi-s based gsm mobile for home automation & security. E-J. Sci. Technol. 2012, 7, 67–74. 60. Dukuzumuremyi, J.P.; Zou, B.; Hanyurwimfura, D. A novel algorithm for fire/smoke detection based on computer vision. Int. J. Hybrid Inf. Technol. 2014, 7, 143–154. [CrossRef] 61. Rossi, L.; Akhloufi, M. Dynamic Fire 3D Modeling Using a Real-Time Stereovision System; Springer: Dordrecht, The Netherlands, 2010; pp. 33–38. 62. Jun, C.; Yang, D.; Dong, W. An early fire image detection and identification algorithm based on dfbir model. In Proceedings of the WRI World Congress on Computer Science and Information Engineering, Los Angeles, CA, USA, 31 March–2 April 2009; pp. 229–232. 63. Krstini´c,D.; Stipaniˇcev, D.; Jakovˇcevi´c,T. Histogram-based smoke segmentation in forest fire detection system. Inf. Technol. Control 2015, 38.[CrossRef] 64. Bahrepour, M.; Meratnia, N.; Havinga, P.J. Automatic Fire Detection: A Survey from Wireless Sensor Network Perspective; Centre for Telematics and Information Technology (CTIT): Enschede, The Netherlands, 2008; pp. 1–13. Available online: https://research.utwente.nl/en/publications/automatic-fire-detection-a-survey- from-wireless-sensor-network-pe. 65. Intellectual Property Office. Fire Detection and Extinguishing Equipment (tw m501536). Available online: https://twpat-simple.tipo.gov.tw/tipotwoc/tipotwekm?!!FR_M501536 (accessed on 26 May 2019). 66. Intellectual Property Office. Kitchen Fire Prevention System and Kitchen Monitoring Device (tw 201709157). Available online: https://twpat-simple.tipo.gov.tw/tipotwoc/tipotwekm?!!FR_201709157 (accessed on 26 May 2019). 67. Arduino. What is Arduino? Available online: https://www.arduino.cc/ (accessed on 28 April 2019). 68. Webduino. Webduino Cloud. Available online: https://webduino.io/ (accessed on 28 April 2019). 69. PlayRobot, Co. Ltd. Flame Sensor (cggs). Available online: https://www.playrobot.com/light/1022-33-5v- lm393-flame-sensor.html (accessed on 26 May 2019). 70. Itread01.com. Arduinoarduino Temperature Sensor (lm35,18b20,dh11). Available online: https://www. itread01.com/content/1545646206.html (accessed on 26 May 2019). 71. PlayRobot, Co. Ltd. Mq-4 Methane Gas Sensor Module. Available online: https://www.playrobot.com/gas/ 1539-cng-gas-sensor.html (accessed on 26 May 2019). 72. Yoosee Cameras. Yoosee 1080p Dynamic Tracking of Wireless Cameras. Available online: http://www.bd- club.tw/product/yoosee/z01t6/index.html (accessed on 26 May 2019). 73. TaiwanIOT. 1 Way Relay Module 5v Low Level Trigger Relay Expansion Board. Available online: https://www.taiwaniot.com.tw/product/1%e8%b7%af%e7%b9%bc%e9%9b%bb%e5%99%a8%e6%a8%a1% e7%b5%84-5v%e4%bd%8e%e9%9b%bb%e5%b9%b3%e8%a7%b8%e7%99%bc-%e7%b9%bc%e9%9b%bb% e5%99%a8%e6%93%b4%e5%b1%95%e6%9d%bf-%e8%97%8d%e7%89%88/ (accessed on 20 July 2019). Appl. Sci. 2019, 9, 3520 22 of 22

74. Winstar Display, Co. Ltd. Cog Monochrome Lcd Display Module 16x2 Model no. Wo1602i. Available online: https://www.winstar.com.tw/zh-tw/products/cog-lcd-module-display/monochrome-lcd.html (accessed on 28 April 2019). 75. Sunwe Technology Co. Ltd. Gas Shutoff Device. Available online: http://www.sunwe.com.tw/gascontrol2. htm (accessed on 28 April 2019). 76. IFTTT. A World That Works for You. Available online: https://ifttt.com/ (accessed on 28 April 2019). 77. LINE Corporation. Line App Icon Guidline. Available online: https://line.me/zh-hant/ (accessed on 28 April 2019).

© 2019 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (http://creativecommons.org/licenses/by/4.0/).