example: add support plot

Signed-off-by: YoungSoo Shin <shinys000114@gmail.com>
This commit is contained in:
2025-11-19 16:26:26 +09:00
parent 4e6db88f7e
commit 4bd060ff22
3 changed files with 108 additions and 4 deletions

View File

@@ -15,7 +15,7 @@ source venv/bin/activate
### Install require package
```shell
pip install grpcio-tools requests websockets protobuf
pip install grpcio-tools requests websockets protobuf pandas matplotlib
```
### Build `status_pb2.py`
@@ -26,7 +26,16 @@ python -m grpc_tools.protoc -I ../../proto --python_out=. status.proto
### Execute script
#### Power consumption collection
```shell
# python3 logger.py -u <username> -p <password> <address>
python3 logger.py -u admin -p password 192.168.30.5
```
# python3 logger.py -u <username> -o <name.csv> -p <password> <address>
python3 logger.py -u admin -p password -o test.csv 192.168.30.5
```
#### Plot data
```shell
python3 csv_2_plot.py test.csv plot.png
```
![plot.png](plot.png)