Sustainable Smart Home IoT to Open and Close the House Fence using a Scanning Method

—A home that is connected to the Internet allows all of its appliances and systems to communicate with one another via the Internet of Things (IoT), making it a component of a sustainable smart home. The issue with this study's findings is that some homes still utilize manual gates, which must be opened and closed by pushing a gate. Considering that a building's gate is its primary form of security, this is viewed as being less effective. Additional locks are required on the fence to overcome its frail defenses, which do not deter criminals. This project aims to create a smart home by using the internet to automate the process of opening and closing home gates based on IoT. Prototyping is a strategy used in software development, whereas card barcode objects are found using scanning. The findings demonstrated that Radio Frequency Identification (RFID), which is connected to a smartphone as a communication medium between the device and the user, is connected to each other between the microcontroller and the stepper motor so that it can operate the home gate automatically. The test findings indicate that when the user taps in the RFID card as the drive for the gate, the reaction time of the RFID to the stepper is between 7.35 and 10.10 seconds. Future research can use long-range RFID technology, which has a reading distance of more than 5-12 meters with a radio frequency band refarming process of 800 - 900 Mhz for any smart home or smart building. The accuracy of reading RFID cards with an RFID reader is about 1 - 5 cm, which is the limitation in this study. According to the test findings, it can be said that the development of an automatic fence control system increases the effectiveness of home security and allows for direct control from a smartphone. Using a Long-RFID instrument with a reading precision distance of 5–12 meters and a radio frequency band refarming method of 800–900 Mhz is anticipated to be sustainable in this research.


INTRODUCTION
A house is a structure that people occupy as their place of residence for a while.The primary purpose of the house is to offer a place to unwind after returning from work.When you get home from work, you're exhausted, and your house is a cozy place to unwind.This home is used as a communal living space for friends or family [1].In keeping with the world's rapid technological development, the idea of a home started to be combined with modern technology to make people feel comfortable, safe, and simple while performing various activities there.These concepts are highly sought-after and have become a mainstay for the type of modern home, and they are known as the concept of a "smart home" [2].In order for a fence or house door to open and close automatically, a smart home connects a communication network with it through a microcontroller [3].
The goal of the smart home concept is to make it comfortable for the homeowner to be able to manage and watch over their home even when they are not at home [4].A house can be said as a smart home if the house's equipment can be connected to the Internet because the Internet is part of the rapidly growing technological developments in people's lives today that are capable of being used as a medium of communication and control of devices remotely as long as they are still connected to each other [5].
With the advancement of Internet infrastructure, a variety of real objects, such as electronic devices, human-useable equipment, and any other real object, will be able to connect to the Internet.This concept is known as the "Internet of Things" in the "IT" industry [6].The Internet of Things (IoT) is a system made up of intelligent gadgets like sensors, actuators, and microcontrollers that enable automatic information exchange and communication.Smart equipment, such as smart home devices and smart classrooms, are created by combining a number of sensors, actuators, and microcontrollers that support communication between devices as part of the Internet of Things (IoT) [7].
The Internet of Things is a concept that has the aim of expanding the use of the Internet that is connected continuously which is connected to physical objects that are capable of sharing data and remotely affecting physical objects through the Internet network [8].IoT can integrate uniquely identified embedded computing devices in the existence of internet infrastructure, it can be concluded that IoT basically connects the Embedded System to the Internet [9].
Embedded systems can be used to implement IoT devices because they frequently conserve energy.The Wemos D1 Microcontroller is one of the remote controller technologies with ARM-based embedded systems (Advanced RISC Machine) [10].A highly effective device that can control tools is the Wemos D1 Microcontroller.Wemos is an electronic device module that works with Arduino and is based on the Wemos D1, so projects that specifically use the IoT concept frequently use this module [11].www.ijacsa.thesai.org The issue with this study's gate system is that it is still operated manually, with the door still having to be pushed open and shut.As a result, the gate system is not yet functional.The fence uses an additional key to overcome the weak security that allows criminals to evade it, and the gate is the primary security measure for securing a building.The growing need for technology has made everyone dependent on it, and one way this is done is by using it to simplify tasks.
A car gate will also be developed as part of this study, and it will function automatically based on the presence of a car detected by ultrasonic sensors.The tool that will be developed uses a controller, specifically a microcontroller, which is a computer system device that is used to control the system.The alternative to this automatic fence is using an Android smartphone.This study takes the object of congestion on the Pesona Prima Citapen Housing Complex, West Bandung Regency -West Java -Indonesia as a case study.Usually, when a car or motorcycle enters or exits a home, there is congestion.This occurs as a result of the person having to manually open and close a house fence.With an automatic fence system at home, it is hoped that there won't be any more traffic jams in neighborhoods because a car or motorcycle can drive right into the yard without the driver getting out; all they have to do is get closer to the house fence, at which point the fence will automatically open, shortening the wait time and reducing the line of cars behind them.
Based on previous research, the implementation of smart homes can be done by everyone because smart homes have the advantage of always controlling the condition of the house [12].The purpose of the smart home concept is to provide comfort to the homeowner [13].To be able to control and monitor his home [14].Smart homes can also minimize a person at times such as forgetting to lock the door [15], forgetting to turn off the lights [16], forgetting to turn off the television, or [17] forgetting other electronic items [18], thus making the house unsafe [19] and also having an impact on the waste of energy [20].The smart home concept pays attention to the efficiency of electrical energy use [21].The use of this smart home can also make it easier for users to control household electronic equipment such as lights [22], Air Conditioner [23] , and Televisions [24].So that it can reduce the wastage of electricity [25], and is one of the efforts to develop a sustainable smart home.
Along with the development of Internet infrastructure [26], in the field of "IT", this concept has been known as the "Internet of Things" [27].The Internet of Things (IoT) is a development of network communication of interrelated objects [28] and connected to each other via Internet communication [29], which is useful for exchanging data and information [30].Research in the IoT field is very rapid because it has become part of human life because almost all sectors of human life use IoT technology [10].Like the automatic gate that can open and close through the press of the remote control [9], smartphone [8], fingerprint, which is controlled by humans [7].The tool to be developed uses a controller, namely a microcontroller [5].Wemos D1 also has advantages compared to other microcontrollers [3], starting from more pin outs and analog pins [2], [31], larger memory, and low energy Bluetooth 4.0 [21].On the wemos D1 microcontroller there is a WiFi module available in a dual core processor chip that runs on Xtensa LX16 instructions so that it is very supportive for creating Internet of Things application systems and can send notifications to various communication tools such as smartphone [3], [20].Some previous research has not been integrated with the design of using applications on smartphones [19].
Based on the previous research mentioned above, WemosD1 microcontroller technology, RFID Readers, and smartphone-connected applications are still receiving relatively little attention from researchers, making this a research gap that needs to be investigated further.This study used the smartphone feature as a security system on the fence by utilizing the Wemos D1 microcontroller, along with a car garage door, to develop an automatic gate controller that operates automatically based on the presence of a car detected by RFID.The Wemos D1 microcontroller can send brief messages to smartphones whenever the door opens and when the door closes.

II. METHOD
The following steps must be taken in order to conduct research and solve the problem:

A. Methodology of System Development
In order to create a new system or enhance an existing one, the prototyping method is used [32].Due to the method's focus on the analysis, design, and implementation phases, which are three very important stages in creating or improving the system [33].The emphasis of the method which will be repeated continuously involving collaboration with users will produce a prototype of the system that will be reviewed before heading to the implementation of the system that has been desired by the user [34].In the prototype method, there are several stages to start system development [35], as presented in Fig. 1.In Fig. 1, there are five stages, namely the prototyping stage or the requirements gathering phase, which explains that users and analysts have a meeting and then have a conversation between them [36].Analysts use the results of the requirements-gathering phase as the foundation for the idea (concept) of developing a program or system, and at this stage, the analyst also converts the obtained specifications into concepts that are simple to understand [34].The analyst will also perform quick planning and modeling in the form of a quick design before beginning the construction of prototype making [37].The program that has been created is based on the www.ijacsa.thesai.orgprototype that has been submitted and agreed upon together (the analyst team), then at this stage, a program is also tested by the analyst and of course the user, then the user assesses whether the program can be accepted or not [35].The user has approved the program (it successfully complies with the suggested specifications), so the user can successfully use the ordered program [32].

B. Scanning Method
The Scanning method of system design in this study makes use of object detection.The process of finding objects, whether they move or not, like people or things, is known as object detection [38].Object tracking, which aims to identify or track the position of moving objects in an image sequence, is one application of image processing that can be used in daily life [39].With this object detection, it is expected to be able to predict and determine the position on the frame that shows where the object is [40].Object detection has the advantage of detecting an object's movement.[41].The utilization of Computer Vision and Image Processing technology to detect objects can make it easier for humans to detect objects [42], for example in the field of security.Object tracking can use the Scanning method [43].The scanning method is a reading technique to get information without reading the others [44].It is directly to the problem sought, namely specific facts and certain information [45].Scanning is also known as reading scan.Scanning is reading very fast [46].Speed reading means reading that prioritizes speed without ignoring its understanding [47].Usually, speed is associated with the reader's goals, needs, and reading material [39].Fig. 2 shows the scanning process.

C. Data Collection Techniques
The first data collection technique was conducted by interviewing sources by holding meetings and giving questions to sources [48], both orally and in writing at least two individuals [49], who directly met to obtain information [50], from the first-hand (primary) [51], in accordance with other selection methods [52], examined the results of selecting different information [53].The second data collection technique is observation to obtain the required data [54], this method is considered the most effective [55] because researchers go directly to the research location [56]- [58].While the third is to provide a questionnaire for the information sorting procedure [59], which is done by giving a group of questions [60], which are arranged for respondents to answer [61], either given face to face [62] or via the web [43].

III. RESULT AND DISCUSSION
This research is based on a phenomenon that occurs, which can cause several problems that often occur in house fences, namely: 1) There is often congestion on residential streets in the morning because many vehicles come out of the house that the owner has to get out of the vehicle again to close the fence, 2) The occurrence of noise / disturbing neighbors at night to call people in the house to open the fence by using a car horn.Therefore, a solution is needed to deal with the problems that are happening, namely the need for a Smart Home system on the fence that aims to: 1) Knowing people who come in and out of the house because it is connected to smartphone notifications, 2) Opening and closing the fence can automatically make it easier for residents of the house and its surroundings, and 3) Minimize congestion in the morning when the residents of the house crawl to work.
The construction of the smart home system on the fence is a system that is used to automatically open and close the gate of the house fence.This system combines several RFID readers on the house fence into a single control unit, and it is combined with a microcontroller that has been programmed in the Arduino IDE programming language.Because of the design of this system, the user can control, monitor, and manage to open and close the fence as needed.This system is controlled by a reader that can scan an RFID card as well as an internetconnected application on an Android device for every arrangement and control of the fence, allowing for remote control of the system.
There are several requirements for this system's construction, both technically and in terms of use, before this automatic fence can be used.With an RFID card, not everyone can enter the house, but only a registered RFID card can open the house's fence.To prevent card misuse, this RFID will generate a user ID when it is used.In reality, this system will carry out orders in accordance with the usage guidelines.
The following is the flow in the Smart Home system: 1) Opens the gate of the house with an RFID reader that can scan the card, 2) The gate can open if the RFID card matches its unique code, 3) The smart home system can be controlled by an internet-connected android which sends notifications to smartphones.

A. System Architecture
Based on Fig. 3 above, describes the system that was built, where the user taps in the card to the RFID reader to enter the house.Furthermore, the Wemos microcontroller processes the stepper motor to open the fence so that the vehicle can enter the garage.The fence will close by itself when there are no obstacles around it.

B. System Modeling
System modeling is a set of activity processes that can describe clearly and in detail how the system will run [63].The purpose of modeling this system is to explain, simplify, and evaluate the system to be built [64].In this research, the system modeling uses UML (Unified Modeling Language) diagrams to describe the working system [65].The UML models used include Use Case Diagrams and Flow Chart Diagrams [66].A use case diagram is a depiction process carried out to show the www.ijacsa.thesai.orgrelationship between the user and the designed system [67].The results of the representation of the scheme are made in a simple manner and aim to make it easier for the user to read the information provided [68].The use case is included in the UML (Unified Modeling Language) diagram, and the manufacturing process itself is carried out before we enter the DFD (Data Flow Diagram) concept design [69].A flowchart diagram is a diagram that displays the steps and decisions to carry out a process of a program [70].Each step is depicted in the form of a diagram and is connected by a line or arrow direction [71].Flowcharts play an important role in deciding a step or functionality of a programming project that involves many people at once [72].Based on Fig. 4, it can be explained that the user who will enter the house must have an RFID card that is useful for entering the house, the system scans the object of the card to open the fence and sends a message to the user's smartphone.
Based on Fig. 5 The flowchart above shows that the scanned RFID card must match the ID tag of each registered card, if the card is registered and matches the microcontroller will drive the stepper motor and the fence will open, if the RFID card does not match the ID tag then the microcontroller will not turn on stepper motor and the fence will not open.

C. System Circuit
There are two data output pins directly connected to the circuits in the automation system and ten input pins used in this microcontroller circuit.This pin is attached to both the RFID reader and the fence motor, which controls fence movement (see Fig. 6).Data from the input device is controlled and processed by the Wemos D1 microcontroller (see Fig. 7) before being sent to the output device.Wemos differs from other Wi-Fi modules in that it has a microcontroller that can be programmed via a serial port, allowing for programming of the device without the need for any additional modules.The Wemos D1 microcontroller is used to connect various systems, such as ultrasonic sensors and RFID readers, which can be used as links to drive stepper motors, making it easier for users to control various electronic devices.In this prototype fence as shown in Fig. 8, it is driven by a stepper motor which functions to rotate and direct objects at certain angles or distances.This is made possible by a combination of an ordinary motor and an additional sensor in the form of an encoder for position feedback.The controller of the stepper motor, better known as the stepper drive, is the most important and sophisticated part of a stepper motor, because it is designed for high precision.Radio frequency waves are used in the data transmission process by Radio Frequency Identification (RFID).The RFID tag and the RFID reader, which are both included in the device, wirelessly exchange data during the transmission process.

D. System Test
There will be five RFID cards registered in this automatic fence system.When an RFID card is read, there is an open fence between the RFID reader and the card, so RFID testing aims to measure this distance.The RFID card is tested by moving it closer to the available RFID reader.A centimeter scale is used to calculate the separation between the RFID reader and the RFID card.The reading distance between the RFID reader and the RFID card is shown in the Table I to be between 1 and 5 cm.The RFID card cannot be read if it is brought closer to the RFID reader than five centimeters away.
The RFID test when entering the house is carried out when the user taps the RFID card into the RFID reader located around the gate of the house.In Table II, it can be seen that the response time of the fence obtained on each RFID card is almost the same.

IV. CONCLUSIONS
The following conclusions can be made based on the outcomes of the tests conducted on the prototype fence: First, the designed fence can be made to open and close automatically using an RFID controller.With this controller, the homeowner only needs to move the vehicle closer and connect the RFID card to the RFID reader to open and close the fence rather than climbing up and down the vehicle.For smart homes, using an RFID controller is much better than using an Android base application because, with RFID, the user can store the RFID card in the car, which is undoubtedly more efficient than using a smartphone, whereas with Android, the user must carry the Android smartphone with him every time he leaves the house.In order to inform homeowners about who enters and leaves the house, the automatic fence can be connected to smartphones as a notification medium.Smartphone notifications are much more effective than LED notifications on the front of the house because smartphones can be remotely controlled.Second, the test findings indicate that www.ijacsa.thesai.orgwhen the user taps in the RFID card as the drive for the gate, the reaction time of the RFID to the stepper is between 7.35 and 10.10 seconds fence gates.Thirdly, the congestion that frequently develops in apartment complexes can be reduced by the installation of automatic fence gates.

Fig. 4 .
Fig. 4. Use case diagram of fence control system.

TABLE I .
RFID CARD SYSTEM TESTING TABLE

TABLE II .
FENCE TIME RESPONSE TABLE