Smart Energy Management System
This project is a web application designed to manage and monitor smart devices (like plugs), track their energy consumption, and automate device control using machine learning analysis. The system uses a Flask backend in Python, SQLite as the database, and an Angular frontend for user interaction.
Inspiration
The inspiration for this project came from the need to efficiently manage and monitor the energy consumption of multiple smart devices. By using a simple machine learning model, we aim to automate the process of turning off devices when they are idle, saving energy and reducing waste.
What it does
The Smart Energy Management System provides the following features:
Device Management: Users can view and control the status of connected smart devices. Each device’s status (on/off) and power consumption are displayed.
Device History: Users can view the historical power consumption data for each device. This allows users to track energy usage over time.
Energy Consumption Analysis: The system uses a machine learning model (Linear Regression) to analyze power consumption data. Based on this analysis, the system can automatically turn off devices identified as idle (based on a predefined threshold).
How we built it
Backend (Flask):
- We used Flask as the backend to handle all API requests. The backend is responsible for managing devices, handling power consumption data, and serving the analysis results.
- SQLite is used to store device data (including device names, statuses, and power consumption) and the history of power usage.
- The machine learning model (using scikit-learn's Linear Regression) predicts when a device is idle based on its historical power consumption.
Frontend (Angular):
- The frontend was built using Angular to create a dynamic, responsive user interface.
- Tailwind CSS was used to style the components for a modern look.
- The frontend interacts with the backend via HTTP requests, displaying device information, device status toggles, and power consumption data.
Challenges we ran into
Data Management:
- Handling real-time power consumption data for multiple devices and storing it efficiently was a challenge. We had to ensure that the database structure could handle updates to power consumption and history logs in an efficient manner.
Machine Learning Integration:
- The integration of the machine learning model with the existing system posed challenges, particularly in terms of data preprocessing and making predictions based on historical data.
- Fine-tuning the model to correctly identify idle devices based on their power consumption history required several iterations.
Frontend-Backend Communication:
- Ensuring that the frontend and backend were properly synchronized, especially with the complex data structures involved in managing device history and power consumption, took some time to debug and refine.
Accomplishments that we're proud of
Machine Learning Integration: We successfully integrated a machine learning model into the system to predict and automate the control of devices based on their power consumption.
Real-time Device Control: Users can toggle devices' status and view their real-time power consumption, giving them control over energy usage.
Historical Data Tracking: The system tracks the power consumption history for each device, providing users with valuable insights into their energy usage over time.
Smooth Frontend-Backend Integration: The frontend and backend were successfully integrated to provide a seamless user experience with dynamic updates.
What we learned
Machine Learning for Energy Management: We learned how to apply machine learning techniques (such as linear regression) to predict idle states based on historical data, which is useful for energy management.
Full-Stack Development: We gained valuable experience in full-stack development, from building a Flask API and handling data management with SQLite, to creating an Angular frontend that communicates with the backend.
Efficient Data Handling: We learned best practices for managing and storing device-related data efficiently, ensuring that power consumption history is accurately logged and retrieved for analysis.
What's next for Smart Energy Management System
Advanced Machine Learning Models: We plan to experiment with more advanced machine learning models to improve the accuracy of device activity predictions and optimize energy savings.
Real-time Energy Monitoring: Implement real-time energy monitoring and data visualization features, such as charts and graphs to display energy usage trends.
User Authentication: Implement user authentication to allow multiple users to manage and monitor devices securely.
Integration with IoT Devices: Explore the integration of actual smart devices using APIs, enabling users to directly control their IoT devices from the web app.
Log in or sign up for Devpost to join the conversation.