Integration of IoT and chatbot for aquaculture with natural language processing

ABSTRACT


INTRODUCTION
Indonesia is an agricultural country and more than 50% of the population works in agriculture.One area of agriculture is aquaculture which becoming the important food sources for human.In Indonesia, the area of aquaculture is nearly 17,300 km 2 and the utilization is about 1,200 km 2 [1].One important factor in aquaculture is the water quality condition used for cultivation.The problem of poor water conditions will cause problems in the fishpond system and cause fish harvest failure.So it is very important to monitor of physical and chemical conditions such as temperature, oxygen, and pH in fish pond water to avoid unwanted situations [2].
Implementation of internet of things (IoT) technology has been very rapid and done in various sectors, including aquaculture sector [3][4][5].Research on IoT for aquaculture is essential for Indonesia's geographically favorable territory.Methods of cultivation in Indonesia are more than 50% is still a traditional challenge for researchers.Some problem in aquaculture sector are the lack of technology used in the aquaculture sector makes the productivity less optimum, the utilization of technology is very minimal and water quality tends to be ignored and not paid attention, and there are still lack research for cloud system model and integrate with smart aerator dynamically for aquaculture.In addition, the challenge on IoT system for user interface (UI) is also a separate issue.The harder it is for users accessing and tracking multiple apps and the dashboard for each new "thing" in their ecosystem.
In order the resolve the above-mentioned problems, this paper aims to propose a real-time monitoring system that is integrated with intelligent aerators using IFTTT (if this then that) on cloud systems.This system is used by traditional farmers to regulate the aerator system.The aquaculture farmer can manage schedule of working aerator for the pond condition dynamically according to the sensor's values.The sensors data will be transferred to the cloud system to be processed and analyzed, then will be sent to the client devices.We also propose implementation of chatbot in IoT system to make it easier to know the condition of fish ponds.Chatbot technology has become quite popular lately [6], this is due to the easiness of using chatbot without installing the app to use it.In addition, users feel like interacting with human in using chatbot.The success rate of the system is how to make the user understand with easier and make it comfortable with the system.The target of the user in this research is a traditional farmer.The most traditional farmers little know about the system and little know what should the do after the problems occurs.An implementation of chatbot in IoT system was done by many researchers in many areas of IoT especially on aquaculture and home automation [7][8][9].
A routine monitoring of water quality conditions over time using IoT on aquaculture with knowledge based becomes the primary focus of researchers to take preventive measures before actual damage [10][11][12].In addition, artificial intelligence is also implemented and integrated with pH and dissolved oxygen (DO) sensors using Zigbee as wi-fi module and Arduino as microcontroller to improve data and control water quality will give the result of data analyst and prediction [13][14].Research on real-time IoT-based monitoring is also done in the aquaponic sector uses temperature, pH, ammonia, and moisture sensors [15][16][17].An intelligent monitoring system to monitor and maintain DO value which integrated with the programming logic controller (PLC) to run the oxygen enhancing machine is proposed in [18][19][20].
The system for preventing the user waste time to manual test and increasing the number of fishes to help fulfill the demand of fish is proposed in [21].The system built from Raspberry Pi, Arduino and Sensor nodes such as pH sensor, temperature, electrical conductivity (EC), and colour sensors.Kim et al. [22] proposed technology of smart fish farm using IoT and thermal warm water energy management system.A combined system between aquaculture and hydroponics which implemented IoT technology is proposed in [23][24][25].The system used some sensors such as water level, pH, and temperature sensors.The output of the system decision will command some actuator such as the water pump, heater, fish feeder, and oxygen pump.
Balakrishnan et al. [26] proposed a framework of aquaculture includes water quality control, environmental monitoring, power monitoring, and web surveillance platform.Lin et al. [27] proposed a monitoring system for the mini aquarium called FishTalk.FishTalk technology makes a sensor can give a command to the actuator with real-time for feeding mechanism.
In the research we are working on, we attempted to integrate the chatbot and IoT fields together by listing the major architectural components required and envisioning possible ways to address some of the current challenges in IoT for aquaculture.The proposed system used some basic techniques of natural language processing.The built system serves to control the aerator system and monitor sensors value from distance using web and android applications.In addition, Message commands to control some of these devices can also be sent via chatbot.

RESEARCH METHOD 2.1. System architecture
The proposed system has 7 main components: smart sensor module, smart aeration system, local network system, cloud computing system, client visualization data, chatbot system, and solar powered system as shown in Figure 1.The microcontroller for main processing unit uses NodeMCU which is already integrated with wi-fi module.The sensors send sensor data to the main processor NodeMCU, and then the data will be sent using MQTT protocol to the cloud server, analyzed the sensor data, and then visualized it to the client devices.For the chatbot feature, the objectives are to cover the users question about everything that related with aquaculture and give the user option to use the features of the application.
The smart sensor module is a device comprising of DO, temperature, pH, and level sensors for reading the information of fishpond water condition.The NodeMCU send the sensor data use WiFi module through MQTT protocol to the main server.The smart Aerator which is created utilizing adjusted diesel machine that get expansion of propeller, engine DC, battery, gateway and NodeMCU.The Motor DC attempts to cause aerator to be maintained by microcontroller.There are 2 relays for turn on or shutdown The DC engine triggers the diesel machine to be turned on.The subsequent relay is associated with the diesel machine which is function for turn on or shutdown the diesel machine.The network system comprises of router gateway, modem, and battery power that works for transmitting and getting data from sensor device to cloud server or from cloud server to aerator utilizing MQTT protocols.MQTT enables end device to distribute data sensor an offered data topic to a cloud server that capacities as broker MQTT message.The broker drives the data out to those clients that have recently registered into the topic of client.
Figure 1.The proposed system design In cloud computing system, the server was using Linux OS Debian version which has some main apps installed such as Mosca MQTT broker, database MongoDB, and Express Javascript (JS).We developed a client server system independently for web or android application.Express Javascript (JS) framework of Node Js was used for developing server-side application.IFTTT in server side is consisting of a collection of rules that is managed by the client to combine sensor system with the aerator system.IFTTT is consisting of by 2 conditions, IF THIS and THEN THAT.In IF THIS state, the client inserts 3 parameter's the sensors value such as under value, over value, and time.And in THEN THAT condition, the user inserts the activity that will be completed if IF THIS rule is true.The THEN THAT contains 3 parameters such as aerator ID, time, and over value.The online and android application for user are provided.MQTT broker will distribute the information for 3 users, i.e., aeration system, web application, and android application.Angular framework is utilized to create the web applications.MQTT client is installed to get information by registering to topic or transmit information to topic.

Chatbot system
Figure 2 shows the chatbot system workflow for natural language processing (NLP) which integrate with LINE social media.Line opens his API for developers to build their own chatbot.To build a chatbot system, the first thing to do is to define the classes and its features for classification.Once well defined, then the next thing is to do data collection for the purposes of text mining.The data collected is data on questions around the world of fisheries.We do scrapping data about 600 related fisheries articles.

RESULTS AND ANALYSIS
In this section, we present the implementation experimental results of chatbot and IoT.Confusion matrix is also implemented to analyze the result of naive Bayes classification.

Web-based and mobile device application
Figure 3 shows the IFTTT view application using web platform.The application has 7 main menus comprise of statistics information, node device dashboard, particular node device, maintain schedules, rules of IFTTT, user control, and application setting.Statistics information shows the detail of the system such as node position, sensor nodes number, schedules time, and rules of IFTTT.The schedule of working time of the aerator and the sensors is managed by schedules system.The node dashboard will show the sensors real time information.Our web-based application supports for responsive design.Therefore, the user is able to access our web application easily and comfortably.The statistics page shows the general and overall data that the user has.Such as the number of nodes owned, sensors, devices, IFTTT rule set, schedule to statistics from monthly data traffic.Dashboard page shows the details of the data contained in the dashboard or node.Such as the number of sensors, the number of aerators, the number of schedules set, the number of IFTTT rules is set, and the graph of each sensor contained in the node.In dashboard page, the user can add a new node and press the add node button.In Dashboard page, the user can also activate the aerator directly by switching on and nonactivated the aerator by switching off.
Figure 4 shows a graph of the dissolved oxygen (DO) sensor in real time where the oxygen dissolved sensor is installed in the user dashboard.Figure 5 shows a graph of the real-time water level sensor in which the water level sensor is installed in the user's dashboard.Figure 6 shows a graph of the PH sensor in real-time where the PH sensor is installed in the user dashboard.The function of the PH sensor is to measure the acidity and alkalinity of water.

Confusion matrix analysis for chatbot system
Table 1 shows confusion matrix measurement which is implemented to analyse and evaluate the performance of the system by counting the accuracy.Table 2 shows the classes and their features that we use for our system.We use naive Bayes algorithm to classify the data.Totally, there are 10 classes we use.Based on Figure 7, the lowest precision is IFTTT class that has only 0.75 and the best F-Measure result is greeting class.The result of naive Bayes classification is very good for classifying the fixed class with the fixed features.The lowest value of F-Measure is question class.Using confusion matrix, we can prove that our chatbot system performance is very good.

Chatbot experiment through Line application
We need social media line application to chat with chatbot.Figure 8 shows the conversation with chatbot.The conversation shows the intent of the user that wants to ask question about aquaculture specifically about catfish aquaculture.The user wants to access application feature through chatbot.The Line social media has the feature to access web page without going outside of the application.That is one advantage of using chatbot with Line Social App.
We also conducted an experiment to test the accuracy of the chatbot response directly.Insolar assistant can deliver very precise results where the response from insolar assistant is a link to the web application for device features.The device feature is a feature for setting the sensor, adding sensors, editing sensors and erasing sensors.The application is very dynamic and user friendly with the device features.The experiment is also performed to set the IFTTT rule.IFTTT itself consists of two states, namely state IF THIS and THEN THAT.From the experiments, the response from chatbot gave a good thing by returning precise answer.

CONCLUSION
In this research, we proposed an integrated IoT and chatbot to monitor aquaculture conditions integrated with smart aerator.The system uses DO, water temperature, pH, water level sensors, and aerator system.The experiment results show that the proposed system can help aquaculture farmer to monitor water quality easier than manual model and can also be done remotely.The user can manage the ideal condition of water for his fishpond through web or android application.With the chatbot system, the user can use the application features and ask for questions about aquaculture issues.Base on the result, the user experience will increase and the user will not waste time and reduce human efforts.For the future research, using more water sensors can be implemented to scale the system using large big data framework.For the future research, this research will use more water sensors to scale the system using large big data framework and will implement a machine learning method to solve some problems of the sensor reading and give and an analyst and prediction of fish farm water condition.

Figure 7 .
Figure 7. Precision, recall and F-Measure of system performance

Figure 8 .
Figure 8. Insolar assistant chatbot in Line social media

Table 1 .
Confusion matrix measurement

Table 2 .
Classes and features for chatbot system arrange the aerator, arrange the device, Control the tool, arrange the tool, control IFTTT set IFTTT, show if this then that, if this then that, IFTTT, set rule, make rule employee employee, add employee, user, add user, set employee, delete user device add device, add tool, tool, device, add device, set device shop buy tool, buy device, buy sensor, buy aerator, shop, tool shopping menu menu, show menu, menu list, choose menu, select menu question ask, want to ask, ask question, question, answer question, help login login, register, create account, sign in, sign up