example: add example script

Signed-off-by: YoungSoo Shin <shinys000114@gmail.com>
This commit is contained in:
2025-11-19 14:18:41 +09:00
parent 535bd9388e
commit e3d98ed3dd
2 changed files with 139 additions and 0 deletions

32
example/logger/README.md Normal file
View File

@@ -0,0 +1,32 @@
# Power Consumption Logger Example
Based on this script, you can monitor power consumption and implement graph plotting.
## How to Run the Script
### Install Python Virtual Environment
```shell
sudo apt install virtualenv
virtualenv venv
source venv/bin/activate
```
### Install require package
```shell
pip install grpcio-tools requests websockets protobuf
```
### Build `status_pb2.py`
```shell
python -m grpc_tools.protoc -I ../../proto --python_out=. status.proto
```
### Execute script
```shell
# python3 logger.py -u <username> -p <password> <address>
python3 logger.py -u admin -p password 192.168.30.5
```