Keywords

1 Introduction

Home security is an important issue for people, everyone requires a protected space because most family members work and study, away from home. For this reason, security systems must be taken seriously, analyzing the possible problems [1]. The smart home appeared for controlling and monitoring the home, providing greater peace of mind through monitoring and staying connected anytime, anywhere [2].

In recent years there is a trend to use the technology of the internet of things (IoT) to communicate smartphones to a conventional device such as an electric lock, this allows a door to be opened or closed remotely through authentication [3,4,5]. This is one of many services in the knowledge-based information society. In addition, there is a growth in convergent services that use two or more components for the same purpose.

The IoT requires that all objects provide information, in this way the states are updated in the cloud to make decisions automatically or by the user [6]. Some components of this technology are interactive services, user identification, wired and wireless sensors, carrier networks, advanced communication protocols, and distributed intelligence in different objects, all are common features today [7]. Currently, providing homes with a security system has become an important topic of analysis, in which the latest technologies are applied [8]. Of these technologies, the cloud platform is an important component to monitor and control home devices remotely [9].

This work develops a proposal that allows reading and controlling the status of a door through a mobile application using low-cost devices based on IoT. This document contains 4 sections, including the introduction. Section 2 presents the methods and materials, Sect. 3 shows the results and Sect. 4 presents the conclusions.

2 Methods and Materials

The materials used in this project are presented in the scheme of Fig. 1. The system consists of a magnetic contact sensor, an electric lock and a processor board for door control. The electronic board has WiFi communication for connection to a remote database. This database is installed on a cloud platform that is accessed from both ends. The other end is made up of the mobile application, from this position the door is controlled and monitored remotely.

Fig. 1.
figure 1

General scheme of the proposal.

2.1 Electronic Design

The electronic circuit is designed as shown in Fig. 2. The ESP32 board is the central component of the circuit because it includes a WiFi communication module, and is responsible for data acquisition, control and processing. The magnetic contact sensor is connected to a digital port as input. The electric lock uses a relay to control the power supply at 12 V DC. The relay is controlled using a digital pin configured as an output.

Fig. 2.
figure 2

Electronic circuit

2.2 Program Design

The main program designed for this project is presented in the flowchart of Fig. 3. The ESP32 board reads the sensor status to determine if the door is open or closed, and sends this information to the database in Cloud. The ESP32 also receives the information from the database and processes the received order, this order activates the electric lock if required, and thus opens the door. The remote database is updated with new data from both ends, in this case, the ESP32 updates the gate status. This read and control cycle is constantly repeated within the infinite loop function.

2.3 Design of the Mobile Application

Figure 4 shows the user interface design for the mobile application. The interface contains 3 buttons, an open button, a close button and a button to exit the application. The app connects to Firebase which is where the remote database is hosted. Through the open and close buttons, it sends the control orders for the door. In addition, it receives data from the magnetic contact sensor to display a message when the status of the door changes, whether it is manually or electronically operated.

Fig. 3.
figure 3

Program flow chart for ESP32

Fig. 4.
figure 4

User interface of the mobile application.

3 Results

3.1 Function Tests

In Fig. 5 it can see images of how the proposal works, both the elements of the door located in a house, and the mobile application located in a remote place. The tests carried out were carried out successfully, constantly updating the status of the door and activating the electric lock without problems.

Fig. 5.
figure 5

Functionality test images.

3.2 Acceptance Evaluation

To evaluate the characteristics of this proposal, an acceptance questionnaire was applied to the 4 members of the house. The questionnaire is made up of 7 questions to evaluate different components of the proposal. The questions are answered using a 7-level Likert scale, where 7 strongly agree and 1 strongly disagrees. The results of the acceptance test are presented in Table 1, with a final evaluation of 78.06% acceptance, a favorable value for this proposal. Although this evaluation shows some dissatisfaction with the physical use of the door, this component can be improved with a local interface for door control.

Table 1. Acceptance test.

4 Conclusions

The use of low-cost devices to implement projects based on IoT is very common today. This has facilitated the increase in home security, allowing the development of reduced systems such as the one presented in this document. This way homeowners can monitor the front door and unlock it remotely if needed. The score obtained in the acceptance test indicates acceptable characteristics for users (78.06%) but leaves a point to improve with the difficult local use of the door. In future works, it is intended to automate an entire house by managing the different devices from the same mobile application.