Khaled Abdalgader, Muhammad Mbarak, Mohd Alam
Accurate microclimate forecasting is essential for optimizing agricultural decision-making and resource management within Internet of Things (IoT)-enabled farming systems. This study proposes an Attention-Enhanced Dual-Branch Spatio-Temporal Deep Neural Network with Station Embeddings model designed for robust spatio-temporal multisensor temperature forecasting across heterogeneous environmental stations. The model integrates multisensor data parameters within a sliding-window temporal framework to capture both short-term fluctuations and long-term dependencies. Comprehensive experiments were conducted using data from two meteorological stations to evaluate model accuracy, generalization, and robustness against sensor noise. Results show that the proposed model outperforms both classical and persistence-based baselines, achieving an average RMSE of 1.65 °C and R2 of 0.94 on test datasets. Feature correlation and importance analyses confirmed that the model learns physically meaningful relationships—particularly the influence of soil temperature and humidity on air temperature dynamics—while residual and convergence analyses verified its stability and unbiased learning behavior. Beyond algorithmic validation, this study highlights how the proposed model can be integrated into precision-agriculture systems for adaptive irrigation control, crop-growth forecasting, and microclimate-based disease-risk assessment. The model provides a scalable foundation for real-time IoT deployment on edge devices, enabling continuous environmental monitoring and intelligent actuation. These results demonstrate that data-driven deep learning models can bridge algorithmic forecasting and operational decision-making, contributing to sustainable and efficient agricultural management.