This document describes the power consumption control feature for the Energy Management System (EMS).
The power consumption control feature allows the EMS to manage controllable loads (such as cryptocurrency miners, EV chargers, heat pumps, etc.) based on available PV (photovoltaic) power and configurable power limits. This ensures that the total power consumed by all controllable loads does not exceed the available solar power or a configured maximum power limit.
The following configuration options have been added to control power consumption:
miners_power_limit(float64, kW): Maximum total power limit for all controllable loads. Default:30.0kW- This is the absolute maximum power that all controllable loads combined can consume
- Even if more PV power is available, loads will not exceed this limit
Each controllable load (miner, EV charger, etc.) consumes different amounts of power depending on its operational mode:
miner_power_standby(float64, kW): Power consumption in standby mode. Default:0.05kW (50 W)miner_power_eco(float64, kW): Power consumption in eco mode. Default:0.8kW (800 W)miner_power_standard(float64, kW): Power consumption in standard mode. Default:1.6kW (1600 W)miner_power_super(float64, kW): Power consumption in super mode. Default:1.8kW (1800 W)
These values should be adjusted based on your specific device hardware specifications.
pv_power_control_price_limit(float64, EUR/MWh): Price threshold for PV power-based control. Default:99999.0- The EMS activates PV power control when the market price is at or above this threshold
- Set to a high value (e.g.
99999.0) to keep PV power control off in practice
When pv_power_control_price_limit is set to a positive value and the market price meets or exceeds the threshold, the EMS implements the following logic:
-
Effective Power Limit Calculation
- The effective limit is the minimum of:
- Available PV power (read from the plant Modbus interface)
- Configured
miners_power_limit
- Formula:
effectiveLimit = min(availablePVPower, minersPowerLimit)
- The effective limit is the minimum of:
-
Total Power Monitoring
- The EMS continuously calculates the total power consumption of all controllable loads
- Power consumption is based on each device's current state (standby/active) and work mode (eco/standard/super)
-
Power Limit Enforcement
- If total power consumption exceeds the effective limit, the EMS will:
- Identify the highest power-consuming devices
- Progressively decrease their work modes: Super → Standard → Eco → Standby
- Continue until total power is within the effective limit
- If total power consumption exceeds the effective limit, the EMS will:
The power control system works alongside existing features:
- Price-based control still operates when power limits allow
- When activating a load due to low electricity prices, the EMS first checks if there's sufficient power budget
- If activation would exceed power limits, the device remains in standby
- The existing temperature/fan speed-based work mode adjustment continues to operate
- Before increasing a device's work mode based on low temperature, the EMS checks power limits
- Work mode increases are blocked if they would exceed available power
This function now:
- Checks if PV power control is enabled
- Reads current available PV power
- Calculates total power consumption
- If exceeding limits, calls
adjustMinersForPowerLimit()to reduce consumption - When price allows activating loads, verifies power budget is available
- Proceeds with standard price-based control if power allows
This function now:
- First checks power limits before any adjustments
- If exceeding limits, reduces device operating modes to comply
- Before increasing device modes based on temperature/fan speed, verifies power budget
- Continues with temperature-based adjustments if power allows
getMinerPowerConsumption(state, workMode): Returns power consumption in kW for a given device state and modecalculateTotalPowerConsumption(minersList): Calculates total power consumption of all controllable loads in kWadjustMinersForPowerLimit(minersList, powerLimit): Adjusts device modes to stay within power limit (power limit in kW)GetPlantRunningInfo(): Retrieves complete plant running information from the plant Modbus interface, including PV power, battery SOC, grid power, ESS power, etc.
{
"pv_power_control_price_limit": 80.0,
"miners_power_limit": 30.0,
"miner_power_standby": 0.05,
"miner_power_eco": 0.8,
"miner_power_standard": 1.6,
"miner_power_super": 1.8,
"plant_modbus_address": "192.168.1.100:502"
}- Available PV power: 4.0 kW
- Loads power limit: 30.0 kW
- Effective limit: 4.0 kW (minimum of the two)
- Two devices in Standard mode (1.6 kW each) = 3.2 kW total
- Result: Both devices can operate at Standard mode
- Available PV power: 10.0 kW
- Loads power limit: 5.0 kW
- Effective limit: 5.0 kW
- Three devices in Standard mode (1.6 kW each) = 4.8 kW total
- Result: All devices can operate at Standard mode within the limit
- Available PV power: 2.0 kW
- Current: Two devices in Eco mode (0.8 kW each) = 1.6 kW total
- Price drops below limit → EMS wants to activate a third device
- Adding another device in Eco would require 2.4 kW
- Result: Third device remains in standby due to insufficient power
The EMS logs provide detailed information about power control decisions:
PV Power Control: Available PV power: 8.00 kW, Miners power limit: 30.00 kW
Current total power consumption: 6.00 kW, Effective limit: 8.00 kW
Power consumption exceeds limit, adjusting miners...
Power limit: setting miner 192.168.1.10:4028 to Eco mode
Power consumption now within limit: 5.50 kW <= 8.00 kW
- Set Accurate Power Values: Measure or obtain from manufacturer specifications the actual power consumption of your miners in each mode
- Configure Appropriate Limits: Set
miners_power_limitbased on your electrical installation capacity - Monitor PV Power: Ensure
plant_modbus_addressis correctly configured for accurate PV power readings - Test in Dry-Run Mode: Use
dry_run: trueto verify behavior before enabling actual control - Consider Safety Margin: Set power limits slightly below maximum capacity to provide safety margin
To disable power control and revert to price-only based control:
{
"pv_power_control_price_limit": 0
}The EMS will then only use price-based control without considering power consumption limits.