Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion docs/devices/plugins.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -616,13 +616,17 @@ mul:
...
```

Als Operanden werden dabei die Grundrechenarten Addition (`add`) und Multiplikation (`mul`) unterstützt.
Als Operanden werden dabei die Grundrechenarten Addition (`add`), Multiplikation (`mul`) unterstützt, Division (`div`), Vorzeichenumkehr (`sign`), Absolutwert (`abs`), Minimalwert (`min`) und Maximalwert (`max`) unterstützt.

Mit `scale: -1` bei einem der Werte kann eine einfache Subtraktion durchgeführt werden, mit `scale: 0.001` eine Division z. B. zur Konvertierung von kWh in Wh.

Mit `sign:` (jede positive Zahl wird zu +1, jede negative Zahl wird zu -1, 0 bleibt 0) können (in Verbindung mit `mul`) Vorzeichen auf andere Werte übertragen werden.
Z. B. um bei Zählern die „Richtung“ der Leistung (Einspeisung oder Bezug) auf die gemessenen Ströme zu übertragen.

Mit `abs:` wird der Absolutwert einer Zahl berechnet.

Mit `min:` und `max:` wird der Minimalwert bzw. der Maximalwert berechnet.

Das `calc` Plugin ist hilfreich um z. B.

- Leistungswerte von einzelnen PV-Strings zu summieren (addieren)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -616,13 +616,17 @@ mul:
...
```

The basic arithmetic operations addition (`add`) and multiplication (`mul`) are supported as operands.
The basic arithmetic operations addition (add), multiplication (mul), division (div), sign inversion (sign), absolute value (abs), minimum value (min) and maximum value (max) are supported as operands.

With `scale: -1` on one of the values, simple subtraction can be performed, with `scale: 0.001` division, e.g. for converting kWh to Wh.

With `sign:` (every positive number becomes +1, every negative number becomes -1, 0 remains 0), signs can be transferred to other values (in conjunction with `mul`).
E.g. to transfer the "direction" of power (feed-in or consumption) to the measured currents for meters.

With `abs:`, the absolute value of a number is calculated.

With `min:` and `max:` the minimum value respectively the maximum value will be calculated.

The `calc` plugin is helpful for e.g.

- Summing power values from individual PV strings (addition)
Expand Down