Skip to content

Commit abbfbae

Browse files
GerdZankernaltatis
andauthored
Fix plugin links formatting in plugins.mdx (#1074)
Co-authored-by: Michael Geers <michael@geers.tv>
1 parent 6ab4a10 commit abbfbae

2 files changed

Lines changed: 88 additions & 0 deletions

File tree

src/content/docs/de/reference/plugins.mdx

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,8 @@ Zusätzlich können sämtliche Funktionen der Go Template Library verwendet werd
108108

109109
## Plugins
110110

111+
<a id="gpio"></a>
112+
111113
### GPIO <Badge text="lesen" variant="tip" size="small" /> <Badge text="schreiben" variant="caution" size="small" />
112114

113115
Das `gpio` Plugin ermöglicht den direkten Zugriff auf GPIO-Pins (General Purpose Input/Output) unter Linux.
@@ -148,6 +150,8 @@ pin: 27 # BCM pin number
148150
Dieses Plugin funktioniert nur auf Linux-Systemen mit Zugriff auf `/dev/gpiomem`.
149151
:::
150152

153+
<a id="go"></a>
154+
151155
### Go <Badge text="lesen" variant="tip" size="small" /> <Badge text="schreiben" variant="caution" size="small" />
152156

153157
Das `go` Plugin verwendet den [Yaegi](https://github.com/traefik/yaegi) Interpreter, um Go Code zur Laufzeit auszuführen.
@@ -263,6 +267,8 @@ maxcurrent:
263267
topic: heater/target_power
264268
```
265269

270+
<a id="http"></a>
271+
266272
### HTTP <Badge text="lesen" variant="tip" size="small" /> <Badge text="schreiben" variant="caution" size="small" />
267273

268274
Das `http`-Plugin führt HTTP Aufrufe durch, um Daten zu lesen oder zu aktualisieren.
@@ -364,6 +370,8 @@ enable:
364370
uri: "http://charger/relay/0?turn={{if .enable}}on{{else}}off{{end}}"
365371
```
366372

373+
<a id="javascript"></a>
374+
367375
### JavaScript <Badge text="lesen" variant="tip" size="small" /> <Badge text="schreiben" variant="caution" size="small" />
368376

369377
evcc integriert einen JavaScript Interpreter mit der [Underscore.js](https://underscorejs.org) Bibliothek, welche direkt über `_.` zugreifbar ist, z. B. `_.random(0,5)`.
@@ -391,6 +399,8 @@ maxcurrent:
391399

392400
Das `js` Plugin unterstützt dieselben [Input- und Output-Transformationen](#transformations) (`in`/`out`) wie das `go` Plugin.
393401

402+
<a id="modbus"></a>
403+
394404
### Modbus <Badge text="lesen" variant="tip" size="small" /> <Badge text="schreiben" variant="caution" size="small" />
395405

396406
Das `modbus`-Plugin kann Daten von jedem Modbus-fähigen Gerät oder SunSpec-kompatiblen Wechselrichter lesen.
@@ -411,6 +421,8 @@ register:
411421

412422
Schaue in die [Modbus Dokumentation](/de/reference/modbus) für weitere Details.
413423

424+
<a id="mqtt"></a>
425+
414426
### MQTT <Badge text="lesen" variant="tip" size="small" /> <Badge text="schreiben" variant="caution" size="small" />
415427

416428
Das `mqtt`-Plugin ermöglicht das Lesen von Werten über MQTT-Topics.
@@ -458,6 +470,8 @@ topic: mbmd/charger/maxcurrent
458470
payload: ${var:%d}
459471
```
460472

473+
<a id="prometheus"></a>
474+
461475
### Prometheus <Badge text="lesen" variant="tip" size="small" />
462476

463477
Das `prometheus` Plugin liest Metriken aus einer Prometheus-Instanz über PromQL-Abfragen.
@@ -542,6 +556,8 @@ Unterstützte Werte für `value` können in der Diagnoseausgabe über das Komman
542556

543557
Alle möglichen Werte können als Konstanten [hier](https://gitlab.com/bboehmke/sunny/-/blob/master/values.go#L24) gefunden werden (verwende den Namen der Konstante für `value`).
544558

559+
<a id="websocket"></a>
560+
545561
### Websocket <Badge text="lesen" variant="tip" size="small" />
546562

547563
Das `websocket`-Plugin bietet einen WebSocket-Listener.
@@ -562,6 +578,8 @@ timeout: 30s # error if no update received in 30 seconds
562578

563579
## Helpers
564580

581+
<a id="calc"></a>
582+
565583
### Calc <Badge text="lesen" variant="tip" size="small" />
566584

567585
Das `calc` Plugin erlaubt es mehrere Einzelwerte mathematisch weiterzuverarbeiten:
@@ -612,6 +630,8 @@ Das `calc` Plugin ist hilfreich um z. B.
612630
Konstante Hilfswerte (z. B. für Offsets) lassen sich mithilfe des `const` Plugins als Operand erzeugen.
613631
:::
614632

633+
<a id="combined"></a>
634+
615635
### Combined <Badge text="lesen" variant="tip" size="small" />
616636

617637
Das `combined` Status Plugin wird verwendet um gemischte Boolean Status Werte von `Plugged` (angeschlossen) / `Charging` (Laden) in einen evcc-kompatiblen Ladestatus von A..F zu konvertieren.
@@ -629,6 +649,8 @@ charging:
629649
topic: openWB/lp/1/boolChargeStat
630650
```
631651

652+
<a id="const"></a>
653+
632654
### Const <Badge text="lesen" variant="tip" size="small" />
633655

634656
Das `const` Plugin gibt einen konstanten Wert zurück.
@@ -641,6 +663,8 @@ source: const
641663
value: -16247
642664
```
643665

666+
<a id="error"></a>
667+
644668
### Error <Badge text="lesen" variant="tip" size="small" />
645669

646670
Das `error` Plugin gibt immer einen [bekannten Fehlerwert](#known-errors) zurück.
@@ -660,6 +684,8 @@ soc:
660684
error: ErrNotAvailable
661685
```
662686

687+
<a id="convert"></a>
688+
663689
### Convert <Badge text="schreiben" variant="caution" size="small" />
664690

665691
Das `convert` Plugin konvertiert Datentypen beim Schreiben.
@@ -699,6 +725,8 @@ limitsoc:
699725

700726
In diesem Beispiel konvertiert evcc einen Float-Wert wie `85.5` in `85` bevor er an das Modbus-Register geschrieben wird.
701727

728+
<a id="delta"></a>
729+
702730
### Delta <Badge text="schreiben" variant="caution" size="small" />
703731

704732
Das `delta` Plugin wandelt absolute Werte in Änderungswerte (Deltas) um.
@@ -783,6 +811,8 @@ setmaxpower:
783811
decode: uint16
784812
```
785813

814+
<a id="ignore"></a>
815+
786816
### Ignore <Badge text="schreiben" variant="caution" size="small" />
787817

788818
Das `ignore` Plugin unterdrückt spezifische Fehlermeldungen beim Schreiben.
@@ -829,6 +859,8 @@ batterymode:
829859

830860
In diesem Beispiel gibt das Gerät einen harmlosen Modbus-Fehler zurück, der ignoriert wird.
831861

862+
<a id="ifelse"></a>
863+
832864
### IfElse <Badge text="schreiben" variant="caution" size="small" />
833865

834866
Das `ifelse` Plugin führt bedingte Schreibvorgänge mit zwei Zweigen aus.
@@ -863,6 +895,8 @@ enable:
863895
method: POST
864896
```
865897

898+
<a id="map"></a>
899+
866900
### Map <Badge text="lesen" variant="tip" size="small" /> <Badge text="schreiben" variant="caution" size="small" />
867901

868902
Das `map` Plugin übersetzt Integer-Werte in andere Integer-Werte mithilfe einer Lookup-Tabelle.
@@ -974,6 +1008,8 @@ meters:
9741008

9751009
In diesem Beispiel wird ein Shelly 1PM Gerät als Datenquelle für Leistung und Energie einer Batterie verwendet, während der Ladestand (SoC) über MQTT abgerufen wird.
9761010

1011+
<a id="sequence"></a>
1012+
9771013
### Sequence <Badge text="schreiben" variant="caution" size="small" />
9781014

9791015
Das `sequence` Plugin führt mehrere Schreibvorgänge nacheinander aus.
@@ -1065,6 +1101,8 @@ batterymode:
10651101

10661102
Der Wert fließt durch alle Plugins, wobei `switch` unterschiedliche Aktionen basierend auf dem Wert ausführt und `mqtt` am Ende immer benachrichtigt wird.
10671103

1104+
<a id="sleep"></a>
1105+
10681106
### Sleep <Badge text="schreiben" variant="caution" size="small" />
10691107

10701108
Das `sleep` Plugin fügt eine Verzögerung ein.
@@ -1092,6 +1130,8 @@ setmode:
10921130
method: POST
10931131
```
10941132

1133+
<a id="switch"></a>
1134+
10951135
### Switch <Badge text="schreiben" variant="caution" size="small" />
10961136

10971137
Das `switch` Plugin führt bedingte Schreibvorgänge durch, ähnlich einer switch/case-Anweisung in Programmiersprachen.
@@ -1136,6 +1176,8 @@ setmode:
11361176
body: "boost"
11371177
```
11381178

1179+
<a id="valid"></a>
1180+
11391181
### Valid <Badge text="lesen" variant="tip" size="small" />
11401182

11411183
Das `valid` Plugin ermöglicht es, Plugin-Werte basierend auf einer booleschen Validierung bereitzustellen.
@@ -1159,6 +1201,8 @@ value:
11591201
In diesem Beispiel wird der Wert nur verwendet, wenn das `valid` Topic `true` zurückgibt.
11601202
Wenn es `false` zurückgibt, wird der Wert als nicht verfügbar markiert.
11611203

1204+
<a id="watchdog"></a>
1205+
11621206
### Watchdog <Badge text="schreiben" variant="caution" size="small" />
11631207

11641208
Das `watchdog` Plugin ist ein Wrapper-Plugin, das Schreibvorgänge automatisch in regelmäßigen Abständen wiederholt.

src/content/docs/en/reference/plugins.mdx

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,8 @@ Additionally, all functions of the Go Template Library can be used to perform mo
108108

109109
## Plugins
110110

111+
<a id="gpio"></a>
112+
111113
### GPIO <Badge text="read" variant="tip" size="small" /> <Badge text="write" variant="caution" size="small" />
112114

113115
The `gpio` plugin enables direct access to GPIO pins (General Purpose Input/Output) on Linux systems.
@@ -148,6 +150,8 @@ pin: 27 # BCM pin number
148150
This plugin only works on Linux systems with access to `/dev/gpiomem`.
149151
:::
150152

153+
<a id="go"></a>
154+
151155
### Go <Badge text="read" variant="tip" size="small" /> <Badge text="write" variant="caution" size="small" />
152156

153157
The `go` plugin uses the [Yaegi](https://github.com/traefik/yaegi) interpreter to execute Go code at runtime.
@@ -263,6 +267,8 @@ maxcurrent:
263267
topic: heater/target_power
264268
```
265269

270+
<a id="http"></a>
271+
266272
### HTTP <Badge text="read" variant="tip" size="small" /> <Badge text="write" variant="caution" size="small" />
267273

268274
The `http` plugin performs HTTP calls to read or update data.
@@ -364,6 +370,8 @@ enable:
364370
uri: "http://charger/relay/0?turn={{if .enable}}on{{else}}off{{end}}"
365371
```
366372

373+
<a id="javascript"></a>
374+
367375
### JavaScript <Badge text="read" variant="tip" size="small" /> <Badge text="write" variant="caution" size="small" />
368376

369377
evcc integrates a JavaScript interpreter with the [Underscore.js](https://underscorejs.org) library, which is directly accessible via `_.`, e.g. `_.random(0,5)`.
@@ -391,6 +399,8 @@ maxcurrent:
391399

392400
The `js` plugin supports the same [input and output transformations](#transformations) (`in`/`out`) as the `go` plugin.
393401

402+
<a id="modbus"></a>
403+
394404
### Modbus <Badge text="read" variant="tip" size="small" /> <Badge text="write" variant="caution" size="small" />
395405

396406
The `modbus` plugin can read data from any Modbus-capable device or SunSpec-compatible inverter.
@@ -411,6 +421,8 @@ register:
411421

412422
See the [Modbus Documentation](/en/reference/modbus) for more details.
413423

424+
<a id="mqtt"></a>
425+
414426
### MQTT <Badge text="read" variant="tip" size="small" /> <Badge text="write" variant="caution" size="small" />
415427

416428
The `mqtt` plugin enables reading values via MQTT topics.
@@ -458,6 +470,8 @@ topic: mbmd/charger/maxcurrent
458470
payload: ${var:%d}
459471
```
460472

473+
<a id="prometheus"></a>
474+
461475
### Prometheus <Badge text="read" variant="tip" size="small" />
462476

463477
The `prometheus` plugin reads metrics from a Prometheus instance using PromQL queries.
@@ -542,6 +556,8 @@ Supported values for `value` can be found in the diagnostic output using the `ev
542556

543557
All possible values can be found as constants [here](https://gitlab.com/bboehmke/sunny/-/blob/master/values.go#L24) (use the constant name for `value`).
544558

559+
<a id="websocket"></a>
560+
545561
### Websocket <Badge text="read" variant="tip" size="small" />
546562

547563
The `websocket` plugin provides a WebSocket listener.
@@ -562,6 +578,8 @@ timeout: 30s # error if no update received in 30 seconds
562578

563579
## Helpers
564580

581+
<a id="calc"></a>
582+
565583
### Calc <Badge text="read" variant="tip" size="small" />
566584

567585
The `calc` plugin allows mathematical processing of multiple individual values:
@@ -612,6 +630,8 @@ The `calc` plugin is helpful for e.g.
612630
Constant auxiliary values (e.g. for offsets) can be generated as operands using the `const` plugin.
613631
:::
614632

633+
<a id="combined"></a>
634+
615635
### Combined <Badge text="read" variant="tip" size="small" />
616636

617637
The `combined` status plugin is used to convert mixed boolean status values of `Plugged` (connected) / `Charging` (charging) into an evcc-compatible charging status of A..F.
@@ -629,6 +649,8 @@ charging:
629649
topic: openWB/lp/1/boolChargeStat
630650
```
631651

652+
<a id="const"></a>
653+
632654
### Const <Badge text="read" variant="tip" size="small" />
633655

634656
The `const` plugin returns a constant value.
@@ -641,6 +663,8 @@ source: const
641663
value: -16247
642664
```
643665

666+
<a id="error"></a>
667+
644668
### Error <Badge text="read" variant="tip" size="small" />
645669

646670
The `error` plugin always returns a [known error value](#known-errors).
@@ -660,6 +684,8 @@ soc:
660684
error: ErrNotAvailable
661685
```
662686

687+
<a id="convert"></a>
688+
663689
### Convert <Badge text="write" variant="caution" size="small" />
664690

665691
The `convert` plugin converts data types when writing.
@@ -699,6 +725,8 @@ limitsoc:
699725

700726
In this example, evcc converts a float value like `85.5` to `85` before writing it to the modbus register.
701727

728+
<a id="delta"></a>
729+
702730
### Delta <Badge text="write" variant="caution" size="small" />
703731

704732
The `delta` plugin converts absolute values to delta/increment values.
@@ -783,6 +811,8 @@ setmaxpower:
783811
decode: uint16
784812
```
785813

814+
<a id="ignore"></a>
815+
786816
### Ignore <Badge text="write" variant="caution" size="small" />
787817

788818
The `ignore` plugin suppresses specific error messages when writing.
@@ -829,6 +859,8 @@ batterymode:
829859

830860
In this example, the device returns a harmless modbus error that is ignored.
831861

862+
<a id="ifelse"></a>
863+
832864
### IfElse <Badge text="write" variant="caution" size="small" />
833865

834866
The `ifelse` plugin performs conditional write operations with two branches.
@@ -863,6 +895,8 @@ enable:
863895
method: POST
864896
```
865897

898+
<a id="map"></a>
899+
866900
### Map <Badge text="read" variant="tip" size="small" /> <Badge text="write" variant="caution" size="small" />
867901

868902
The `map` plugin translates integer values to other integer values using a lookup table.
@@ -974,6 +1008,8 @@ meters:
9741008

9751009
In this example, a Shelly 1PM device is used as a data source for power and energy of a battery, while the state of charge (SoC) is retrieved via MQTT.
9761010

1011+
<a id="sequence"></a>
1012+
9771013
### Sequence <Badge text="write" variant="caution" size="small" />
9781014

9791015
The `sequence` plugin executes multiple write operations sequentially.
@@ -1065,6 +1101,8 @@ batterymode:
10651101

10661102
The value flows through all plugins, with `switch` executing different actions based on the value and `mqtt` always notifying at the end.
10671103

1104+
<a id="sleep"></a>
1105+
10681106
### Sleep <Badge text="write" variant="caution" size="small" />
10691107

10701108
The `sleep` plugin adds a delay.
@@ -1092,6 +1130,8 @@ setmode:
10921130
method: POST
10931131
```
10941132

1133+
<a id="switch"></a>
1134+
10951135
### Switch <Badge text="write" variant="caution" size="small" />
10961136

10971137
The `switch` plugin performs conditional write operations, similar to a switch/case statement in programming languages.
@@ -1136,6 +1176,8 @@ setmode:
11361176
body: "boost"
11371177
```
11381178

1179+
<a id="valid"></a>
1180+
11391181
### Valid <Badge text="read" variant="tip" size="small" />
11401182

11411183
The `valid` plugin allows providing plugin values based on boolean validation.
@@ -1159,6 +1201,8 @@ value:
11591201
In this example, the value is only used when the `valid` topic returns `true`.
11601202
If it returns `false`, the value is marked as unavailable.
11611203

1204+
<a id="watchdog"></a>
1205+
11621206
### Watchdog <Badge text="write" variant="caution" size="small" />
11631207

11641208
The `watchdog` plugin is a wrapper plugin that automatically repeats write operations at regular intervals.

0 commit comments

Comments
 (0)