## Energy Management

Energy management can be used, for example, to optimize the self-consumption of solar energy or to shed loads when consumption is high (grid support).

As the *Input value*, one of the measured active power values in the device is typically selected.
Separate values for generation and consumption are also available.
However, an electricity price or any value received via a communication object can also be used as the trigger. For an external communication object, its data type is selected; this determines the configurable threshold.

The selected *Input value* is monitored, and the trigger condition is checked against the specified *Threshold value*.
If the *Input value* reaches the threshold and the trigger condition is met, up to 6 stages can be switched on.
Which stage or stages are switched depends on active locks, dead time, remaining daily enable operations and the priority of the stages.
As soon as the trigger condition is no longer met, the stages are switched off again in reverse order, taking the minimum runtime into account.

After one or more stages have been switched on or off, the next switching action is delayed by the *Delay between switching stages*.
Switching off by activating a lock is excluded from this.

Up to 4 telegrams can be triggered per stage for activation and deactivation.
For each telegram, it can be specified separately whether a value is sent on activation and/or deactivation.

The communication objects for the delay between stages, remaining runtime, remaining enable operations, dead time and operating hours can send on change.
This makes the energy-management states available for visualization or further processing.

Practical example:
A PV system is intended to use surplus power within the building. The measured active power at the grid connection point is used as the *Input value*.
If surplus is represented as negative active power, the trigger condition can be set to *Trigger on falling below* with a threshold of -2000 W.
This single threshold applies to all stages.

Stage 1 switches a 1500 W immersion heater, and stage 2 enables charging for an electric vehicle with 4200 W.
If there is currently 3000 W surplus available, about -3000 W is measured at the grid connection point and stage 1 is activated first.
The immersion heater then consumes 1500 W of this surplus.
Therefore, immediately after switching on, the measured *Input value* changes from about -3000 W to about -1500 W.
The trigger condition is therefore no longer met, so stage 2 is not switched on.

If, however, 7000 W surplus is available, about -7000 W is initially measured at the grid connection point.
After switching on the immersion heater, about -5500 W remains. The trigger condition therefore remains met.
After the *Delay between switching stages* has elapsed, stage 2 can also be activated.
If the surplus decreases again later, the active stages are switched off again in reverse order after their minimum runtime has elapsed.
