EAI Endorsed Transactions on Smart Cities Research Article Enhancing precision agriculture: An IoT-based smart monitoring system integrated LoRaWAN, ML and AR D. T. Huong1, N. T. H. Duy1,2, P. V. M. Tu2, H. H. Hanh2,*, K. Yamada1 1Division of Mechanical Science and Technology - Graduate School of Science and Technology, Gunma, Japan 2Posts and Telecommunications Institute of Technology, Hanoi, Vietnam Abstract Effective crop production and harvesting decisions rely on proper farm monitoring and management. Each region has distinct needs for farm oversight, but the primary focus remains on collecting and evaluating environmental data such as temperature, soil moisture, air humidity, all of which are vital to plant growth. Gathering this data on a large scale requires significant effort and is often based on intuition or simple measurement tools. This paper proposes a novel solution for farming data collection using an IoT platform integrated Long-Range Wide Area Networks (LoRaWAN) network application with Augmented Reality (AR) technology and Machine Learning (ML) algorithms to predict key environmental daily indexes. In a pilot study in Quang Tho, Vietnam, the system accurately predicted environmental conditions, reduced the risk of crop failure, and improved farm management efficiency. This approach enhances real-time data interaction and offers predictive analytics, supporting sustainable agriculture. Received on 17 09 2024; accepted on 16 11 2024; published on 21 11 2024 Keywords: LoRaWAN; IoT; AR; ML; Smart Farming; Precision Agriculture Copyright © 2024 D. T. Huong et al., licensed to EAI. This is an open access article distributed under the terms of the CC BY-NC-SA 4.0, which permits copying, redistributing, remixing, transformation, and building upon the material in any medium so long as the original work is properly cited. doi:10.4108/eetsc.7286 1. Introduction Vietnam, an Asian country, is currently one of the leading exporters of agricultural products in the world. However, the country’s farming sector continues to face multiple barriers in terms of technology, manpower, and agricultural land. Currently, Vietnam hasn’t had an integrated model of smart agriculture yet which is following the concept of Agriculture 4.0 [1]. Intensive farming methods are still heavily influenced by tradi- tional practices, primarily using human and livestock labor, and farmers assess the status of their farms relying on personal experience. It has been customary that farmers have to be present on their farms during every stage of the crop’s growth. This requirement stems from the necessity to ensure the crops’ well-being and upkeep. Consequently, around 70% of the cultivation timeline is spent on directly monitoring the farms instead of hands-on field activities. To address this, gathering and utilizing effective data is essential, and this can be achieved by precision agriculture. Precision ∗Corresponding author. Email: hhhanh@ptit.edu.vn agriculture refers to the implementation of hardware and software technologies that enable farmers to make informed and customized decisions about various agri- cultural activities, including planting, fertilizing, pest control, and harvesting [2]. Precision agriculture relies much on the accurate monitoring and forecasting of environmental conditions to optimize farm manage- ment and enhance crop productivity. However, envi- ronmental unpredictability makes it difficult to deploy continuous monitoring sensors in agriculture. Large farms have several kinds of terrains, affecting tempera- ture, humidity, soil composition, and sunlight exposure. 1.1. The integration of IoT and other technologies The adoption of the Internet of Things (IoT) is crucial for implementing smart farming practices, especially in large and remote areas [3]. In recent years, the rapid advancement of the Internet of Things (IoT) has significantly enhanced agricultural productivity worldwide. The integration of advanced technologies with IoT has enabled it to optimize agricultural processes. In [4], AI and ML were applied with IoT to support farmers with decisions on irrigation, 1 EAI Endorsed Transactions on Smart Cities | Volume 7 | Issue 4 | 2023 | https://creativecommons.org/licenses/by-nc-sa/4.0/ https://creativecommons.org/licenses/by-nc-sa/4.0/ mailto: D. T. Huong, et al. fertilization, and pest management. Meanwhile, IoT was also combined with ML-Blockchain framework 5.0 in [5] to predict optimal crop outcomes. This model was suitable for both small and large farms. In addition, sensors were also combined with ML and AR to help people in aquaculture. In [6], Rahman et al. combined these 3 technologies to detect water issues in shrimp ponds and predict conditions 24 hours in advance. When combining IoT with different technologies, it brings unexpected efficiency in improving agricultural quality and productivity, helping farmers reduce the time to monitor and predict the status of the farm. However, to meet the infrastructure, installation costs are a relatively large obstacle. In addition, farmers’ understanding of data is also limited due to their low technological level. 1.2. Our approach In this paper, we propose the deployment of an IoT device using the STM32 series microcontroller and supporting the Long-Range Wide Area Networks (LoRaWAN) protocol which was determined to be the most reliable and deliver the greatest benefit for on-farm environmental data gathering in this project. The system helps enhance data gathering and quality by offering efficient, dependable, real- time environmental monitoring overbroad and remote locations. However, simply monitoring environmental indicators in the field in real time is not enough. In addition to knowing critical field indicators such as temperature, soil moisture, and air humidity, farmers need to forecast information on these indicators to make timely crop decisions. Furthermore, a system that allows farmers to monitor their fields remotely can save time and improve efficiency. For these reasons, we integrate an interactive interface to the IoT system, in which Augmented Reality (AR) technology and Machine Learning (ML) algorithms are being used to predict field conditions based on data collected from the LoRaWAN-IoT system. This interface is called Farmerly, which includes a web-based management application and an AR mobile app that allows managers to oversee conditions across the entire farm, including current and near-future environmental conditions and stages of crop development. These models helped farm management from reactive to proactive, allowing farmers to anticipate and prepare for changes, showing promising accuracy in forecasting critical parameters. 2. System architecture IoT provides a global infrastructure for the information society by interconnecting physical and virtual objects through interoperable information and communication technologies [7]. IoT enables real-time monitoring and control, leading to precise farming practices. This Figure 1. The proposed model of an IoT platform using LoRaWAN integrated AR helps optimize planting times, irrigation schedules, and harvesting periods, ultimately improving operational efficiency [8]. Key components of IoT include smart sensors, cloud computing (CC), wireless networks, and analytic software [9]. Common IoT technologies are low-power Wi-Fi, Bluetooth Low Energy (BLE), DASH7 Alliance Protocol (D7A), Long Range (LoRa), and LoRaWAN [10]. Because of the long-range, low power consumption of LoRaWAN and the powerful processing capabilities of the STM32 microcontroller, edge computing enables data pre-processing, resulting in more efficient bandwidth utilization and higher data quality. The model of an IoT system based on LoRaWAN integrated with ML and AR is given in Fig. 1. ML, a crucial branch of Artificial Intelligence, allows computer systems to learn and improve independently without human intervention. Applying ML, IoT devices can predict and behave based on their own [11]. This model that outlines a comprehensive system for farm monitoring and management in four key stages: (1) Data collection; (2) Data transmission and cloud processing; (3) Data analysis and prediction; and (4) Visualization and interaction. (1) – Data collection Sensors that connect to STM32 microcontroller- based IoT devices, transmitting data via the LoRaWAN protocol, placed across the farm gather environmental metrics. To collect data, End Nodes are equipped with various sensors and actuators. Each End Node includes an STM32 series microcontroller; Temperature, soil moisture, and air humidity sensors; LoRaWAN module for data transmission. The End Nodes are designed using a development kit that allows engineers to easily attach different sensors and actuators. These nodes collect data on temperature, soil moisture, and air humidity from the environment. The collected data is then sent to a central gateway via LoRaWAN. (2) – Data transmission and cloud processing The data transmission and cloud processing stage is critical for ensuring that the data collected by IoT devices is efficiently transmitted, stored, and processed. This stage involves multiple steps to ensure data integrity, scalability, and accessibility. IoT devices equipped with STM32 microcontrollers 2 EAI Endorsed Transactions on Smart Cities | Volume 7 | Issue 4 | 2023 | Enhancing precision agriculture: An IoT-based smart monitoring system integrated LoRaWAN, ML and AR collect data from various sensors (temperature, soil moisture, air humidity) deployed across the farm. These microcontrollers process the raw sensor data locally to reduce noise and errors, ensuring that only clean and meaningful data is transmitted. The processed data is sent from the STM32 microcontrollers over the LoRaWAN network. LoRaWAN is ideal for large farms because it supports long-range communication with low power consumption, making it suitable for areas with limited internet access [10]. LoRaWAN enables devices to exchange data for up to ten years on battery life, meeting the needs of long-distance, ensuring low power consumption [12]. A LoRaWAN gateway acts as a central hub that facilitates data transmission from multiple IoT devices to the cloud. The gateway receives data from the IoT devices over the LoRaWAN network and then relays it to cloud servers using high- bandwidth networks like Wi-Fi, Ethernet, or Cellular. (3) – Data analysis and prediction In the cloud, the data collected from the IoT devices goes through a structured pipeline involving three key modules: Business, Process Data, and Prediction. Each of these modules plays a crucial role in transforming raw data into actionable insights and predictions that can help farmers make informed decisions. The Business Module is responsible for handling the operational aspects of the data pipeline. It ensures that the data collected is securely stored and readily accessible for further processing, controlling who can access the data and what operations they can perform, maintaining the accuracy and consistency of data, and coordinating the sequence of operations from data collection to analysis and prediction. The Process Data Module conducts the initial analysis of the collected data. Data cleaning removes inaccuracies and inconsistencies, normalization standardizes the data to bring all variables onto a common scale, and feature extraction identifies and extracts significant features from the raw data, such as trends, seasonal patterns, and cyclical components. The Predict Module leverages ML algorithms to forecast future environmental conditions such as temperature, soil moisture, and air humidity daily. These models are trained on historical data and continuously updated as new data becomes available, ensuring that the predictions generated are accurate and reliable, providing farmers with actionable insights. (4) – Visualization and interaction The final stage of the precision agriculture moni- toring system involves presenting the analyzed and predicted data to end-users through interactive inter- faces, enhancing their ability to make informed deci- sions. This stage is crucial for translating complex data into helpful insights, which can be easily understood and utilized by farmers or farm managers. The web- based system serves as a comprehensive farm man- agement dashboard that provides a detailed overview of the farm’s status and environmental conditions. This dashboard offers status indicators that visually show the overall status of the farm, such as normal, sunny, rainy, drought, or flood conditions. Besides, the AR application provides an immersive and interactive way to visualize the farm’s condition. Real-time 3D graphics overlay sensor data onto the farm’s physical environment, highlighting areas that require attention; showing the alert when there is a change from the environment. Otherwise, the AR app shows the main stages of crop development, enhancing their decision- making processes based on both real-time insights and future forecasts. 3. Pilot implementation With the requirements and proposed system mentioned above, we developed a pilot IoT system for monitoring the farm’s seasonal time series such as moisture, humid- ity, and temperature parameters named Farmerly. This system seamlessly integrates LoRaWAN communica- tion, ML algorithms, and AR technology. Designed to provide farmers with real-time insights and predictive analytics, Farmerly offers a new solution for modern farming challenges. Table 1 highlights the specifications and functions of the IoT system adopted in this study, showcasing the innovative approach and comprehen- sive capabilities of Farmerly in revolutionizing agricul- tural practices. 3.1. LoRaWAN nodes and gateway for data transmission In the first phase, the system performs data collection. Environmental indexes are collected via sensors set across the farm, which are connected to STM32 microcontroller-based IoT devices and communicate data using the LoRaWAN protocol. End Nodes are equipped with a variety of sensors and actuators to collect data. The End Node is designed based on the STM32F103 microcontroller. This is a 32- bit microcontroller that incorporates an ARM Cortex- M3 core processor operating at a 72 MHz frequency and high-speed embedded memories. Another advantage of this microcontroller is its compatibility with Arduino platform so the developer can easily reuse a lot of Arduino’s libraries. The RFM95W LoRa module is used as a modem to provide a long-distance wireless connection while keeping a low power consumption. The MCU connects to the LoRa module via SPI connection for high-speed data rate and least I/O pins Fig. 2. A power supply is very important for a device to work well in many different conditions. Therefore, the power management (PM) block is also designed 3 EAI Endorsed Transactions on Smart Cities | Volume 7 | Issue 4 | 2023 | D. T. Huong, et al. Table 1. Specifications and Functions of IoT Devices No IoT Specifications and Functions 1 NodeMCU ESP32 Microcontroller: ESP32 CPU: Dual-core Tensilica LX6 Connectivity: Wi-Fi, Bluetooth Digital I/O Pins: 36 Analog Input Pins: 18 Function: IoT device development, wireless connectivity, sup- ports Arduino IDE. 2 Arduino Uno R3 Microcontroller: ATmega32P CPU: 8-bit AVR Digital I/O Pins: 14 Analog Pins: 6 Function: General-purpose microcontroller for various electron- ics projects, programming with Arduino IDE. 3 SmartFarm Cloud Cloud-based IoT platform Features: Pre-process, stores and processes data; Hosts ML models Functions: Allow IoT device data to be uploaded, stored, analyzed, and visualized in real-time through web-based interfaces. 4 ML Integration ML models for data analysis and predictions Features: Analyzes, predicts Functions: Analyze historical data to predict future environmen- tal conditions daily (based on temperature, wind, pressure, cloud cover, and humidity) 5 Famerly Applications AR mobile app & web-based application for IoT monitoring Features: Comprehensive farm management, real-time monitor- ing Functions: Allows farmers to see data in its actual context, enhancing decision-making processes with real-time insights and future forecasts through website and mobile app interface. Figure 2. Schematic of MCU and RFM95W module carefully to provide many types of output voltages, reduce the EMI (Electromagnetic interference) noise and keep a stable supplier. A current/voltage sensor and a temperature sensor are integrated into this PM block for monitoring and controlling, ensuring good conditions for the power supply (Fig. 3). Figure 3. Schematic of power management block After finishing the schematic design, the printed circuit board (PCB) design is an important step to have a good layout for board manufacturing. A good PCB design reduces the size of the board but still solves the heatsink problem and prevents the crosstalk noise. A prototype of End Node is shown in Fig. 4. The gateway is used to connect two networks with different communication protocols that can communicate with each other. A LoRa gateway can communicate with 4 EAI Endorsed Transactions on Smart Cities | Volume 7 | Issue 4 | 2023 | Enhancing precision agriculture: An IoT-based smart monitoring system integrated LoRaWAN, ML and AR Figure 4. Schematic of power management block Figure 5. Board ESP32 - WiFi Lora 32 for Gateway LoRaWAN other LoRa End Nodes to get the data from them and then send it to the network server through a high- speed internet connection. For smart farm applications, a simple 1-channel gateway is implemented by using an ESP32 – Wifi LoRa board Fig. 5. This board runs appropriate software to configure it as a gateway in the LoRaWAN. ESP32 - WiFi Lora board is a development board with a combination of ESP32 SoC chip, and Tensilica LX6 processor clocked at 240MHz. It supports many wireless connections such as WiFi 802.11 b/g/, Bluetooth, and LoRa. This board uses the LoRa SX1278 chip to operate with a frequency of 918MHz for a distance of up to 5 km. 3.2. Data management and processing hub SmartFarm Cloud contains data from sensors and Application Server which is used to get, process, store, organize information, analyze and make predictions. The Things Network (TTN) is LoRaWAN cloud network server that we use in SmartFarm Cloud. TTN is an open community platform supported by over 100,000 developers in the LoRaWAN sector. TTN supports more than ten thousand LoRaWAN gateways around the Figure 6. System’s data management and processing diagram Figure 7. Warning alerts from Firebase Cloud Message world [13]. SmartFarm Cloud manages information that is collected by IoT devices and is streamed to the cloud. This information is sent to different parts of the system using the UDP protocol and this incoming data is stored in the form of MongoDB (NoSQL). The information managed by End nodes is displayed via the dashboard and AR mobile application from this Application server as shown in Fig. 6. Moreover, in this system, Firebase Cloud Message sends warning alerts to mobile app to keep control of their farm as in Fig. 7. The prediction module within the application server processes farm weather data, collecting and cleaning information like temperature, humidity, soil moisture, and particulate matter through SmartFarm Cloud. This data is then used to train a prediction model, which generates real-time weather forecasts for the area based on collected indicators and past predictions, resulting in highly accurate forecasts. Upon completing the training process, the system utilizes a Data Processing module to analyze farm data using optimal parameters efficiently. Its primary objective is to identify any abnormal alterations in the farm environment. In the event of such changes, the system promptly issues alerts to notify farmers and provide guidance on corrective actions to maintain an optimal farm environment. 3.3. Machine Learning-Driven weather forecasting Weather prediction has always been a critical aspect of planning and decision-making across various sectors, from agriculture to disaster management. Traditional methods of weather forecasting rely heavily on numer- ical weather prediction models that use mathematical 5 EAI Endorsed Transactions on Smart Cities | Volume 7 | Issue 4 | 2023 | D. T. Huong, et al. equations to simulate atmospheric conditions. While these models have been effective, they often require significant computational resources and can sometimes lack the precision needed for localized forecasts. In recent years, machine learning (ML) has emerged as a powerful tool for enhancing weather prediction [14] [15]. ML algorithms can analyze vast amounts of his- torical weather data to identify patterns and make predictions with high accuracy. These algorithms are capable of learning from the data, improving their performance over time, and providing more precise and timely weather forecasts. Research indicates that ML methods are becoming key features in modern weather forecasting systems. A study [16] highlights the growing importance of ML in weather prediction, noting that it competes with traditional physical mod- els and often exceeds them in short-term forecasts. However, challenges remain in medium-to-long-term climate forecasting due to the complexity of climate variables and data limitations. Furthermore, the inte- gration of ML in weather prediction systems has led to improved efficiency and accuracy. Therefore, we use machine learning models, includ- ing Random Forest (RF) and Logistic Regression (LR), for weather prediction, specifically rain or sun, in our application. We use these two models to compare and choose the one with the highest performance: (1) RF is an ensemble learning method that constructs multiple decision trees during the training phase, with each tree trained on a random subset of the training data. For classification, the final output is determined by a majority vote of the predictions from all individual trees. RF’s strength lies in its ability to handle large datasets with high dimensionality and complex interactions between variables. The use of bagging (bootstrap aggregating) reduces overfitting by ensuring that each tree is exposed to different subsets of data, making the model robust and generalizable. This capability makes RF particularly suitable for applications like weather prediction, where the data can be noisy and intricate. (2) LR is a simple yet powerful statistical method used for binary classification tasks. Unlike linear regression, which predicts continuous outcomes, LR predicts the probability of a given input belonging to a particular class. It uses the logistic function to model this probability, producing outputs between 0 and 1. The model is trained by maximizing the likelihood that the observed data can be predicted by the logistic function. LR is valued for its simplicity, ease of implementation, and interpretability, making it a baseline model in many classification tasks. It is particularly effective when the relationship between the features and the target variable is linear, as it provides clear insights into the influence of each feature on the prediction. Data Normalization Label encoding Training Data from 2023 Testing from 1/2024 to 4/2024 Model testingData and Preprocessing Optimized Hyperparameters of ML models RF LR 5-fold CV Model prediction RF LR Figure 8. The flowchart of ML model for weather prediction The proposed method, shown in Fig. 8, consists of three steps. Initially, the data is preprocessed, including steps: data collection, label encoding, and normalization. The preprocessed data is then used for model training, specifically applying Random Forest (RF) and Linear Regression (LR) algorithms with 5- fold cross-validation to optimize hyperparameters. The optimized models are subsequently tested using the 2024 data to ensure accuracy and reliability in weather prediction. 3.4. Augmented Reality integration for interactive farm monitoring In this section, with the aim to support comprehen- sive farm management, we developed a high-level mod- ule with two parts: a website-based data management system and an AR mobile application. Farmerly web- based system oversees smart farm operations, recording and displaying temperature, humidity, and soil mois- ture details on a dashboard with time-valued data. The graphics illustrate trends across various terrains and periods, aiding farm managers in decision-making. The system includes a dedicated section for managing this region, displaying all relevant metrics and updates as in Fig. 9. Farmerly AR App uses ARKit [17] integration to visualize real-time sensor data overlaid on the actual field view. ARKit’s plane detection identifies horizontal and vertical surfaces through points of interest such as corners, edges, and color transitions, allowing accurate placement of virtual objects within the real-world scene. Additionally, the application utilizes ARKit’s brightness sensor to dynamically adjust the brightness of virtual objects based on the surrounding light, ensuring seamless integration with the real environment [17]. To predict the environment, Farmerly AR app displays 3D models and texts representing predicted daily conditions, including temperature, humidity, and soil moisture levels which are collected from LoRaWAN end nodes. Users can tap on AR elements to see detailed data and predictions 6 EAI Endorsed Transactions on Smart Cities | Volume 7 | Issue 4 | 2023 | Enhancing precision agriculture: An IoT-based smart monitoring system integrated LoRaWAN, ML and AR Figure 9. Dashboard of Farmerly web-based system as in Fig. 10. Farmerly AR app also had alerts for significant predictions, such as impending adverse weather conditions. Farmerly AR application fetched data and forecast from the backend API. Real-time data on temperature, humidity, and soil moisture is displayed alongside ML-generated predictive analytics, forecasting the daily conditions of the farm based on historical data. Beyond environmental data, this application also visualizes stages of the crop life cycle based on its usual development timeline. This feature allows farmers to see a detailed, augmented representation of crop growth stages overlaid onto the actual field, providing crucial insights into the health and progress of their crops. 4. System evaluation 4.1. Experimental setup a. Location and crop Centella is a herbaceous plant, often growing in humid places and tropical regions such as Southeast Asia, China, India, Sri Lanka, Central Africa... [18]. The ideal growing conditions for centella include nutrient- rich alluvial soil with a loose texture that retains moisture and drains well. Centella has been grown in different regions of Vietnam for commercial production purposes. The most typical regions are in Thanh Hoa and Thua Thien Hue provinces. Quang Tho, Thua Thien Hue, Vietnam (16°32’06.2"N,107°31’39.7"E) is selected to be the pilot area. This region has the biggest area of centella cultivation, covering over 70 hectares. In 2013, the VietGAP centella process of production was officially implemented in Quang Tho. Thua Thien Hue is a central coastal province with a hot, humid climate, abundant rainfall, and frequent flooding, especially from October to December. Each year, in Quang Tho, centella is usually planted in 3 seasons: Spring crop Figure 10. ARKit plane detection in Farmerly AR mobile app (planted in February), Summer crop (planted in May) and Autumn crop (planted in August) [19], requiring heavy watering initially during the dry, sunny weather. Subsequently, the crop is watered every two days. The sample collection demonstration was conducted from January 2023 to April 2024, aligning with centella’s typical growth cycle. A centella crop typically takes 84 - 90 days from planting to harvest [19], given optimal meteorological conditions (temperatures between 30-32°C, average monthly rainfall below 100 mm, and no flooding). Regular soil humidity checks are necessary to ensure proper watering. However, the region’s frequent floods and the characteristics of alluvial soil mean that prolonged submersion in floodwaters can result in a significant layer of mud covering each centella stem. If not harvested promptly, this can lead to crop damage and potentially result in total crop loss for the farmers. b. System configuration 1. End Nodes: Equipped with STM32F103 microcon- trollers, RFM95W LoRaWAN modules, and specialized sensors including temperature, humidity, soil moisture, and nutrient levels tailored for centella growth. 2. LoRaWAN Gateway: Deployed using ESP32 – WiFi LoRaWAN boards with integrated LoRaWAN SX1278 chips, strategically positioned to cover centella cultivation areas effectively. 7 EAI Endorsed Transactions on Smart Cities | Volume 7 | Issue 4 | 2023 | D. T. Huong, et al. Figure 11. Farmerly web-based system 3. AR Interface: Accessible through a mobile application developed using ARKit, providing centella farmers with a 3D visualization of crop health, growth patterns, and environmental conditions. c. Data collection and analysis Data collection occurs at high-frequency intervals, with sensors providing readings every 15 minutes. Parameters specific to centella cultivation including temperature, soil moisture, humidity, and weather were monitored alongside traditional environmental factors. Data was transmitted wirelessly to the LoRaWAN gateway, then processed and analyzed within the SmartFarm cloud. Algorithms tailored for centella cultivation provided insights into optimal growth conditions and disease prevention strategies. 4.2. AR application a. Data for prediction The data was collected daily from January 2023 to April 2024 in Quang Tho, Thua Thien Hue province, with each sample containing seven features: minimum temperature, maximum temperature, wind speed, wind direction, humidity, cloud cover, and pressure. The entire dataset includes 485 samples. The data is divided into training and testing sets, with samples from January 2023 to December 2023 (365 samples) used for training and model optimization, and samples from January 2024 to April 2024 (120 samples) used for testing. Fig. 11 is an example of the system generating a warning signal indicating a potential drought. The data after being learned through the Markov chain will be fed into the system. At the same time, based on the given prediction threshold, the system will give warnings to users through the AR application about the data in the next 3 days. The system shows a warning when the sunny weather remains for more than 2 days, the temperature is higher than 33°C, wilting point occurs when soil moisture drops to approximately 15-25% of the soil’s water holding capacity. While centella plants tolerate moisture well, excessive rainfall and flooding can pose risks. When the rainy or storm remains up to 2 days, soil moisture levels above 60% of the soil’s water holding capacity, and waterlogging threshold appears [20]. If the indexes exceed the safe threshold, the system automatically provides a warning to the manager based on checking the set condition in Table 2. Table 2. Conditions to issuing alerts Conditions on farms Messages shown in Farmerly system Temperature <33°C. Soil moisture >25%; Duration > 1 day. Your irrigation practices are perfect. Continuous monitoring of soil mois- ture to maintain these optimal conditions. Temperature increased >33°C; Soil moisture <25%; Duration > 2 days. Your plants are at risk of entering the wilting point. Please irrigate to restore soil moisture. Temperature <33°C; Soil moisture 25- 60%; Duration > 1 day. Your irrigation practices are perfect. No immediate action is required. Temperature increased 25-32°C; Soil moisture >60%; Duration > 2 days. Current conditions can be waterlogging. Stop irri- gating immediately and reduce excess water if necessary. b. Crop visualization via Farmerly system and AR application The data management system oversees the operations of the smart farm, keeping track of vital details such as temperature, humidity, and soil moisture. In this case, the system is tracking specific to centella cultivation. On the dashboard, users can observe these metrics along with their respective values over time. Additionally, the system manages designated regions where centella crops are grown. In the event of adverse weather conditions, the system triggers a farm tracking alert, notifying users to take necessary precautions and enabling users to promptly attend to their centella crops based on real-time weather conditions. The farm’s environmental parameters are recorded at regular 15- minute intervals, maintaining consistency throughout the day. The data collected from these measurements is then input into the prediction model. If any serious future fluctuations occur, the model automatically notifies and displays related alerts in the upper right corner of the AR Mobile app. The farm displays model also shows areas in the field that are not uniform in the index, e.g. 1/5 areas in the field lack moisture. This 8 EAI Endorsed Transactions on Smart Cities | Volume 7 | Issue 4 | 2023 | Enhancing precision agriculture: An IoT-based smart monitoring system integrated LoRaWAN, ML and AR Figure 12. High moisture alerts follow the real weather on the farm enables immediate monitoring and response to changes in the agricultural environment, while also optimizing the management and monitoring processes. Rainy weather and indexes on temperature, air humidity, and soil moisture from the farm are shown in real time in Fig. 12. When farmers used the AR app to monitor the farm, they gained the ability to visualize every stage of the centella crop’s development. Quang Tho experiences a tropical climate with distinct wet and dry seasons. Ensuring consistent moisture during the dry season and preventing waterlogging during the wet season is crucial. In particular, during the post-harvest period, farmers must pay close attention to providing moisture and nutrients to continue stimulating new roots to grow for the new crop. With this information displayed on the AR application, farmers may have a more comprehensive view of the development stages, such as planting, initial growth, root development, leaf expansion, flowering, and harvesting as shown in Fig. 13. For visualization purposes using AR, we collect Figure 13. Farmerly AR App displays the development stage of the crop the morphological characteristics of the crop in the whole development stages into 5 main stages: (1) Seed Germination; (2) Seedling Stage; (3) Vegetative Growth; (4) Flowering Stage; (5) Fruiting Stage. They can make decisions in the field to help centella plants grow strongly and produce high-quality yields in Quang Tho. The stages displayed in each period of the crop’s development are shown in Table 3. 4.3. Assessment results By optimizing the RF and LR models using grid search CV and combining 5-fold CV on the 2023 dataset, our machine learning model is optimized and reliable. Next, we conducted training. Finally, we implemented testing from January 2024 to April 2024. The results show that the RF model correctly predicted 108 out of 120 days (90% accuracy), while the LR model correctly predicted 105 out of 120 days (87.5% accuracy). Therefore, we choose RF for the daily weather prediction model on our application. Implementing the automatic monitoring, prediction, 9 EAI Endorsed Transactions on Smart Cities | Volume 7 | Issue 4 | 2023 | D. T. Huong, et al. Table 3. Life Cycle Of centella Asiatica With Time And Key Factors Stage Duration Key Factors Influ- encing Stage Seed Germi- nation First 7-14 days Moist soil conditions, optimal temperature (20- 30°C), shallow sowing Seedling Stage In 2-4 weeks Moisture, light, temperature (20- 30°C) Vegetative Growth In 8 - 12 weeks Light intensity, soil quality, consistent watering Flowering Stage In 16 weeks Insect activity, suit- able climatic con- ditions (25-35°C) Fruiting Stage In 20 weeks Environmental fac- tors affecting seed dispersal and warning system significantly expedited farm monitoring tasks, reducing both implementation and decision-making times by 80% compared to traditional methods without the AR application. Table 4. Aspect and Feedback/Observation Aspect Feedback/Observation Ease of Use 90% of farmers found the AR app easy to navigate and use. Real-Time Monitoring 85% of farmers appreciated the real-time data visualiza- tion. Decision-Making 80% reported enhanced ability to make informed decisions. Crop Growth Visu- alization 88% found growth stage visualization very benefi- cial. Environmental Alerts 75% felt timely alerts helped prevent potential issues. Accuracy of Pre- dictions 82% trusted the accuracy and reliability of predic- tions. Resource Manage- ment 70% observed improved efficiency in water and nutrient management. System Reliability 95% experienced high sys- tem reliability and uptime. The AR visualization enabled farmers to make more informed decisions by understanding the precise conditions and needs of their crops at each stage. During the pilot project, interviews were conducted with farmers to gather feedback on their experiences using the Farmerly data management system and AR application. The results of the farmer interviews were evaluated and feedback on the system in Table 4. This integrated approach greatly improved the scope and accuracy of environmental data collection, which is crucial for making well-informed decisions about agricultural operations. The ability to monitor and predict environmental conditions, combined with the visualization of crop growth stages, allowed farmers to optimize resource usage, anticipate and mitigate potential issues, and ultimately improve crop yield and quality. 5. Conclusion In response to the increasing need for precision agri- culture, this paper has explored the opportunities and challenges associated with implementing a novel IoT- based system for farm management and monitoring. The proposed system integrates Long-Range Wide Area Networks (LoRaWAN), Machine Learning (ML), and Augmented Reality (AR) technologies with IoT devices, specifically STM32 family microcontrollers. This com- bination enhances the way farmers interact with and control their farms, improving the efficiency and reli- ability of data collection. The primary results indicate that this integrated approach significantly enhances the scope and accuracy of environmental data collection, which is crucial for making well-informed agricultural decisions. The AR interactive interface demonstrated an impressive 87.5% accuracy in facilitating manage- ment decisions while reducing both implementation and decision-making times by 80% compared to tradi- tional methods without the AR application. The pilot study conducted in Quang Tho, Vietnam, validated the effectiveness of this integrated approach in predicting key environmental conditions such as temperature, soil moisture, and air humidity, thus enabling proactive and informed decision-making. The system demonstrated high prediction accuracy and significantly reduced monitoring and decision-making times. The combination of LoRaWAN, ML, and AR in IoT-enabled smart farm monitoring has proven to be an effective solution for precision agriculture. LoRaWAN allows data to be transmitted over long distances with minimal power consumption, while AR offers farmers real-time insights and visualizations of their crops, providing an immersive and interactive experience. The integration of ARKit further enhances the system’s accuracy and usability. This technology has the potential to revolutionize farm monitoring and 10 EAI Endorsed Transactions on Smart Cities | Volume 7 | Issue 4 | 2023 | Enhancing precision agriculture: An IoT-based smart monitoring system integrated LoRaWAN, ML and AR management, leading to increased efficiency and higher crop yields. However, considerations around scalability, cost, and technical challenges need to be addressed for broader implementation. References [1] D. T. Anh, P. C. Nghiep: Smart Agriculture for Small Farms in Vietnam: Opportunities, Challenges and Policy Solutions, FFTC Journal of Agricultural Policy, 09 August 2022), [2] S.Sharma, Precision Agriculture: Reviewing the Advancements, Technologies, and Applications in Precision Agriculture for Improved Crop Productivity and Resource Management, July 2023, DOI: 10.26480/rfna.02.2023.41.45, [3] Y.T. Ting, K.Y. Chan: Optimising performances of LoRa based IoT enabled wireless sensor network for smart agriculture, Journal of Agriculture and Food Research, Volume 16, June 2024, 101093, [4] Rangra, V., Thakur, P. (2024). Smart farming: Leveraging AI, ML, and IoT for enhanced farming and revolutionizing agriculture. BSSS Journal of Computer, 15(1), 54-64, [5] Sizan, N. S., Dey, D., Mia, M. S., Layek, M. A. (2023). Revolutionizing agriculture: An IoT-driven ML- Blockchain framework 5.0 for optimal crop prediction. In 2023 5th International Conference on Sustainable Technologies for Industry 5.0 (STI), Dhaka, Bangladesh, 09-10 December. IEEE, [6] Rahman, A., Xi, M., Dabrowski, J. J., McCulloch, J., Arnold, S., Rana, M., George, A., Adcock, M. (2021). An integrated framework of sensing, machine learning, and augmented reality for aquaculture prawn farm management. Aquacultural Engineering, 95, 102192, [7] D. Sembroiz, S. Ricciardi, D. Careglio: A Novel Cloud- Based IoT Architecture for Smart Building Automation, Security and Resilience in Intelligent Data-Centric Systems and Communication Networks, Intelligent Data- Centric Systems, 2018, 215-233, [8] E.T. Bouali, M.R. Abid, E.M. Boufounas, T.A. Hamed, D. Benhaddou, Renewable energy integration into cloud IoT- based smart agriculture, IEEE Access, 10 (2022), pp. 1175- 1191, 10.1109/ACCESS.2021.3138160, [9] E. Fazel, M. Z. Nezhad, J. Rezazade, M. Moradi, J. Ayoade: IoT convergence with machine learning & blockchain: A review, Internet of Things, Volume 26, July 2024, 101187, [10] J. E. Rayess, K. Khawam, S. Lahoud, M. E. Helou and S. Martin, Study of LoRaWAN Networks Reliability, 2023 6th Conference on Cloud and Internet of Things (CIoT), Lisbon, Portugal, 2023, pp. 200-205, [11] Alan B. Craig: Chapter 1 - What Is Augmented Reality?, Understanding Augmented Reality, Morgan Kaufmann, Boston, 2013, 1-37, [12] B. Rashid, M. H. Rehmani.: Applications of wireless sensor networks for urban areas: A survey. Journal of Network and Computer Applications (60), 192-219 (2016), [13] A. Yusri and M. I. Nashiruddini: LoRaWAN Internet of Things Network Planning for Smart Metering Services, 2020 8th International Conference on Information and Communication Technology (ICoICT), Yogyakarta, Indonesia, 1-6, (2020), [14] Jones, Nicola. "How machine learning could help to improve climate forecasts." Nature 548.7668 (2017). [15] Bochenek, Bogdan, and Zbigniew Ustrnul. "Machine learning in weather prediction and climate analy- ses—applications and perspectives." Atmosphere 13.2 (2022): 180, [16] Chen, Liuyi, et al. "Machine learning methods in weather and climate applications: A survey." Applied Sciences 13.21 (2023): 12019, [17] Zainab Oufqir, Abdellatif El Abderrahmani and Khalid Satori: ARKit and ARCore in serve to augmented reality, 2020 International Conference on Intelligent Systems and Computer Vision (ISCV) ( 09-11 June 2020), [18] Rosalizan, M. S., Rohani, M. Y., Khatijah, I., Shukri, M. A. (2008), Physical characteristics, nutrient contents and triterpene compounds of ratoon crops of centella asiatica at three different stages of maturity, Journal of Tropical Agriculture and Food Science, 36(1), 43-51, [19] N.Q.Co, H.T.Quang, T.T.H.Hai, Effect of some farming factors on growth and yield of in vitro centella (centella asiatica (L.) Urban) in Quang Tho commune, Thua Thien Hue province, Hue University Journal of Science: Agriculture and Rural Development, Vol. 133 No. 3A (2024), [20] Thao Thi Phuong Tran et al: Comparison of organic and conventional production methods in accumulation of biomass and bioactive compounds in Centella asiatica (L.) urban, Back toAgriculture and Food Chemistry, 21 November 2023, 11 EAI Endorsed Transactions on Smart Cities | Volume 7 | Issue 4 | 2023 | 1 Introduction 1.1 The integration of IoT and other technologies 1.2 Our approach 2 System architecture 3 Pilot implementation 3.1 LoRaWAN nodes and gateway for data transmission 3.2 Data management and processing hub 3.3 Machine Learning-Driven weather forecasting 3.4 Augmented Reality integration for interactive farm monitoring 4 System evaluation 4.1 Experimental setup 4.2 AR application 4.3 Assessment results 5 Conclusion