Design of a Prototype of Soil Condition Monitoring System Based on Telegram Messenger Bot

Balikpapan City has a moderate level of vulnerability to landslides. This is because the city of Balikpapan has the triggering factors and causes of landslides. The trigger factor is a tropical climate with high rainfall of 2,887 mm/year. While the causative factor is that 85% of the Balikpapan City area consists of hilly areas. Therefore, it is necessary to conduct research monitoring soil conditions. This study uses several sensors such as the MPU6050 sensor, Capacitive Soil Moisture V1.2 sensor, buzzer, and the NodeMcu ESP8266 microcontroller. This prototype acts as an early warning system. The buzzer on the prototype will sound if the landslide hazard condition is identified. In addition, this prototype sends data on soil conditions via the Telegram Messenger Bot on the Telegram Messenger application. The results of data collection when the slope of the soil is 10 o to 30 o , the condition of the soil does not vibrate, and the soil moisture is dry is that there is no landslide. However, when the slope is 40 o to 50 o and the soil moisture is dry, the result is a landslide. For the data results when the slope is 10 o to 40 o , the soil condition does not vibrate, and the soil moisture is moist, there is no landslide. However, at a slope of 50 o and moist soil moisture, landslides occur. For data results with a slope of 10 o to 50 o , the condition of the soil does not vibrate and the moisture of the wet soil is that there is no landslide. The data results when water is flowed directly using a water hose at a slope of 10 o to 30 o and the ground does not vibrate is that there is no landslide. However, at a slope of 40 o to 50 o and the ground does not vibrate, landslides occur.


Introduction
High levels of soil weathering can be caused by high rainfall and exposure to sunlight. This includes triggering factors for landslides. There are two factors in the landslide disaster, namely the trigger factor and the causative factor. Factors that trigger landslides include rain, earthquakes, and volcanic activity. While the factors that cause landslides are geological conditions and morphological conditions. Generally, the definition of a landslide disaster is a condition of moving slope material in the form of rocks or soil from the top to the bottom or it can be said to be out of the slope forming [1] . In principle, landslides can occur when there is a pushing force at the top of the slope that is greater than the resisting force. The retaining force is influenced by the rock load and the density of the soil material, while the driving force is influenced by the slope, the water content in the soil, and the weight of the rock soil [2] . Balikpapan City has a moderate level of vulnerability to landslides. This is caused by factors that include trigger factors and causal factors. The trigger factor is the tropical climate with high rainfall of 2,887 mm/year. While the causative factor is that 85% of Balikpapan City consists of hilly areas, which are formed by rocks from the Balikpapan layer and the Kampung Baru layer [3] . Landslides have occurred several times in several areas in Balikpapan City. One of them is on March 25, 2021 in the RT 33 area, Jalan Sungai Wein, Karang Joang Village. This landslide disaster resulted in 12 houses experiencing a decrease in soil structure, resulting in 33 residents being evacuated and temporarily living in emergency tents. The length of the avalanche is approximately 100 meters with a width of 5 meters [4] .
There are several studies related to landslide monitoring. The landslide monitoring system is based on wireless sensor networks (WSN). The landslide monitoring system received sensor data from respective sensors and then compared with threshold value. The system shows the appropriate signal at relay station and send the SMS to smart phone that near the landslide areas [5] . Another study about landslide monitoring is the development of a landslide early warning system that will send notifications as mobile SMS alerts via GSM module equipped with a mobile application with indications: Normal, Warning, and Danger in the Philippines. The data obtained by the sensors are then analyzed by a microcontroller which is the Arduino Nano [6] . There are several studies related to monitoring through IoT. Monitoring system based on Raspberry Pi and using Video Camera [7], using SigFox Network [8], as well as simple using google sheet and kodular [9] With some of the considerations above, research related to the design of a prototype soil condition monitoring system based on telegram messenger bots was conducted. This system uses several sensors such as the MPU6050 sensor, the Capacitive Soil Moisture V1.2 sensor, buzzer, and the NodeMcu ESP8266 microcontroller. The monitored soil conditions are slope and soil moisture. This information will later be sent via Telegram Messenger Bot.

Research Method
The design and realization of this research have several stages of implementation, namely prototype design, prototyping, prototype testing, data collection and data analysis.

Prototype Design
The prototypes designed are shown by Figure   As shown by the block diagram in Figure 1, the prototype was made using two sensors, namely the MPU6050 sensor and the Capacitive Soil Moisture V1.2 sensor. The MPU6050 sensor is used to measure the slope of the ground. The Capacitive Soil Moisture V1.2 sensor is used to measure soil moisture. Both of these information will be processed by the NodeMcu ESP8266 and sent to the Telegram Messenger Bot. If both of this information has the potential to generate landslides, an alarm warning will sound on the buzzer. As shown in Figure 2 as a prototype, all components are assembled in a box. Then the prototype is tested in a test box, as shown in Figure 3. In the prototyping section, the first thing to do is test the components that have been determined. Calibration was carried out on the Capacitive Soil Moisture V1.2 and MPU6050 sensors to assess the soil's moisture value and slope.
Then the configuration of Capacitive Soil Moisture V1.2 and MPU6050 is done for delivery. Next is to combine all the components used into a unified prototype. Table 1 is the ESP8266. NodeMCU Pin configuration.

Prototype Testing
Prototype testing is carried out to find out whether the prototype is functioning as desired or not. Such as the ability of the prototype to measure the value of soil moisture, the value of the slope of the soil, sending messages via Telegram Messenger Bot on the Telegram Messenger application and giving orders to the buzzer to activate or sound when the status states danger.

Data Collection
After Prototype Testing is done and the prototype is functioning as desired, the next step is data collection. Data collection is carried out in a container that will be given soil with a prototype framework at the top. Data collection in this study was carried out under several conditions: dry, moist, wet soil and vibrating and nonvibrating soil. The research variables used in this study are soil slope, soil moisture, and vibration frequency.

Data Analysis
After data collection, data analysis is carried out. Data analysis was carried out after obtaining varied data from various conditions. From some of these conditions will be obtained indications of a landslide disaster. Then, the data acquired will be sent in the form of a message via Telegram Messenger Bot on the Telegram Messenger application in the form of information which includes the level of landslide disaster status, the value of moisture in the soil and the value of the slope on the soil. In addition, a buzzer will light up if there is an indication of a landslide disaster, or it can be said that the level of danger status for a landslide disaster from one of these conditions.

Result and Discussion
The results of the prototype design are the final prototypes made to facilitate the collection of slope data, soil moisture, and landslides detection. The hardware design includes a box measuring 10 x 15cm as a container to put the components in it. In Figure 4, there is one MPU6050 sensor to measure the slope of the soil, one Capacitive Soil Moisture sensor to measure soil moisture and one buzzer that will sound when the prototype detects the danger status of a landslide disaster. The prototype is connected to the internet network (mobile hotspot) via the Wi-Fi module in the NodeMCU ESP8266 microcontroller so that it can send messages via the Telegram Messenger Bot on the Telegram Messenger application.
Before creating a Telegram Messenger Bot, the thing that needs to be done is registering with BotFather, as shown in Figure 5. BotFather will provide several options regarding Telegram Messenger Bot. Then BotFather asks to create a new Bot. BotFather confirms the name of the desired Bot. This study uses the name Landslide Warning Bot. BotFather will ensure that a Telegram Messenger Bot with the username Avalanche Warning has been successfully created. Then BotFather provides a token used to operate the Bot that has been completed. As attached in Figure 6, the first thing to do is to start IDBot. Then, IDBot will confirm and ask for the correct command to request the bot ID. Then IDBot will send an ID to be used on the Telegram Messenger Bot that was created earlier. The next step is according to the source code in Figure 7. The mean absolute error of the MPU6050 sensor is 6.02%. Therefore, the accuracy of the MPU6050 sensor is 93.98%.  The MPU6050 sensor was tested using a protractor. The test was carried out by placing the MPU6050 sensor on the top of a wooden board with a protractor on the bottom and sides of the wooden board. Measurements were performed ten times so that the absolute error value of the MPU6050 sensor was obtained. Based on the absolute error value that has been received, the level of accuracy of the sensor readings on the prototype can be obtained. The test results of the MPU6050 sensor are shown in Table 2.
Testing on the Capacitive Soil Moisture sensor using a Soil Tester. The results of this test are shown in Table  3. The mean absolute error of the Capacitive Soil Moisture sensor is 9.3%. Therefore, the accuracy of the Capacitive Soil Moisture sensor is 90.7%.
The depth test of the Capacitive Soil Moisture sensor was carried out with two depth variations, namely 3.5cm and 7cm. Measurements were carried out once for each variation of depth and moisture in the soil (dry, moist, and wet). So that it can be concluded from the humidity value based on the depth variation. Table 4 is the result of testing the depth of the Capacitive Soil Moisture sensor based on variations in depth and moisture in the soil. Based on Table 4, the Capacitive Soil Moisture sensor can be used at a depth of 3.5cm and 7cm because the analogue data values generated at each depth variation are per the analogue data parameters of soil moisture and the actual conditions of the soil used during testing.

Training Data Results
The training data results are collecting data with nonvibrating soil conditions, variations in soil moisture (dry, moist and wet), variations in the slope of 10 o to 50 o and grouping related to the status of landslide disasters. In the data collection results shown in Table 5, it was found that there was no landslide in dry soil moisture with non-vibrating conditions and a slope variation of 10 o to 30 o . But at a slope of 40 o to 50 o , landslides occur. In the results of data collection shown in Table 6, it was found that in moist soil with non-vibrating conditions and a slope variation of 10 o to 40 o , landslides did not occur. But at a slope of 50 o landslides occur.
In the data collection results shown in Table 7, it was found that in wet soil with non-vibrating conditions and a slope variation of 10o to 50o, landslides did not occur.

Conclusion
The prototype for monitoring soil conditions using the Telegram Messenger Bot that has been designed has been successfully developed.