UrbanGlow is an intelligent, AI-powered streetlight management system designed to improve urban lighting efficiency, optimize energy consumption, and support smarter streetlight operation by combining environmental data, traffic patterns, weather conditions, and machine learning. Conventional streetlight systems often operate at fixed brightness levels, regardless of changes in traffic, ambient light, or weather conditions. This can lead to unnecessary energy consumption, inefficient lighting, and limited visibility into streetlight performance. UrbanGlow addresses these challenges through an integrated approach that uses data-driven predictions to support adaptive lighting decisions and energy-efficient management. The system incorporates five major modules: Traffic Prediction, Brightness Optimization, Weather-Aware Lighting, Energy Consumption Forecasting, and Monitoring and Dashboard. The Traffic Prediction module analyzes historical traffic patterns and time-related information to estimate traffic levels. The Brightness Optimization module determines suitable lighting levels using factors such as ambient light intensity, traffic density, and time of day. The Weather-Aware Lighting module considers weather conditions when recommending lighting adjustments, while the Energy Consumption Forecasting module estimates energy usage based on brightness levels, operating hours, and traffic patterns. These modules are integrated through a Python-based backend that loads trained machine learning models and processes input data, while a React-based web dashboard presents current conditions, predicted traffic, recommended brightness levels, energy forecasts, and system status in an accessible interface. The IoT-oriented architecture supports the integration of environmental sensors, traffic detection devices, and connected controllers for streetlight monitoring and control. By combining predictive analytics with centralized monitoring, UrbanGlow aims to help improve lighting decisions, reduce avoidable energy consumption, support maintenance planning, and provide a scalable foundation for intelligent streetlight management in smart cities.
Introduction
The UrbanGlow – Smart Street Lighting System is an intelligent streetlight management system designed to improve energy efficiency, road safety, and lighting control through IoT and machine-learning technology. Traditional streetlight systems mainly use fixed timers or constant brightness levels, which cannot automatically adjust to changes in environmental conditions, traffic movement, or weather. This can lead to unnecessary electricity consumption and inefficient lighting management.
The proposed UrbanGlow system uses an ESP32 microcontroller, an LDR sensor, and a PIR motion sensor to monitor environmental light conditions and detect movement. The LDR sensor identifies day and night conditions, while the PIR sensor detects pedestrians or vehicles. During daytime, the streetlight remains switched off. At night, the system maintains a lower brightness level when no movement is detected and increases brightness when movement occurs.
The system also integrates a machine-learning-based brightness prediction service that recommends suitable brightness levels based on ambient light (LDR), traffic conditions, weather, and time. The backend is developed using Python Flask, while the frontend uses React, TypeScript, and Vite to provide a web-based dashboard. The dashboard displays lighting conditions, brightness recommendations, energy insights, and traffic, weather, and energy charts.
The main aim of UrbanGlow is to combine sensor-based automatic lighting control, machine-learning predictions, and centralized monitoring into a single framework. It also includes a local control mechanism so that the ESP32 can continue operating using predefined rules if the network or prediction service becomes unavailable.
Main Objectives
To develop an intelligent streetlight system using IoT sensors and an ESP32 controller.
To automatically control streetlights based on ambient light conditions.
To detect pedestrian and vehicle movement using a PIR sensor.
To adjust streetlight brightness according to traffic, weather, ambient light, and time.
To integrate a machine-learning model for brightness recommendations.
To develop a web-based dashboard for monitoring lighting conditions and brightness levels.
To improve energy efficiency while maintaining suitable road illumination.
Existing System
Traditional streetlight systems generally operate using fixed timers, manual switching, or constant brightness. These systems cannot respond effectively to real-time changes in daylight, traffic movement, or weather conditions. They also lack centralized monitoring and intelligent brightness optimization. As a result, electricity may be wasted when full lighting is unnecessary, and maintenance and monitoring can become difficult.
Proposed System
The proposed UrbanGlow system combines IoT-based sensing, automatic lighting control, machine-learning recommendations, and web-based monitoring.
The LDR sensor detects ambient light and determines whether it is daytime or nighttime. The PIR sensor detects movement and helps control brightness according to activity. The ESP32 acts as the main controller, while the machine-learning model recommends brightness levels based on environmental and traffic information.
The web dashboard allows operators to monitor lighting conditions, view brightness recommendations, and analyze traffic, weather, and energy-related information.
Methodology and Implementation
The system consists of the following major stages:
Field Sensing: The LDR sensor measures ambient light, and the PIR sensor detects movement near the streetlight.
Day/Night Detection: The ESP32 uses LDR readings and a predefined threshold to switch the streetlight between daytime and nighttime modes.
Motion-Based Brightness Control: At night, the system maintains lower brightness when no movement is detected and increases brightness when movement occurs.
Data Processing: Environmental and traffic information is prepared as input for the brightness prediction service.
Machine-Learning Prediction: The Flask backend processes LDR, traffic, weather, and time values to generate a recommended brightness level.
Web Dashboard: The React and TypeScript frontend displays lighting conditions, brightness recommendations, and analytical charts.
Local Fallback Control: The ESP32 uses predefined local control rules when network connectivity or the prediction service is unavailable.
Technology and Hardware Components
Component
Purpose
ESP32
Main microcontroller and local control
LDR Sensor
Detects ambient light intensity
PIR Sensor
Detects human or vehicle movement
LED Streetlight
Provides adjustable illumination
Python Flask
Backend and prediction API
Machine Learning
Recommends suitable brightness levels
React
Frontend development
TypeScript
Frontend programming
Vite
Development and build tool
Web Dashboard
Monitoring and visualization
Conclusion
UrbanGlow presents a prototype framework for adaptive street lighting that combines a sensor-based control concept, a machine-learning-assisted brightness API, and a web dashboard. The supplied source code demonstrates a React/TypeScript interface, a Flask prediction service, weather encoding, brightness recommendations, and visualization components. The project presentation also describes an ESP32, LDR, and PIR-based design, along with planned traffic forecasting, energy prediction, and fault monitoring.
However, physical sensor integration, persistent telemetry storage, validated traffic forecasting, model-based energy prediction, and fault monitoring are not confirmed by the supplied code. Therefore, no numerical claims are made about energy savings or model accuracy. UrbanGlow provides a foundation for a smart-lighting demonstrator, while hardware testing, model evaluation, and reliable data collection are needed to establish its performance.
References
[1] M. Mahoor, Z. S. Hosseini, A. Khodaei, A. Paaso, and D. Kushner, \"State-of-the-art in smart streetlight systems: a review,\" IET Smart Cities, vol. 2, no. 1, pp. 24–33, 2020, doi: 10.1049/iet-smc.2019.0029.
[2] A. Omar, S. AlMaeeni, H. Attia, M. Takruri, A. Altunaiji, M. Sanduleanu, R. Shubair, M. S. Ashhab, M. Al Ali, and G. Al Hebsi, \"Smart City: Recent Advances in Intelligent Street Lighting Systems Based on IoT,\" Journal of Sensors, vol. 2022, Article ID 5249187, 2022, doi: 10.1155/2022/5249187.
[3] F. Agramelal, M. Sadik, Y. Moubarak, and S. Abouzahir, \"Smart Street Light Control: A Review on Methods, Innovations, and Extended Applications,\" Energies, vol. 16, no. 21, Article 7415, 2023, doi: 10.3390/en16217415.
[4] K. H. Bachanek, B. Tundys, T. Wi?niewski, E. Puzio, and A. Maroušková, \"Intelligent street lighting in a smart city concepts—a direction to energy saving in cities: an overview and case study,\" Energies, vol. 14, no. 11, Article 3018, 2021, doi: 10.3390/en14113018.
[5] P. Elejoste, I. Angulo, A. Perallos, A. Chertudi, I. I. Zuazola, A. Moreno, L. Azpilicueta, J. J. Astrain, F. Falcone, and J. Villadangos, \"An easy to deploy street light control system based on wireless communication and LED technology,\" Sensors, vol. 13, no. 5, pp. 6492–6523, 2013, doi: 10.3390/s130506492.
[6] IEEE, \"IoT Based Street Light Controller and Monitoring System,\" in Proc. 2021 IEEE 8th International Conference on Adaptive Science and Technology (ICAST), 2021, doi: 10.1109/ICAST52759.2021.9682127.
[7] Espressif Systems, \"ESP32 Series Datasheet,\" Espressif Systems, ESP32 Series Datasheet, Accessed: Oct. 20, 2026.
[8] Arduino, \"Arduino Documentation,\" Arduino Documentation, Accessed: Oct. 20, 2026.
[9] Pallets Projects, \"Flask Documentation,\" Flask Documentation, Accessed: Oct. 20, 2026.
[10] scikit-learn developers, \"Model persistence,\" scikit-learn User Guide, scikit-learn Model Persistence, Accessed: Oct. 20, 2026.