Topic: Electricity Monitoring and Coordination
Repo: https://github.com/G36maid/electricity_monitor
The slides are included in this repository as well as how the work was divided
Name | English Name | University | Major | Year |
---|---|---|---|---|
羅願群 | Jethro | NTNU | Computer Science | 1 |
鍾詠傑 | Jie Chung | NTNU | Mechatronic Engineering | 2 |
名嘉山 栞 | Shiori Nakayama | KU | ISI | 4 |
ローイ ベンジャミン | Benjamin Joshua Lowy | KU | ISI | 2 |
- Monitor power consumption and power generation:
- Use data from monitored power → map power consumption → Serve power during emergencies or during vulnerable, high usage times.
- Power usage on personal devices (app) ← connected to a smart meter.
- Use algorithms like max flow to visualize the electrical load in each city.
- Combine with weather data to predict how electricity use varies with weather and season.
This project includes a Linux-based electricity monitoring system using MQTT to send and receive data. It consists of two main components:
- Linux Client: Monitors power consumption and sends data to the server.
- Server: Receives data from clients and logs it into a CSV file.
- Python 3: Ensure Python 3 is installed.
- MQTT Broker: An MQTT broker must be running and accessible. (e.g.,
140.122.185.98
on port1883
) - Dependencies: Install the necessary Python library and tools:
paho-mqtt
powerstat
(for Linux clients)
-
Install Python Dependencies:
pip install paho-mqtt
-
Install
powerstat
:sudo apt-get install powerstat
-
Client Configuration:
- The client script will prompt for
Latitude
,Longitude
,Building ID
, andCategory
. - Make sure to modify the MQTT credentials and broker address as needed.
- The client script will prompt for
-
Install Python Dependencies:
pip install paho-mqtt
-
Server Configuration:
- The server script listens for incoming data and logs it into
data/electricity_consumption.csv
. - Ensure the server script connects to the correct MQTT broker and topic.
- The server script listens for incoming data and logs it into
- Open a terminal and navigate to the directory with the server script.
- Run the server script:
python server.py
- Open a terminal and navigate to the directory with the client script.
- Run the client script:
python linux_client.py
- Enter the required information when prompted.
- Make sure the MQTT broker is accessible and properly configured.
- Adjust the MQTT broker details and credentials in the scripts as needed.
- The
powerstat
tool is Linux-specific; alternative methods are needed for macOS or Windows.
This README.md
provides a clear overview of setting up and running your electricity monitoring system without including the actual code.
- Taiwan Power Open Data:
- Electricity consumption data.
- Electricity supply data.
- Additional Datasets:
- Jie Chung:
- Network and system administrator.
- Docker and Kubernetes deployment.
- C, C++, Rust (not strong in Python).
- Jethro:
- Data preprocessing, familiar with multiple programming languages.
- Shiori:
- Data science (visualization), Python.
- Project Focus:
- The group agreed to focus on electricity monitoring and coordination.
- The concept involves using power consumption and generation data to create visualizations that can aid in managing electricity, especially during emergencies or high usage times.
-
Data Strategy:
- The group decided to simulate fake data for the project.
- This data will be used for visualizing power consumption and generation on a smaller scale (e.g., a building or district) rather than an entire city, due to the complexity of generating realistic large-scale data.
-
Visualization Tools:
- Grafana and QGIS were discussed as potential tools for visualization.
- QGIS was favored, and the group will explore using it, particularly with data that includes geographic coordinates (longitude and latitude) and time series.
-
Technical Considerations:
- Data will need to include specific power units (GW, MW, kW, W) and possibly be aligned with weather data to predict usage patterns.
- The group acknowledged the challenge of managing large datasets, especially when simulating data for numerous buildings.
-
GitHub Repository Setup:
- A GitHub repository was set up for the project: https://github.com/G36maid/electricity_monitor.
- All group members shared their GitHub accounts and agreed to use Git for code management and collaboration.
- Data Preparation: The group will focus on generating or collecting suitable data, preparing it for use in visualizations, and ensuring it can be integrated into QGIS.
- Coding and Visualization: Python code will be written to prepare for the demo, and the group will work on integrating the data into QGIS for visualization.
- Collaboration: The team will continue using GitHub for collaboration and code management.
Time Remaining:
- Approximately 20 minutes were left for the immediate tasks at the time of this discussion.