The efficient harnessing of solar energy in arid regions is critical for closing the electricity access gap in Sub-
Saharan Africa, yet installations routinely underperform due to soiling, extreme temperatures, and lack of adaptive
control. We introduce a novel hybrid Machine Learning–IoT framework that unifies real-time environmental and
electrical sensing, deep-learning prediction of power output and fault risk, and reinforcement-learning–based adjustment
of panel tilt and maintenance scheduling. The framework is cast as a constrained optimization problem balancing energy
yield, maintenance cost, and reliability, and employs a multi-stage ML pipeline—combining LSTM and XGBoost for
generation forecasting and a CNN-based classifier for anomaly detection—together with a Deep Q-Network controller. We
validate our approach via a year-long simulation of a 100 kW off-grid PV array in Northern Kenya. Compared to a fixed-
tilt, quarterly-cleaning baseline, our method achieves a 20.8 % increase in annual energy output and a 35.5 % reduction in
downtime, while respecting practical bounds on tilt angles and service frequency and maintaining fault-risk below a
prescribed threshold. These results demonstrate that end-to-end integration of IoT sensing, machine learning, and optimal
control can substantially enhance the performance, cost-effectiveness, and reliability of solar deployments in harsh,
resource-constrained environments.