Skip to content

Commit 140346b

Browse files
naltatisclaude
andcommitted
Document meter plugin
Add documentation for the meter plugin which allows using another meter device as a data source. This is useful for reusing existing devices with multiple methods or attributes. Closes #811 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent 4770b4c commit 140346b

File tree

2 files changed

+80
-0
lines changed

2 files changed

+80
-0
lines changed

docs/devices/plugins.mdx

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ evcc bietet folgende Plugins an:
2828
- [SMA/Speedwire Plugin](#speedwire) - Plugin speziell für SMA Geräte, die mit dem Speedwire Protokoll kommunizieren können.
2929
- [JavaScript Plugin](#javascript) - Plugin, das Werte in über ein JavaScript Skript bereitstellt oder entgegennimmt.
3030
- [Shell Plugin](#shell) - Plugin, das ein Shell Skript ausführen kann, um Daten zu extrahieren oder schreibend entgegennimmt.
31+
- [Meter Plugin](#meter-plugin) - Plugin um ein anderes Messgerät als Datenquelle zu verwenden.
3132

3233
Neben diesen Integrations-Plugins, gibt es noch Helfer-Plugins, die Zusatzfunktionen bereit stellt:
3334

@@ -579,3 +580,42 @@ value:
579580

580581
In diesem Beispiel wird der Wert nur verwendet, wenn das `valid` Topic `true` zurückgibt.
581582
Wenn es `false` zurückgibt, wird der Wert als nicht verfügbar markiert.
583+
584+
### Meter <Tag label="lesen" category="read" /> {#meter-plugin}
585+
586+
Das `meter` Plugin ermöglicht es, ein anderes Messgerät als Datenquelle zu verwenden.
587+
Dies ist nützlich, wenn man ein bestehendes Gerät für mehrere Messwerte verwenden möchte oder wenn man verschiedene Methoden eines Geräts für unterschiedliche Attribute nutzen will.
588+
589+
Die `config` Sektion enthält dabei die vollständige Template-Konfiguration des einzubettenden Messgeräts.
590+
591+
**Beispiel Lesen**:
592+
593+
```yaml
594+
meters:
595+
- name: battery
596+
type: custom
597+
power:
598+
source: meter
599+
config:
600+
type: template
601+
template: shelly-1pm
602+
host: 192.168.178.21
603+
channel: 0
604+
method: power
605+
scale: -1
606+
energy:
607+
source: meter
608+
config:
609+
type: template
610+
template: shelly-1pm
611+
host: 192.168.178.21
612+
channel: 0
613+
method: energy
614+
soc:
615+
source: mqtt
616+
topic: Haus/Batterie
617+
jq: .soc
618+
timeout: 60s
619+
```
620+
621+
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.

i18n/en/docusaurus-plugin-content-docs/current/devices/plugins.mdx

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ evcc offers the following plugins:
2828
- [SMA/Speedwire Plugin](#speedwire) - Plugin specifically for SMA devices that can communicate with the Speedwire protocol.
2929
- [JavaScript Plugin](#javascript) - Plugin that provides or receives values via a JavaScript script.
3030
- [Shell Plugin](#shell) - Plugin that can execute a shell script to extract data or receive data for writing.
31+
- [Meter Plugin](#meter-plugin) - Plugin to use another meter as a data source.
3132

3233
In addition to these integration plugins, there are also helper plugins that provide additional functions:
3334

@@ -579,3 +580,42 @@ value:
579580

580581
In this example, the value is only used when the `valid` topic returns `true`.
581582
If it returns `false`, the value is marked as unavailable.
583+
584+
### Meter <Tag label="read" category="read" /> {#meter-plugin}
585+
586+
The `meter` plugin allows using another meter as a data source.
587+
This is useful when you want to use an existing device for multiple measurements or when you need different methods of a device for different attributes.
588+
589+
The `config` section contains the complete template configuration of the meter to be embedded.
590+
591+
**Reading Example**:
592+
593+
```yaml
594+
meters:
595+
- name: battery
596+
type: custom
597+
power:
598+
source: meter
599+
config:
600+
type: template
601+
template: shelly-1pm
602+
host: 192.168.178.21
603+
channel: 0
604+
method: power
605+
scale: -1
606+
energy:
607+
source: meter
608+
config:
609+
type: template
610+
template: shelly-1pm
611+
host: 192.168.178.21
612+
channel: 0
613+
method: energy
614+
soc:
615+
source: mqtt
616+
topic: Haus/Batterie
617+
jq: .soc
618+
timeout: 60s
619+
```
620+
621+
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.

0 commit comments

Comments
 (0)