Security Surveillance and Home Automation System using IoT 1 Security Surveillance and Home Automation System using IoT A. Sanjay1, Meenu Vijarania2,* and Vivek Jaglan3 1Student, Amity University Haryana, Manesar, India 2Assistant Professor, Amity University Haryana, Manesar, India 3Professor, Graphic Era Hill University, Dehradun, India Abstract Internet of Things provides connectivity and user interoperability among different systems, devices, networks and services in particular control systems. IoT can be envisioned as a network of connected devices which are capable of providing intelligent services. This paper presents a security surveillance system in buildings based on IoT using Raspberry Pi. It can be used at industries, homes and office etc, where the camera records the movement of objects and using IoT devices and the data is stored on to the server. The idea is to lock the door even from outside the house and it can be opened using the android phone itself. If some intruder tries to break or to get in anonymously, the system will detect the person and photo will be clicked by the security camera and send the message along with photo on to the owner’s mail, thus creating the evidence for our safety. Some additional features for automation like rain sensing windows using rain sensor and servo motor and automatic light on/off for saving electricity and reduce human effort with IR senor and a simple led have also been implemented in this paper. Hardware implementation has been done for the proposed model and it will be applicable for monitoring home, industry, office etc. in the absence of user. Keywords: IoT, Sensors, home automation, security, android, surveillance, Raspberry Pi Handling Editor: Akshat Agrawal (Amity University Gurgaon, India) Received on 06 July 2020, accepted on 25 July 2020, published on 06 August 2020 Copyright © 2020 Meenu Vijarania et al., licensed to EAI. This is an open access article distributed under the terms of the Creative Commons Attribution licence (http://creativecommons.org/licenses/by/3.0/), which permits unlimited use, distribution and reproduction in any medium so long as the original work is properly cited. doi: 10.4108/eai.21-7-2020.165963 *Corresponding author. Email: meenuhans.83@gmail.com 1. Introduction Now a days, digital technologies have been revolutionized where different things and people are interconnected in order to send/receive the information. It intends to benefit the people with the help of internet services. In IoT, various things like sensors and other devices are connected through internet to exchange and collect the information with each other. It enables various devices to collaborate, interact, and, learn from each other’s experiences just like humans do. Using IoT billions of objects are intelligently connected in variety of applications. IoT is broadly deployed in variety of domains namely: agriculture, healthcare, smart cities. Smart buildings and smart security are becoming a reality with the combination of underlying communication and monitoring infrastructure that comprises of smart devices such as actuators, cameras, sensors, meters and RFIDs. Now days, societies have high demand for security and surveillance as there is rapid developments of embedded system and security awareness. Much research is still going on to improve the design of intelligent surveillance and security system to enhance monitoring capabilities and security of remote places. The main focus of this paper is to implement the functionality of wireless Home automation features and Home security. The model of the currently built system sends the alert message to the owner using IoT if some intruder tries to break or to get into the home anonymously. The system will detect the person and photo will be clicked by the security camera and sends the message along with photo on to the owner’s mail. Whereas, the person entering in the house is identified as guest, then the owner can open the door using his mobile phone instead of triggering security alarms. The owner can do various activities like switching on various appliances inside the house, which are EAI Endorsed Transactions on Smart Cities Research Article EAI Endorsed Transactions on Smart Cities 04 2021 - 08 2021 | Volume 5 | Issue 15 | e1 http://creativecommons.org/licenses/by/3.0/ 2 also connected and controlled by the micro-controller in the system to welcome his guest. These are main key features and the main objectives of the paper : 1. This project has been included with a face detection module with the help of raspberry pi. 2. Open cv with the cascades for the face which is combined with a camera. It can a detect a face of the person standing for a long time in front of the House. 3. For Automation it a preprogrammed process in which it does take input from the sensors and take the action as per the command give for the action for example when a sensor gives a output through GPIO 4. Pins (General Purpose Input/Output). 5. For Android door lock I have used a socket connection for the raspberry pi to communicate with a android device which sends command for the raspberry pi to lock or unlock the door. 6. Using sensors like (rain sensor, IR sensor) for rain sensing windows and to automatic switch on and off the light when there are needed. 2. Related work Various models for building surveillance have been proposed earlier. These models optimized the surveillance system by using ultrasonic sensors [2], photovoltaic array [3], wireless sensor networks [4]. By introducing tel- monitoring, intelligent fish eye camera techniques surveillance system was improved. Though, these techniques were not able to control the surveillance operation sitting at remote place whenever the event occurred. In [5] author suggested a intelligent and automatic system for smart home using sensor networks. The author used ZigBee and IEEE 802.15.4 to develop energy efficient smart home system and it collect the data using Passive InfraRed (PIR) Sensor, occupancy sensor and photo sensor. In [6] author proposed a smart home automation scheme using IoT and Raspberry Pi. Home appliances are connected and monitored using internet. Surveillance and sensing operation is conceded by Raspberry Pi. Motion sensor and camera were used for detecting motion and intruder at the door. 3. Proposed Work In Home security there are two modules: • Smart security camera • Android door lock. In this project face detection module has been implemented with the help of raspberry pi and Open cv with the cascades for the face which is combined with a camera, it can a detect a face of a person standing for a long time in front of the House. Then it takes a photo of the persons face and email it to the owner’s mail id through SMTP protocol (Simple Mail Transfer Protocol). The architectural diagram is shown in the figure 1. For Android door a socket connection is created for the raspberry pi to communicate with a android device which sends command for the raspberry pi to lock or unlock the door. A socket provides end to end connectivity between two programs running on the network. Every socket has a associated port number so that the transport layer can recognize the application for which the data is destined. The endpoint address is combination of port number and IP address. A. Sanjay, Meenu Vijarania and Vivek Jaglan EAI Endorsed Transactions on Smart Cities 04 2021 - 08 2021 | Volume 5 | Issue 15 | e1 3 Figure 1. Architecture of Security surveillance and home automation system Figure 2. Block diagram of smart security camera and android door lock Security Surveillance and Home Automation System using IoT EAI Endorsed Transactions on Smart Cities 04 2021 - 08 2021 | Volume 5 | Issue 15 | e1 4 2.1. Home Automation Features For home automation there are two modules: i) Rain sensing windows ii) Automatic light on and off. For rain sensing windows a rain sensor is used to check the rain and then when the value of the sensor become 0 (which means it is raining .) then the windows of the house automatic closes and when the value becomes 1 again(which means the rain has stopped.) the windows will automatically open itself. The rain sensor is shown in figure 3. For automatic lights off/on a LED and a IR sensor has been used, it is simple a but a useful feature that saves electricity. The value of the IR is 1 then LED will glow and if the value is zero then the LED will not glow. In simple words if there is any person enters the room the light will switch on and it will automatically switch off when the person leaves the room. Figure 3. Rain Sensor Figure 4. Block diagram of rain sensing windows Table 1. Development Environment Hardware Configuration Software Requirement Raspberry pi 3b model 64gb memory card Micro servo 9g(2) Ir sensor Pi camera LED with resistor Breadboard Rain sensor Android Studio VNC Viewer Python 3.7.9 Rasbian Os (Jessie) Core Java Xml For Desgin Opencv 3.1.1 3. Experimental Setup The basic hardware setup of the proposed system is shown in Figure 4. It consists of a Raspberry Pi, relay, motor, PIR sensor. The Raspberry Pi communicates with all the other devices attached to it. The PIR sensor detects when an intruder enters in the range of it and sends that information to the Raspberry Pi. After that, the Raspberry Pi sends a signal to the web camera to take a photo. The photo taken by the web camera is temporarily stored in the local storage of the Raspberry Pi, then Raspberry Pi sends a mail to the corresponding mail id with an attachment of the image taken. 1. All the connections are connected to raspberry pi through jumper wires male and female respectively. 2. All the sensors are connected to separate GPIO pin and ground connection. 3. And the camera is connected to specific connector provided with the raspberry pi. Figure 5. Connections of the sensors A. Sanjay, Meenu Vijarania and Vivek Jaglan EAI Endorsed Transactions on Smart Cities 04 2021 - 08 2021 | Volume 5 | Issue 15 | e1 Security Surveillance and Home Automation System using IoT 5 3.1 Pi Camera Raspberry Pi supports a light weight and portable Pi camera module. Using the serial interface protocol MIPI camera communicate with Pi. It is normally used in image processing, machine learning or in surveillance projects. It has a fixed focus lens. The advantage of miniature size camera is that it can be installed in a small space. The most important benefit of this camera over a USB webcam is that it is able to make use of the graphics processing capability of the Broadcom CPU. Figure 6. Smart Camera and Door Lock Figure 7. Mail received from PI EAI Endorsed Transactions on Smart Cities 04 2021 - 08 2021 | Volume 5 | Issue 15 | e1 6 4. Conclusion & Future Scope The proposed method provides a low power and low cost solution for monitoring the human presence and controlling the device from anywhere in the world. This is useful for monitoring home, industry or office etc, in the absence of the user. This can be easily controlled from anywhere by knowing the IP address of the network connected to the Raspberry Pi, so that door will be locked when intruder is inside the room. Acknowledgements. Dr. Meenu Vijarania is currently working in Amity University Haryana. She has done B.Tech, Mtech and Ph.D in Computer Science. She has published various papers in international Journals and conferences. Her area of interest are wireless networks, Internet of Things, genetic Algorithm. Dr. Vivek Jaglan is currently working as Professor , Graphic Era Hill University, Dehradun. He has completed his B.Tech,M.Tech in computer science. He has published various papers in reputed international Journals and conferences. His area of interest are Soft computing, Machine Learning. References [1] K.S. Pachpor, C.N.Deshmukh, Home Automation and Surveillance: A review, International Journal of Science and Engineering Applications, 8(4):111-114. [2] Bai, Y.-W., Xie, Z.-L., Li, Z.-H., 2011. Design and implementa-tion of an embedded home surveillance system with zero alertpower using a photovoltaic array. In: 2011 IEEE 15th Interna-tional Symposium on Consumer Electronics (ISCE), 14—17 June,pp. 373-378. [3] Sulc, V., 2011. Home Automation with IQRF Wireless CommunicationPlatform: A Case Study, no. c., pp. 212— 217. [4] Wibowo, S.B., Putra, G.D., Hantono, B.S., 2014. Development ofembedded gateway for Wireless Sensor Network and InternetProtocol interoperability. In: 2014 6th International Conferenceon Information Technology and Electrical Engineering (ICITEE),7—8 October, pp. 1—4. [5] Dae-Man Han and Jae-Hyun Lim, “Smart Home Energy Management System using IEEE 802.15.4 and ZigBee, IEEE Transactions on Consumer Electronics, Vol. 56, No. 3, pp. 1403-1410, August 2010 [6] V.Patchava, H. B. Kandala, and P. R. Babu’“A smart home automationtechnique with raspberry pi using iot”, International Conferenceon Smart Sensors and Systems (IC-SSS), pages 1–4, Dec 2015. [7] N. Oza, N. Gohil, "Implementation of cloud based live streaming for surveillance", Proc. Int. Conf. Commun. Signal Process. (ICCSP), pp. 0996-0998, Apr. 2016. [8] R. Rameshwar, A. Solanki, A. Nayyar, B. Mahapatra, Green Building Management and Smart Automation, India: IGI,2020, 7, Green and Smart Buildings: A Key to Sustainable Global Solutions, 146-163. [9] Setiya Purbaya , Dodi Wisaksono Sudiharto ,Catur Wirawan Wijiutomo, “Design and implementation of surveillance embedded IP camera with improved image quality using gamma correction for surveillance camera”, 3rd International Conference on Science and Technology - Computer (ICST), 2017. [10] A. Ahuja, Integration of Nature and Technology for Smart Cities, 3rd ed.; Springer International Publishing:Basel, Switzerland, 2016; p. 390. [11] P. Rajiv, R. Raj, M. Chandra, Email based remote access and surveillance system for smart home infrastructure, Perspectives in Science, 2016, 8, 459—461. [12] Gayathri, P. , Krishna Paramathma, M., Paramathma, M.K., 2014.Design and implementation of embedded home surveillance sys-tem by using MMS modem. In: Electronics and CommunicationSystems (ICECS), 13—14 February, pp. 1—5. [13] Nguyen, D.V., Le, H.T., Pham, A.T., Thang, T.C., Lee, J.Y., Kugjin, Y. ,2013. Adaptive home surveillance system using HTTP streaming.In: 2013 International Joint Conference on Awareness Scienceand Technology and Ubi-Media Computing (iCAST-UMEDIA), 2— 4November, pp. 579—584. [14] Pawlak, A., Horoba, K., Jezewski, J., Wrobel, J., Matonia, A., 2015.Telemonitoring of pregnant women at home — biosignals acqui-sition and measurement. In: 2015 22nd International Conferenceon Mixed Design of Integrated Circuits & Systems (MIXDES),25—27 June, pp. 83—87. A. Sanjay, Meenu Vijarania and Vivek Jaglan EAI Endorsed Transactions on Smart Cities 04 2021 - 08 2021 | Volume 5 | Issue 15 | e1