Skip to content

Run this to clear the data folder

sudo ./clear_data_folders.sh

run this to peakshaving test

python3 ems_main.py --debug --once

to run the peaking shaving

1) Confirm EMS is actually running PEAK_SHAVING mode

In emsConfig/ems/ems_control_setting.json make sure:

"ems_operation_mode": "PEAK_SHAVING"

and inside functions:

"Peak_Shaving": { "enabled": true, ... }

If either is wrong, peak shaving won’t run.

5) How to check Valley Filling is working (your normal debug method)

Set mode:

emsConfig/ems/ems_control_setting.json

"ems_operation_mode": "VALLEY_FILLING"

Enable + set thresholds:

functions.Valley_Filling.enabled = true

valley_threshold_kw = 15 (example)

set windows enabled for current time OR disable window gating by setting all windows enabled:false

Run once in debug:

python3 ems_main.py --debug --once

frequency meter modbus config

{ "ip": "127.0.0.1", "port": 1515, "unit_id": 1, "poll_interval_ms": 1000, "save_interval_ms": 10000, "log_level": "INFO" "frequency_address": 21000, "data_type": "FLOAT32", "endianness": "big", "polling_interval_ms": 10 }

here polling interval ms is for frequncy meter control

pole interval is for the frequncy meter logging