Chatbot Based Applications on Smart Home Use Natural Language Processing

— Smart Home technology development is directly proportional to the emergence of various applications as access media. Currently, many Smart Home applications do not use the concept of human-machine interaction (HMI). The problem that often arises in the interaction between humans and machines is that humans must understand what the machine wants to have wrong perceptions about the system. In this study, the solution is proposed with the HMI concept, which uses natural language interaction through the chatbot application as an interactive medium to control and monitor Smart Home devices. In this study, the chatbot application implements the Natural Language Processing (NLP) text recognition process. User acceptance of the system is carried out using the evaluation stage. Thirty users participated in an in-depth usage study in which they tackled using the system. This research aims to create an application that can make it easier for users to control various devices on a Smart Home through natural language interaction and to analyze the performance of the NLP method. The results showed that most users (90%) believed that the application can help users control and monitor Smart Home devices. The NLP application on the chatbot application provides a success rate of 93.3% where the results obtained from the chatbot response depend on the completeness of the token.


I. INTRODUCTION
The development of technological advances currently has been very rapidly developing. It cannot be denied that technological advances that are so fast must be able to be learned, utilized, and applied in everyday life. Internet of Things (IoT) is one example of information technology that is currently developing rapidly [1]. Even now, there are many fields and household appliances that make IoT technology in it, one of them is Smart Home. Smart Home is a house concept facilitated by technology that can be useful to serve and respond to the needs of residents of the house [2], [3].
The Phenomenon that occurs, some studies on Smart Home most of the applications have not yet implemented the concept of human-machine interaction (HMI), where humans must understand what is desired by the machine so that human error perceptions about the system will occur [4]- [6]. In applications such as this cause, the system is ineffective and inefficient because it is considered too complicated, not easy to use, and learned so that users have difficulty using the system. Human-Machine Interaction (HMI) is a discipline that focuses on interactions between users (humans) and systems (machines). The role of HMI is to make the system communicate with users so that it is easy to use, effective, and efficient. The problems that often arise in the interaction between humans and machines are humans must understand what is desired by the machine so that humans often produce wrong perceptions of the system. Consequently, humans as users often have difficulty using the system because it is not familiar with the system, which is considered too complicated, so it is not user friendly, the resulting system is not according to user needs, so it is not appropriate. These problems certainly make the system ineffective and inefficient, which can result in users not using the system.
The concept of HMI is used with distinctive human aspects to develop easy, effective, and efficient applications. The aim is to make the machine understand what is desired by humans. One aspect of human characteristics used is language, communication, and interaction, which uses language as a medium for humans to interact with machines [7], [8]. This study aims to control various devices in Smart Home through natural language interactions and analyze the performance of the NLP method. User input will be processed using the NLP method.
One form of language interaction media is natural language. Natural Language Processing (NLP) is a Artificial Intelligence (AI) branch that focuses on natural language processing. The process of finding patterns or extracting new information aims to find important information from the text by converting the text into data that can be used for further analysis. The first step to do is case folding, which is changing the sentence to lowercase. The next stage is tokenizing, the stage of cutting each word in a sentence or parsing by using space as a delimiter that will produce a token in the form of a word. The filtering stage is the stage after tokenizing. At this stage, necessary word retrieval is done. After that, the stemming stage is carried out, the stage of returning the words obtained to the basic form, eliminating the prefix and suffix so that the basic words are obtained. The final stage is analyzing, the process of analysis from stemming until it is known how far the level of connectedness of words and between existing documents [9], [10]. One applied application of NLP is the chatbot. The chatbot is a service that is defined through rules to simulate an interactive conversation to users through text, voice and visual form [11], [12]. The chatbot is built according to topics that have been modelled in the knowledge base. This chatbot is implanted with knowledge models to answer questions that fit the context that has been prepare. proposed system consists of three main parts, the smart home system, the chatbot system, and the website system. Smart Home devices are used as tools that can be accessed and controlled using the chatbot application. In the system presented, IoT devices (Smart Lamp) are the endpoint for the system. Chatbot system consists of Chatbot Application and Chatbot Engine NLP. This application is built on the Android platform on supported mobile devices (Smartphones, Tablets).
Users use chatbot applications to interact with bots. The most critical component of Chatbot is the NLP Engine, which is used to translate natural language into actions that can be understood by bots. This website is built for admin users, to be able to process knowledge base data (tokens and response), including the functions of adding, editing, deleting, and reading. The workings of the system from Fig. 1 are as follows:  Users will provide input via chat that has been provided, which can be in the form of questions or responses from a statement.  User input will be forwarded to the NLP engine to extract user input so that Chatbot can understand it.  The extraction results will be entered into the Text Mining process to determine whether it requires saving data or withdrawing data to/from the database. The Text Mining process will be explained in the Data Input Analysis section.  If the steps taken are data storage to the database, then the data will be processed for storage, and then the stored data will be responded by Micro Wemos to be forwarded to the intended sensor devices.  If the steps taken are data withdrawal from the database, the data from the sensors stored in the database will be processed and then sent to the NLP engine before being returned to the user. If the data retrieval is sufficient, then the response will again be thrown at the user in the form of a question or response.
Data input used in the application is in the form of text. The data source used in the application is obtained from device control and monitoring terms, which are input data in this application, which are tokens with simple sentences typed by the user into the application. To get the expected output data, the input data from the user is in the form of Indonesian text because it will affect the stages of the text mining process that is carried out.
The text recognition process stages consist of case folding, tokenizing, filtering, and steeming, shown in Fig. 2.  Case folding is a step that changes all the letters in a document to lowercase (lowercase). Only the letters 'a' to 'z' are accepted. Characters other than letters are omitted and are considered a delimiter.
 Tokenizing is the process of breaking down sentences into parts of words called tokens. Also, spaces are used to separate the words. This process is carried out so that the system understands user input.  Filtering is the stage of taking essential words from the results of the tokenizing process. Use the stoplist algorithm (discarding less important words) or word list (save essential words). This system, it is using the stopword method that is eliminating unnecessary words by checking the tokenizing words. If there is a stopword, then the word will be deleted so that the remaining words are considered essential or keywords (pattern).  Steeming aims to reduce words to their basic words (root words) by eliminating all word affixes (affixes), including word prefixes (prefixes), word slips (infixes), suffixes (suffixes) and or eliminate word prefixes and suffixes (suffixes) confixes) in derived words.
The method used to analyze the application's functional requirements is an object-oriented approach with UML (Unified Modeling Language) tools. UML is a tool for specifying, visualizing, building, and documenting artifacts (part of the information used to be generated by the software creation process, these artifacts can be in the form of models, descriptions, or software) of software systems, such as business modeling and non-device systems. other soft [13], [14]. Selection of the use of object-oriented applications to make it easier if there is development for applications in the future. Figure 3 is a use case diagram of the system being built, which describes user activity on the system being built. Figure 3 shows that the users of the system consist of admins, users, and smart homes. Admin will process user data who will use the smart home application and can view user information. The user himself will monitor and control the smart home device by using a chatbot that enters text data; the data input will be responded to by the smart home to process the data. The process of recognizing input data until the smart home device recognizes it uses text recognition using the NLP method. The description of each use case in Figure 3 can be seen in Table 1.
The approach used is to conduct semi-structured interviews with each user application to evaluate applications that have been developed. We are recruiting users who are 25 years or older and must have an Android smartphone. Users are explained the research objectives and how to use the application. Users are asked to try out applications and prototypes of smart home devices, then asked to answer some of the questions. After getting answers to the questions, the next step is to analyze the answers to see whether the user accepts the application that has been developed or not. Figure 4 shows the application testing stages.

Use Case Description
Data processing The process carried out by the admin to process data includes the process of adding, deleting, and editing as part of the data processing function

See information
The process carried out by the admin to view information such as user data and tokens as part of the information function

Login
The process carried out by the user and admin to enter the system Registration The process carried out by the user to get access rights to the system Controlling device The process carried out by the user to be able to control the device by having conversations with bots using text messages Monitor device The process carried out by the user to be able to monitor the device by having conversations with bots using text messages

Provide answers
The process carried out by Smart Home to provide data answers to the results of the request process from NLP Fig. 4 The stages for application testing

III. RESULTS AND DISCUSSION
In this section, we report our findings concerning the results of testing the functional applications (Part A), user acceptance of the application (Part B), and the results of testing the introduction of text using NLP (Part C) Figure 5 shows the example of application interface screenshot. The application testing process uses alpha testing with the black box method. Table 2 presents the results of alpha testing in the application being built. Table 2 shows that all functions or processes in the application run well following the functional requirements analysis that has been carried out and shows that the application created is functioning to control smart home devices using the chatbot. The application is used by entering text data, which will be processed through text recognition using the NLP method, and the results are proven on the smart home device according to the data entered, for example, if what is entered is "turn off the kitchen room" then the kitchen lights will turn off.   Overall, Table 3 shows that users agree with the statement that the Smart Home Application is useful. Fourteen of them voted "Agree", and the rest voted "Strongly Agree" in response to this statement. With this application, users are given the convenience of monitoring and controlling smart home devices. This application is an application of the concept of the Internet of Things (IoT). The use of IoT in various fields has developed a lot in the world, but in Indonesia, the concept of IoT has not been widely applied [15], so that if this application is developed, it will provide benefits for its users.

A. Part A: The results of testing the functional system
From table 4, most users agree with the statement The Smart Home application is easy to use. Seven of them chose "Agree," and the rest choose "Strongly Agree" in response to this statement. Some users are involved in using applications on their smartphones and use them every day in their daily lives. Users found no problems to learn about using the application. Users of this application are already familiar with the use of mobile devices such as smartphones. As many as 69 percent of Indonesians access the Internet via cellular devices, some people use the cellular Internet, primarily through smartphones [16], [17]. This number shows that users in Indonesia have adequate exposure and understanding of mobile applications. From table 5, most users choose to agree with the statement that the Smart Home application has consistent quality. Some users choose neutral because of the use of phones with lower RAM specifications. Therefore, users will get problems if they have insufficient memory space for applications to affect application performance. Also, the RAM specifications in the smart home hardware must be considered, so it not interferes with the performance of the application. From Table 6, 10 users choose to agree, and 20 choose to strongly agree in response to the statement that they will use the application in the future. Due to this application's usefulness and convenience, users will choose to use this application in the future. With the data that all users seem to agree, we will update the application from time to time, both in software and hardware.
C. Part C: The results of testing the introduction of text using NLP Text recognition testing is carried out to ensure the system that has been built can run well under the analysis and design. This test lies in the process of introducing text from user input data following a list of terms that have been defined. The results of the text recognition test are shown in table 7.
The process of testing the introduction of text is done by using 50 data input patterns, from the data input it gives 49 responses that correspond to input from the user. The text recognition process will produce responses in the form of status information in the smart home. If the data is correct, then the resulting response is expected by the user, and if the data is wrong, then the resulting response is not as expected by the user. Table 8 shows the response results of the system.   Table 9 shows the system's response results of the system, the test results in Table 8 prove that the implementation of NLP with the text mining method can assist and facilitate the processing of the introduction of text sent for control and monitoring of devices in the Smart Home. However, a percentage of 93.3% also proves that this system still needs improvement. The completeness of the term token as a database of knowledge is very influential on the success of the system.
User input data (tokens) must be stored in the knowledge base, and there should not be a deficiency or excess of one letter so that the process of matching the results of text recognition with the term in the knowledge base is correct. If the data is right, then the response produced is following what the user expected, and if the data is not right, then the resulting response is not following what the user expected. IV. CONCLUSION In this study, smart home devices can be controlled and monitored by chatbot applications using natural language processing. Functional analysis shows that the system can be used to control and monitor smart homes. The analysis also shows that text recognition using Natural Language Processing can be applied to the chatbot system to help and facilitate the processing of text recognition sent to control and monitor devices in Smart Home. The introduction of this system will help users to control and monitor smart home devices