Simulates the operation of UPS, calculates and loads current parameter values into it via Modbus
Intended for testing the monitoring system
In this work was used mock ups controller
-
Auto
Work in cycle:- q0 — The electrical network is connected, the battery is charged;
- q1 — The electrical network is turned off, the battery is discharging;
- q2 — The electrical network is turned off, the battery is discharged;
- q3 — The electrical network is connected, the battery is charging.
-
Manual
Manually changing parameters via rest api
Swagger documentation
-
Prepare config
example:ups_addr = "127.0.0.1:1502" rest_api_bind_addr = ":8080" ups_sync_interval = 30 # sec cycle_change_timeout = 3600 # sec default_input_ac_voltage = 220 # V max_bat_group_voltage = 54 # V min_bat_group_voltage = 42 # V load_power = 1000 # W default_bat_capacity = 50 # Ah charge_current_limit = 20 # A low_soc_trigger_alarm = 0.1 # from 0 to 1, 1: 100%
-
Build
make
-
Run
./bin/ups-imitator
make test
- Launch mock ups controller;
- Launch ups-imitator (pre-specify the mock-ups address in the config);
- Launch ups-agent to read data from the UPS.