This project presents an Integrated IoT based Weather Monitoring System and Machine Learning based Weather Prediction System that integrates real-time sensor data collection through sensors and predictive analysis to implement weather prediction. The system includes IoT sensors like BME680, Wind Speed and Direction and Rainfall sensors to collect real-time parameters like temperature, humidity, wind speed which is sent over to the cloud NodeMCU-ESP32 over Wi-fi and is also stored in a cloud storage platform (OneDrive). The data is then visualized and monitored on open-source platform called ThingsBoard. To enhance the project, we implemented Machine Learning Algorithms, Random Forest Regressor for temperature prediction and Random Forest Classifier for rain prediction. The models are trained on the historical data and also real-time data to increase accuracy of prediction. This predicted data is displayed the ThingsBoard dashboard for user accessibility. This cost-effective, scalable and efficient system focuses on weather monitoring and prediction to increase the accuracy and making it more valuable for applications like Air Quality Monitoring, Disaster Management and many more.
Introduction
The proposed system addresses limitations of traditional weather prediction methods—such as manual data collection and slow, error-prone analysis—by integrating Internet of Things (IoT) and Machine Learning (ML) to provide accurate, real-time weather monitoring and 5-hour forecasting.
2. System Features
Real-Time Weather Monitoring:
Uses IoT sensors (e.g., BME680, rainfall, wind sensors) connected to a NodeMCU ESP32 microcontroller.
Collects data like temperature, humidity, air pressure, AQI, rainfall, wind speed & direction.
Sends data to ThingsBoard cloud platform via MQTT protocol for visualization.
Also stores data in CSV format on OneDrive for ML training.
Weather Prediction Using ML:
Implements Random Forest Classifier (for rain prediction) and Random Forest Regressor (for temperature and humidity).
Trained using historical data (OpenWeather API) and real-time data (from OneDrive).
Predicts temperature, humidity, and rain 5 hours in advance.
Predictions are visualized on ThingsBoard dashboard alongside live data.
3. Methodology
System Architecture includes:
IoT-based weather data collection.
ML-based weather forecasting.
Cloud-based data visualization.
Workflow:
Sensors → ESP32 → Cloud (via MQTT) + OneDrive (CSV) → ML model → Prediction → Dashboard display.
4. Literature Review Highlights
Mohit Tiwari et al.: IoT + Cloud-based real-time weather system.
G.A. Girija C et al.: Emphasized accuracy and accessibility in localized forecasts.
Rahut et al.: Proposed a real-time alert system for extreme weather.
These studies laid the groundwork for combining IoT, cloud computing, and ML in weather forecasting, which this project builds upon.
5. System Components
Component
Model
Function
Microcontroller
NodeMCU-ESP32
Data collection and transmission
Sensors
BME680, Rainfall, Wind sensors
Measure weather parameters
Display
OLED/LCD
Local data visualization
Cloud Platform
ThingsBoard
Real-time monitoring and dashboard
6. Results
Temperature Forecast:
Shows fluctuations over 5 hours with notable peaks and drops.
Demonstrates system’s capability to capture short-term weather patterns.
Humidity Forecast:
Sharp initial rise followed by steady levels.
Reflects atmospheric stability post initial change.
Conclusion
The Integrated IoT-Based Weather Monitoring and Machine Learning Weather Prediction System successfully combines real-time data collection, cloud-based visualization, and AI-driven forecasting to enhance weather monitoring accuracy. The system fetches live weather data from OneDrive, processes it using machine learning models, and predicts temperature and humidity trends for the next five hours. These forecasts are then sent back to the ThingsBoard cloud platform, allowing seamless real-time monitoring and visualization. The results indicate that the proposed system provides reliable short- term weather predictions, which can be beneficial for climate monitoring, agricultural planning, and disaster preparedness. By leveraging IoT and cloud computing, the system ensures scalability and accessibility, making it adaptable to different environments.
References
[1] Ehigiator, E., & Sitti, M. (2024). An IoT-based weather monitoring system designed for cost- effective real-time data collection, storage, and predictive analysis. European Journal of Computer Science and Information Technology, 12(1),4356. https://doi.org/10.37745/ejcsit.2024.0122
[2] Huang, Z.-Q., Chen, Y.-C., and Wen, C.-Y. (2020) proposed a novel approach to real-time weather monitoring and prediction by integrating sensors and machine learning algorithms into city buses. Their study, published in Sensors (Volume 20, Issue 18, p. 5173), demonstrates how public transportation systems can be utilized for environmental data collection and urban weather forecasting.
[3] Mahala, A., Jayasingh, S. K., and Kabat, M. R. (2022) developed a weather monitoring and prediction system, with a specific focus on the Odisha region. Their research, included in Emerging Trends in Computer Science and Engineering (Chapter 40, pp. 509-523), highlights the use of advanced computational methods to improve weather forecasting in localized areas.
[4] Girija, C., Shires, A. G., Harshalatha, H., & Pushpalatha, H. P. (2018). A weather monitoring system based on the Internet of Things (IoT). International Journal of Engineering Research & Technology (IJERT), 6(13), 1-4.
[5] Rahut, Y., Afreen, R., & Kamini, D. (2023). A keen IoT-based framework for climate observing and real-time alarms. Worldwide Diary of Imaginative Investigate Considerations (IJCRT), 12(2), e876-e885. https://doi.org/10.5120/ijcrt2402571
[6] Tiwari, M., Narang, D., Goel, P., Gadhwal, A., Gupta, A., & Chawla, A. (2023). A climate observing framework utilizing IoT and cloud computing innovations. Worldwide Diary of Developments in Building and Science, 8(7), 23-26.