Real time alert system in Smart Home

- The human’s aspiration has always been to ease daily responsibilities. With the grow and the advancement of the technology their facilitation and automation are enabled. Nowadays, smart homes are becoming popular, with which everyone can almost forget the daily responsibilities in their home. Smart home is a system that includes multiple aspects of the home and allows their remote control via mobile or web applications. Smart lighting, heating, cooling, home appliance, ventilation, security systems and many more are part of the smart homes. This system brings security, comfort, but also saves energy, time and money. Through mobile applications or software, the user has access to his home at any time and any place. The purpose of this paper is to make a prototype of a smart home security system. It will be equipped with several sensors and a NodeMcu.


I. INTRODUCTION
he popularity of home automation has been growing steadily in recent years due to increased availability, simplicity, increased quality and comfort of life. The idea of controlling aspects of our homes and allowing certain elements to react automatically to events is becoming increasingly popular and necessary for security and financial purposes. That's why smart home applications are playing an increasingly important role today. With the rapid development of the Internet of Things (IoT), the smart home is increasingly attracting people's attention for improving the quality of life. With the increased economic development, the standard of living increases as well. Modern society requires security, economy and a comfortable life that is ideal for every family. Home automation is a promising idea. The main advantage, apart from increased comfort and safety, is the rational use of energy and other resources, providing significant savings. The construction and automation of these smart homes is real challenge for every engineer.

II. DEFINITION AND HISTORY ABOUT SMART HOME
With the constant growth and progress of telecommunication technology, the Internet-of-Computer era has moved into the Internet-of-Things era (IoT). The Internet of Things (IoT) describes a network infrastructure of identifiable things that share data through the Internet [1]. The IoT is the main part of the idea of connected world. Nowadays, our homes, hospitals, factories, and cities are being enhanced with devices that have computational and networking capabilities. The substantial development activity in IoT includes many categories, such as smart grid, smart logistics, environment and safety testing, intelligent transportation, industrial control and automation, finance and service, military defense, health care, fine agriculture, and smart homes. The early beginnings of smart home were in 1975 with the release of X10, a communication protocol for smart home. X10 allows products to talk to each other with sending 120 kHz radio frequency (RF) bursts of digital information onto existing electrical wires of a home to programmable outlets or switches. Because of the limitations with the response and the use of electrical wiring x10 was not always reliable. Sometimes the signals would not cross circuits or there would be signal lost. Later a two-way x10 devices were released but with a higher cost.
In 1992 the smart home was defined as the integration of different services within a home by using a common communication system. Berlo et al. introduced automatic control to the definition of smart home [2]. Alam defined a smart home is an application of ubiquitous computing in which the home environment is monitored by ambient intelligence to provide context-aware services and facilitate remote home control [3]. In 2005 the Insteon company released technology that combines electric wiring with wireless signals. Zigbee, Z-Wave and other protocols came to counter the problems of x10. The main difficult in smart home is the restriction caused by the complicated configurations of the devices and the implementation of the system setups and procedures. www.ijsrp.org Nowadays, smart home service providers suggest cloud-based backend platforms which provide programming frameworks to achieve better and easier setup and third-party application development. These kinds of frameworks are included in Vera Control's Vera3, Weave/Brillo by Google, HomeKit by Apple, SmartThings by Samsung, AllSeen by Alliance AllJoyn, etc.

III. SMART HOME SECURITY
One of the main branches of the smart home is security. The smart home cannot be complete without security part. Without security the comfort and safety in the home that everyone desire cannot be achieved. Conventional security systems keep homeowners, and their property, safe from intruders. (Rosslin John Robles1 and Tai-hoon Kim1). Smart home security systems offer many benefits. Fire detection, gas leak detection, water leak detection, camera monitoring, smart lights, alarms, alerting the owner with email, sms and etc. In the event of a fire, the smart home security system can alert the homeowner and notify emergency services. Artificial intelligence programs can find the location of the fire and provide that information to the fire emergency services. Access control, video verification, fingerprint verification and many other are also desired by people nowadays. More than 70 percent of the users of households in USA wanted access control as a feature of their home security. The desired control capabilities for a new smart home security system according to households in the United States as of 2019 are shown in the Fig. 1.0. As it is mentioned in the introduction, the construction of smart home is real challenge for any engineer. These kinds of projects have been conducted over the last decades. Different functions, utilities and ideas has been provided. That is why our system is inclined on the security in the smart home. The existing security in our smart home system uses gas sensor, fire sensor, water leak sensor, motion sensor and other sensors that use simple analog or digital technology and the data collected from them goes into our system that notifies the owner or the emergency services.

Proposed system
The system proposed is a system for security in Smart home. The system detects fire, gas leak, water leak and motion. 1) Gas leak, using MQ-2 sensor; 2) Water leak, using water level sensor; 3) Fire detection, using flame sensor; 4) Alarming, using Buzzer and Led diode. www.ijsrp.org The implemented system contains a NodeMcu board which is used as a main processing unit for the entire system and all the sensors and devices are connected with it. The NodeMcu connects to WiFi and sends the data to ActiveMq through Mqtt protocol. After that the Smart home backend application based on Spring Boot take the data and send it to the GUI part of this Smart home system. The processed data from the sensors is stored for future analysis. Also, the user will be notified about alarm on the GUI part (Admin module). An image of system architecture is shown in Fig. 2.0.

Flame Sensor
A sensor which is most sensitive to a normal light is known as a flame sensor. That's why this sensor module is used in flame alarms. This sensor detects flame otherwise wavelength within the range of 760 nm -1100 nm from the light source. This sensor can be easily damaged to high temperature. This sensor can be placed at a certain distance from the flame. The flame detection can be done from a 100cm distance and the detection angle will be 600. The output of this sensor is an analog signal or digital signal. www.ijsrp.org When the sensor detects fire, the NodeMcu creates alarm and send message to the user. An image of flame sensor is shown on Fig. 6.0 below.

Water Leak Sensor
The working of the water level sensor is pretty straightforward. The series of exposed parallel conductors, together acts as a variable resistor (just like a potentiometer) whose resistance varies according to the water level. The change in resistance corresponds to the distance from the top of the sensor to the surface of the water. The resistance is inversely proportional to the height of the water: 1) The more water the sensor is immersed in, results in better conductivity and will result in a lower resistance.
2) The less water the sensor is immersed in, results in poor conductivity and will result in a higher resistance. The sensor produces an output voltage according to the resistance, which by measuring we can determine the water level. Sensor specifications: 1) Operating voltage: DC3-5V; 2) Operating current: less than 20mA; 3) Sensor Type: Analog; 4) Detection Area: 40mmx16mm; 5) Operating temperature: 10℃-30℃; 6) Humidity: 10% -90% non-condensing; This sensor is used to prevent water leak. When the level of water gets higher, the NodeMCU create alarm and send message to the user. An image of Water leak Sensor is shown on Fig. 7.0 below. PIR sensors allow you to sense motion, almost always used to detect whether a human has moved in or out of the sensors range. They are small, inexpensive, low-power, easy to use and don't wear out. For that reason, they are commonly found in appliances and gadgets used in homes or businesses. They are often referred to as PIR, "Passive Infrared", "Pyroelectric", or "IR motion" sensors. 1) Size: Rectangular 2) Output: Digital pulse high (3V) when triggered (motion detected) digital low when idle (no motion detected). Pulse lengths are determined by resistors and capacitors on the PCB and differ from sensor to sensor. 3) Sensitivity range: up to 20 feet (6 meters) 110° x 70° detection range 4) Power supply: 5V-12V input voltage for most modules (they have a 3.3V regulator), but 5V is ideal in case the regulator has different specs The PIR sensor is used to detect motion in front of the smart home. After it detects motion, the lights turn on and the alarm gets activated. An image of PIR sensor is shown in Fig 8.0   A buzzer is a small efficient component to add sound features to our project/system. It is very small and compact 2-pin structure hence can be easily used on breadboard. When sensors above detect fire, gas leak, water leak or unattended access at home, the system activate the buzzer to make noise as alarm.   The current system is not complete, and it has some limitations. But with feature work use cases it will become a perfect solution for smart home security. In the feature work we want to make more about access security. The first thing is Authentication for access with face recognition and fingerprint. The next feature is with the motion sensor and the camera. When motion sensor detects some motion, it will trigger the camera to take a picture. ISSN  www.ijsrp.org

VI. CONCLUSION
Without security, the comfort and safety in the home that everyone desire cannot be achieved. As we mentioned above, smart home security systems offer many benefits like fire detection, gas leak detection, water leak detection, camera monitoring, smart lights, alarms, alerting the owner with email, sms etc. The results obtained were satisfactory and can be further improved. No smart home is really "smart" without well implemented security solution.