Locker Security System using Internet of Things

. As a priority in today's society, security is of highest importance, and safeguarding our properties from intruders is no small task. The main objective of the offenders is to obtain valuable items kept in the locker. To address this issue, an Android application called Locker Security System uses Internet of Things (IoT) technology to monitor the locker's condition and enhance security. The project is based on ESP32 micro controller installed along with PIR sensor is implemented in the locker to detect the movement and magnetic switches to know whether the door is locked or unlocked, When the intruder opens the locker by force it detects the status of locker door using magnetic switch sensor and the motion of his hand inside the locker using PIR sensor, the data is uploaded to the firebase linked with the mobile app. If a burglary is detected it sends an alert notification message to the mobile immediately using twilio cloud and the buzzer is also rung in the mobile application. The PIR sensor can detect the motion accurately up to 6 metres .The further advancements would include equipping the locker with a camera. The locker would be equipped with a camera so that, in the event of an intrusion, it would record the intruder's image and send it to the user via the mobile application. The police can be informed about the burglary using the mobile application along with an image sent of the burglary.


Introduction
The Internet of Things (IoT) has dramatically changed the way we approach home security. With the advent of connected devices and smart technology, it is now possible to monitor and secure your home remotely using a smartphone or computer. Home security IoT systems typically include a variety of devices such as security cameras, door and window sensors, and smart locks. These devices can be connected to a central hub, which allows for remote monitoring and control. One of the main advantages of IoT-enabled home security systems is the ability to receive real-time notifications. For example, if a door or window sensor is triggered, you will receive an immediate alert on your smartphone, allowing you to take action to investigate or notify the authorities. Another advantage is the ability to control and monitor your security system remotely. With a smart lock, for example, you can remotely lock or unlock your door, and even grant temporary access to friends or service providers.
IoT-enabled security cameras can also provide remote monitoring, allowing you to check on your home at any time. Some cameras even include advanced features such as facial recognition, motion detection, and night vision. One of the challenges of home security IoT systems is maintaining the security of the devices and the system as a whole. As with any connected device, there is always a risk of hacking, which could compromise the security of your home. To mitigate this risk, it is important to use strong passwords and encryption, and to keep the system's software updated. Another challenge is the integration of the devices, some devices are not compatible with other devices, it can be challenging to set up a system that integrates seamlessly with your existing devices and appliances. Some companies offer complete systems that are designed to work together, but it's also possible to mix and match devices from different manufacturers if you take the time to research compatibility. Overall, home security IoT systems offer many benefits and are a powerful tool for keeping your home safe. With the right combination of devices and proper setup and security, you can have peace of mind knowing that your home is always being monitored and protected.

Existing methods
Internet of Things (IoT) for Bank Locker Security Systems was proposed by Ajay Kumar and Priyan Sood With the contemporary amelioration of web and diversification of systems administration, organizing is capacitated on regular gizmos through the Internet of Things (IoT). Over the most recent few years, IoT is expeditiously flourishing over the globe. The idea is to develop a bank locker security system that allows managers to review events from an isolated point. That was it. viewpoint to see Catch areas and frames according to your advantage. This is inherited from and linked to from the scheduling page database, image acquisition with Raspberry Pi, face recognition, face recognition, application structuring, Allow/Deny Client Entry [1].
This article reviews and analyses security measures that address the challenges that homeowners and bank locker owners face. According to reports, current door monitoring system methods involve using digital locks and Wi-Fi technology to periodically check the status of the door, helping to reduce thefts that occur every day. after 3 minutes in India. According to the report, Indians continue to put more emphasis on updating their online security systems to keep their homes safe. By using LoRa technology we can continuously monitor the status of the door i.e. is the door open or closed and depending on the status other actions such as alarms, sending emergency notifications are performed. displayed to notify and warn owners and improve safety. Lora Technology has reconfigured IoT by enabling long distance data connections while using very little power. LoRaWAN fills a technical gap for cellular and WiFi networks that require higher capacity or high bandwidth, or are not even capable of penetrating deep indoor areas [2].
The objective of the proposed study is to develop an IoT-based security system with twopoint authentication. Human facial and fingerprint recognition is a known method for authentication of access. The combination of both technologies and system integration with IoT will make the security system more efficient and reliable. The use of google firebase online platform is made to save the database and retrieve it in real time. In this system, access to fingerprint (touch sensor) from mobile phones is provided by an android application developed in android studio and authentication for it is also provided. When facial and fingerprint recognition are combined, access to the door or locker is provided [3].
A security system with CCTV and other network nodes in the IoT handles large amounts of data, so the need for devices with larger storage capacity comes into play, which will be more expensive. Whenever the Passive Infrared (PIR) sensor detects motion, at that time only the camera and all other network security sensor nodes are activated (power on), the video and information are recorded (sensor data) stamped onto the image using Python-based image processing techniques. It will be stored in a local storage device, after a certain threshold (based on location sensitivity) the data will be uploaded to the cloud with a data log generated in the modelling step [4].

Problem statement
In today's world, security is a major concern for everyone. No one wants their belongings to be stolen, and no one wants to be a victim of a break-in. Unfortunately, these things do happen. Locker doors are forgotten to lock. This is common for most people. Make your belongings safer with a code, phone or card. but there is no limit. Consolidate functionality in one placethe security of money in the bank, home or office. overwhelm security. Threat, most people install a series of locks or alarm systems. There are many types of alarm systems on the market. We use different types of sensors. Sensors can detect different types of transformations that occur in the environment and environment. Transformation is handled to issue warnings according to preset values. It also lacks advanced security features. To solve this problem, All modern security features should be built into the locker including the feature to monitor it.
The proposed project is an extended approach to the existing home security system. The accuracy of the system is taken from [5], [6], [7], [8], [9] and [10] Enter the Locker Security System. This Android application uses Internet of Things (IoT) technology to monitor the condition of your locker and enhance security. The system is based on an ESP32 microcontroller, which is installed along with a PIR sensor in the locker. The PIR sensor is used to detect movement, and the magnetic switches are used to know whether the door is locked or unlocked. If an intruder opens the locker by force, the sensors will detect the status of the locker door and the motion of his hand inside the locker. The data will then be uploaded to the firebase linked with the mobile app. If a burglary is detected, an alert notification message will be sent to the mobile immediately using twilio cloud, and the buzzer will also be activated in the mobile application.
Any authorised user can use the app without alarm by entering the password manually, through which the system identifies the user and gives the authorised sound notification The PIR sensor can detect the motion accurately up to 6 metres. With this system in place, you can rest assured that your belongings are safe and sound.

Objectives
The objectives of a locker security system using IoT (Internet of Things) may include: • Enhancing security: The primary objective of a locker security system using IoT is to enhance the security of the locker. The system can include various sensors such as motion sensors, door sensors, and biometric sensors to detect any unauthorised access. • Remote monitoring: The IoT-based locker security system can allow the locker owner to monitor the locker remotely through a mobile app or a web interface. This can help the owner keep track of who is accessing the locker • Access control: The system can use biometric authentication, such as fingerprints or facial recognition, to ensure that only authorised users can access the locker. This can prevent theft and unauthorised access. • Real-time notifications: The IoT-based locker security system can send real-time notifications to the owner's mobile device or email in case of any suspicious activity, such as unauthorised access or tampering.

Architecture diagram
With the help of an ESP32 Dev Kit, a PIR sensor, and a magnetic switch sensor, the project builds a motion sensor detector. The data is sent to the firebase when an intruder is discovered by a PIR and Magnetic switch sensor. The GISMO-VI IoT board is used in this project which already has an ESP32 Devkit, PIR sensor, and magnetic switch Sensor. The data collected by the firebase is sent to the Twilio API, and sends a message alert to the user. The project flow can be observed with the help of Figure 1.

Modules -connectivity diagram
In a home monitoring and security system, sensors play a vital role iIn addition, the Twilio API can be used to enable remote communication and notification capabilities, allowing the system to send alerts or messages to the owner's mobile device or email address in the event of a security breach or other critical event and collecting important information that can help the owner identify any intruders. One of the most commonly used sensors is the PIR (Passive Infrared) sensor, which is designed to differentiate between the heat emitted by moving individuals and the ambient heat in the surrounding area. Another important sensor used in home security systems is the magnetic switch, which is typically used to monitor the status of doors or windows. To coordinate and enhance the overall security of the system, various modules and components can communicate with one another. For example, the ESP32 module is a powerful microcontroller board that can be used to interface with sensors and control electronic devices. It can also communicate with other modules or devices over WiFi or Bluetooth   Fig. 2. Connectivity diagram of the proposed system.

Module 1: Hardware and firm module
The first module of the system would involve designing and building the hardware and firmware for the lockers and the IoT devices that would be used to control and monitor them. This might include designing and building custom PCBs for the lockers, as well as selecting and integrating suitable IoT components such as ESP32 microcontroller, PIR sensor, magnetic switch sensor. The code work of the sensors in order to obtain data is done in the "Arduino IDE", which includes libraries of the ESP 32. Like Firebase ESP32 Client By Mobizt for firebase. Message notification code is integrated into Arduino using Twilio cloud community, which sends messages directly to the user's mobile number in case of mobile not connected with the internet.

Module 2: Cloud platform and backend development module
The second module of the system would involve developing the cloud platform and backend infrastructure that would be used to manage and control the lockers. This might include developing a web-based dashboard for administrators to manage the lockers, as well as a set of APIs (application programming interfaces) that the lockers could use to communicate with the cloud platform. Firebase is a cloud-based platform that provides a range of tools and services for building and managing mobile and web applications. Some specific ways in which Firebase can be used in app development include: Real-time database: Firebase provides a real-time database that can be used to store and sync data across multiple devices. This can be useful for applications that require live updates or real-time collaboration.

Module 3: Mobile App development module
The user interface (UI) of an application is the part of the application that the user interacts with. It is the means through which the user communicates with the application and receives feedback from it. As such, the UI is an important aspect of any application, as it plays a key role in determining the user's experience of the application.

Implementation of module 1
The distance that the sound has travelled is calculated using the equation Distance = (Time x Speed of Sound) / 2. The "2" is added since the sound must be repeated in the formula. The sound first departs from the sensor, then moves away before coming back after striking a surface. The size of the area can be used to gauge the need for a particular distance. The output generated can be observed using Figure 8 given below.

Implementation of module 2
The Real Time data of the sensors is updated to Firebase is shown in Figure 5.

Implementation of module 3
If both the sensors are triggered according to the conditions, a SMS alert is sent to the specified phone number.

Significance of proposed method with advantages
Firstly, the system is highly effective in detecting intruders and sending immediate alerts to the user. The use of advanced technologies such as IoT, cloud computing, and real-time data management allows for fast and accurate detection, reducing the risk of intruders going undetected. Secondly, the system is highly reliable and has a low false alarm rate. This is due to the use of multiple sensors, including the PIR sensor and magnetic switch, and the ability to analyse sensor data in real-time to distinguish between normal and abnormal activity. Thirdly, the system is highly customizable and can be tailored to fit a wide range of applications. The system can be easily integrated with other security systems and sensors to create a more comprehensive security solution. The Twilio API can also be customised to provide alerts in different formats, such as email or voice messages, and can be configured to send alerts to multiple users. Fourthly, the system is highly accessible and easy to use. The use of the Firebase Realtime Database allows the user to monitor the sensor data in real-time from a web-based console, providing a detailed view of the system's activity. The Twilio API provides instant alerts to the user's phone, allowing for fast and easy communication of any security breaches.

Conclusion
The ESP32 Dev Kit, PIR sensor, magnetic switch, Firebase, and Twilio API represents an innovative and practical solution for enhancing building or home security. The system's architecture leverages advanced technologies such as the Internet of Things, cloud computing, and real-time data management to create an efficient and effective security system that can detect intruders in real-time. The project's design is simple yet powerful, leveraging the built-in features of the GISMO-VI IoT board, including the ESP32 Dev Kit, PIR sensor, and buzzer. By integrating the magnetic switch, the system can detect opening of doors or windows, further enhancing the system's capabilities. The use of Firebase Realtime Database and Twilio API enhances the system's functionality by providing real-