Integration of Weather API and IoT in an Automatic Irrigation System Based on Soil Moisture for Sugarcane Farming

  • Khasanul Khakim
  • Rini Puji Astutik
Keywords: ESP32, IoT, Smart Agriculture, Smart Irrigation, Weather API

Abstract

National sugarcane productivity in Indonesia faces significant challenges due to climate change and a reliance on rain-fed lands, as is the case in Banjarejo Village, Grobogan Regency. Prolonged drought conditions frequently lead to unstable crop growth and diminished harvest yields. This study aims to design and implement an adaptive, Internet of Things (IoT)-based automated irrigation system by integrating soil moisture sensors with weather forecast data obtained via the OpenWeatherMap Application Programming Interface (API). The system utilizes an ESP32 microcontroller as its central control unit and solar panels as its primary energy source to support sustainable agriculture. The research methodology encompasses hardware design, employing Capacitive v1.2 soil moisture sensors, a 200 Wp solar module, and a 100 Ah battery; as well as software development utilizing JSON deserialization methods on the Blynk platform. Testing results demonstrate that the sensors exhibit a remarkably high level of accuracy, with an average error rate of merely 0.528%. The integration of weather data enables the system to make more intelligent irrigation decisions; the pump activates only when soil moisture levels fall below 40% and no rainfall is forecast. Over a one-month testing period, the system achieved a 100% success rate in executing its control logic and maintaining real-time data synchronization. The use of solar panels also proved effective, generating a peak power output of 87.4 Watts under bright, sunny conditions. In conclusion, this integration of IoT technology, real-time weather data, and renewable energy successfully enhances water-use efficiency and remote monitoring effectiveness, offering an innovative solution for sugarcane farmers as they navigate dynamic environmental conditions.

Downloads

Download data is not yet available.

Author Biographies

Khasanul Khakim

Department of Electrical Engineering, Faculty of Engineering, Universitas Muhammadiyah Gresik, Gresik, Indonesia.

Rini Puji Astutik

Department of Electrical Engineering, Faculty of Engineering, Universitas Muhammadiyah Gresik, Gresik, Indonesia.

This is an open access article, licensed under CC-BY-SA

Creative Commons License
Published
        Views : 29
2026-04-10
    Downloads : 17
How to Cite
[1]
K. Khakim and R. Puji Astutik, “Integration of Weather API and IoT in an Automatic Irrigation System Based on Soil Moisture for Sugarcane Farming”, Journal of Engineering, Technology, and Applied Science, vol. 8, no. 1, pp. 29-47, Apr. 2026.
Section
Articles

References

E. Johnson, H. Jusril, L. Pratiwi, S. Trisnasari, A. M. Thow, and C. N. Rachmi, “Looking towards the sweet, sweet future: a political economy analysis of sugar and nutrition policy in Indonesia,” Public Health Nutr., vol. 28, no. 4, pp. 1–9, 2025, doi: 10.1017/ S1368980025100566.

A. Muis, S. Wulandari, I. K. Ardana, and A. Wahyudi, “Understanding climate adaptation practices among small-scale sugarcane farmers in Indonesia: The role ofclimate risk behaviors, farmers’ support systems, and crop-cattle integration,” Resour. Environ. Sustain., vol. 13, no. 10, pp. 1–10, 2023, doi: 10.1016/j.resenv.2023.100129.

N. Qin, Q. Lu, G. Fu, J. Wang, K. Fei, and L. Gao, “Assessing the drought impact on sugarcane yield based on crop water requirements and standardized precipitation evapotranspiration index,” Agric. Water Manag., vol. 275, no. 7, pp. 1–15, 2023, doi: 10.1016/j.agwat.2022.108037.

S. Gupta et al., “Smart agriculture using IoT for automated irrigation, water and energy efficiency,” Smart Agric. Technol., vol. 12, no. 6, pp. 1–11, 2025, doi: 10.1016/j.atech.2025.101081.

A. Morchid, Z. Said, A. Y. Abdelaziz, P. Siano, and H. Qjidaa, “Fuzzy logic-based IoT system for optimizing irrigation with cloud computing: Enhancing water sustainability in smart agriculture Abdennabi,” Smart Agric. Technol., vol. 11, no. 3, pp. 1–14, 2025, doi: 10.3390/iot4030012.

G. P. Pereira, M. Z. Chaari, and F. Daroge, “IoT IoT-Enabled Smart Drip Irrigation System Using ESP32,” Mol. Divers. Preserv. Int., vol. 4, no. 7, pp. 221–243, 2023, doi: 10.3390/iot4030012.

D. Balamurali et al., “A solar‑powered, internet of things (IoT)‑controlled water irrigation system supported by rainfall forecasts utilizing aerosols: a review,” Environ. Dev. Sustain., vol. 10, no. 12, pp. 1–40, 2025, doi: 10.1007/s10668-024-05953-z.

A. Abu and A. A. A. Shabaneh, “Design of a smart hydroponics monitoring system using an ESP32 microcontroller and the Internet of Things,” MethodsX, vol. 11, no. 6, pp. 1–9, 2023, doi: 10.1016/j.mex.2023.102401.

M. Afzal, I. A. Saeed, M. N. Sohail, M. H. Saad, and M. R. Sarker, “IoT-Enabled Adaptive Watering System With ARIMA-Based Soil Moisture Prediction for Smart Agriculture,” IEEE Access, vol. 13, no. 12, pp. 27714–27728, 2025, doi: 10.1109/ACCESS.2025.3532447.

Y. Dong, B. Werling, Z. Cao, and G. Li, “Implementation of an in-field IoT system for precision irrigation management,” fortiers, vol. 10, no. 2, pp. 1–11, 2024, doi: 10.3389/frwa.2024.1353597.

N. Rodrigues et al., “Sugarcane Yield Estimation Using Satellite Remote Sensing Data in Empirical or Mechanistic Modeling: A Systematic Review,” Mol. Divers. Preserv. Int., vol. 10, no. 2, pp. 1–26, 2024, doi: 10.3390/ rs16050863.

M. Španer, M. Truntiˇ, and D. Hercog, “IoT-Based Off-Grid Solar Power Supply: Design, Implementation, and Case Study of Energy Consumption Control Using Forecasted Solar Irradiation,” Appl. Sci., vol. 15, no. 12, pp. 1–28, 2025, doi: 10.3390/ app152212018.

Y. Boukri et al., “Analysis and experimental implementation of affordable smart irrigation system using IoT to reduce agricultural costs and minimize water usage,” Appl. Water Sci., vol. 10, no. 8, pp. 1–13, 2026, doi: 10.1007/s13201-025-02727-4.

I. A. Ameen and M. A. Al-sheikh, “Wireless Sensor Networks for Smart Gardening : ESP-NOW and Blynk IoT Integration for Water and Energy Optimization,” Int. J. Comput. Electron. Asp. Eng., vol. 5, no. 3, pp. 98–112, 2024, doi: 10.26706/ijceae.5.3.20240804.

X. Ye, N. Shirakawa, K. Sano, and S. Zhang, “An IoT-based predictive irrigation scheduling framework for precision soil moisture control in greenhouses,” Agric. Water Manag., vol. 329, no. 4, pp. 1–20, 2026, doi: 10.1016/j.agwat.2026.110334.

F. G. Delgado, J. M. T. Arbeláez, and D. F. C. Castañeda, “Assessment of photosynthetic and photothermal responses to water limitation in three sugarcane ( Saccharum spp .) genotypes using the photoacoustic technique,” J. Saudi Soc. Agric. Sci., vol. 7, no. 6, pp. 1–14, 2025, doi: 10.1007/s44447-025-00050-7.

M. A. Alsultan et al., “A Battery-Less UHF RFID Sensor for Soil Moisture Monitoring,” IEEE J. RADIO Freq. Identif., vol. 9, no. 5, pp. 286–294, 2025, doi: 10.1109/JRFID.2025.3572843.

R. Pujadas, E. Valderrama, and W. Venters, “The value and structuring role of web APIs in digital innovation ecosystems : The case of the online travel ecosystem,” Res. Policy, vol. 53, no. 2, pp. 1–26, 2024, doi: 10.1016/j.respol.2023.104931.

G. S. P. Lakshmi, P. N. Asha, G. Sandhya, S. V. Sharma, S. Shilpashree, and S. G. Subramanya, “An intelligent IOT sensor coupled precision irrigation model for agriculture,” Meas. Sensors, vol. 25, no. 9, pp. 1–10, 2023, doi: 10.1016/j.measen.2022.100608.

N. Yanti, F. Z. Rachman, D. Lesmideyarti, and M. E. Prasetyo, “Optimizing Real-Time Weather Data and Information Services with Frameworks and Application Programming Interfaces,” JITE (Journal Informatics Telecommun. Eng., vol. 9, no. 1, pp. 430–441, 2026, doi: 10.31289/jite.v9i2.16399.

I. Bagus Sunandari and A. Royhan, “AKCU : A Web-Based Application for Real-Time Weather and Activity Recommendations,” Int. J. Comput. Res., vol. 1, no. 1, pp. 30–39, 2026, doi: 10.11591/jjrip.v99.i1.pp1-1x.

K. Dixit, A. Ranjan, K. A. Faizan, and P. Kiran, “Automated Irrigation System Based on Soil Moisture Sensor,” Int. J. Res. Appl. Sci., vol. 10, no. 7, pp. 475–479, 2022, doi: 10.22214/ijraset.2022.45285.

A. U. Rahayu, Linawati, N. P. Sastra, and I. B. Gede Maunaba, “The Evolution of Weather-Based Deep Learning in Smart Irrigation: A Systematic Review of Sustainable Approaches and Perspectives,” Indones. J. Electron., vol. 8, no. 2, pp. 141–160, 2026, doi: 10.35882/ijeeemi.v8i1.285.

L. Huang et al., “Advances and prospects of closed-loop precision irrigation for synergistic water-salt-phosphorus regulation in saline-alkali soils,” Agric. Water Manag., vol. 325, no. 8, pp. 1–16, 2026, doi: 10.1016/j.agwat.2026.110187.

S. Dey, M. Rahman, and N. Karmakar, “Design and Experimental Analysis of Time Domain Reflectometry-Based Chipless RFID Soil Moisture Sensor,” IEEE Access, vol. 13, no. 9, pp. 185284–185295, 2025, doi: 10.1109/ACCESS.2025.3626485.

R. Nandi and D. Shrestha, “Assessment of Low-Cost and Higher-End Soil Moisture Sensors across Various Moisture Ranges and Soil Textures,” Mol. Divers. Preserv. Int., vol. 24, no. 9, pp. 1–13, 2024, doi: 10.3390/s24185886.

B. Gunawan and R. P. Astutik, “Implementation of Solar Energy for an IoT-Based Agricultural Irrigation and Monitoring,” J. Eng. Technol. Appl. Sci., vol. 7, no. 3, pp. 189–203, 2025, doi: 10.36079/lamintang.jetas-0703.958.

K. V. Vardhan, Y. K. Sai, and S. Musala, “IoT-Based Home Automation Using Blynk Application and Google Assistance,” Algorithms Comput. Theory Eng. Appl. Adv. Sci. Technol. Innov., vol. 18, no. 10, pp. 1–8, 2025, doi: 10.1007/978-3-031-72747-4_18.

P. S, “Blynk 2.0 based Smart Electricity Monitoring Meter,” Int. J. Res. Appl. Sci. Eng. Technol., vol. 11, no. 1, pp. 1312–1323, 2023, doi: 10.22214/ijraset.2023.48792.

S. Ahmed et al., “A Comprehensive Review of Solar Photovoltaic Systems : Scope , Technologies , Applications , Progress , Challenges , and Recommendations,” IEEE Access, vol. 13, no. 3, pp. 69723–69750, 2025, doi: 10.1109/ACCESS.2025.3558539.

F. Shaik, S. S. Lingala, and P. Veeraboina, “Effect of various parameters on the performance of solar PV power plant : a review and the experimental study,” Sustain. Energy Res., vol. 10, no. 10, pp. 1–23, 2023, doi: 10.1186/s40807-023-00076-x.

Z. Aini, Kunaifi, A. Wanda, E. Ismaredah, and W. Anjarjati, “Solar Irrigation System in Indonesia: Practical Assessment and Evaluation for Converting Fossil Fuels with Solar Energy,” IOP Conf. Ser. Earth Environ. Sci. Pap., vol. 927, no. 1, pp. 1–9, 2022, doi: 10.1088/1755-1315/927/1/012022.