diff --git a/templates/definition/meter/iammeter-1p.yaml b/templates/definition/meter/iammeter-1p.yaml new file mode 100644 index 000000000..5407c2e92 --- /dev/null +++ b/templates/definition/meter/iammeter-1p.yaml @@ -0,0 +1,31 @@ +template: iammeter-1p +products: + - brand: IAMMETER + description: + generic: WEM3080 +params: + - name: usage + choice: ["grid", "pv", "charge"] + - name: host + - name: cache + advanced: true + default: 2s +render: | + type: custom + power: + source: http + uri: http://{{ .host }}/api/monitorjson + jq: .Data[2] # active power, unit: W + cache: {{ .cache }} + {{- if eq .usage "pv" }} + scale: -1 + {{- end }} + energy: + source: http + uri: http://{{ .host }}/api/monitorjson + {{- if eq .usage "pv" }} + jq: .Data[4] # reverse active energy, unit: kWh + {{- else }} + jq: .Data[3] # forward active energy, unit: kWh + {{- end }} + cache: {{ .cache }} diff --git a/templates/definition/meter/iammeter-2p.yaml b/templates/definition/meter/iammeter-2p.yaml new file mode 100644 index 000000000..e977fdc72 --- /dev/null +++ b/templates/definition/meter/iammeter-2p.yaml @@ -0,0 +1,39 @@ +template: iammeter-2p +products: + - brand: IAMMETER + description: + generic: WEM2067 +params: + - name: usage + choice: ["grid", "pv", "charge"] + - name: host + - name: channel + type: int + default: 1 + required: true + description: + de: Messkanal (1-2) + en: Meter channel (1-2) + - name: cache + advanced: true + default: 2s +render: | + type: custom + {{- $idx := sub .channel 1 }} + power: + source: http + uri: http://{{ .host }}/api/monitorjson + jq: .Datas[{{ $idx }}][2] # active power, unit: W + cache: {{ .cache }} + {{- if eq .usage "pv" }} + scale: -1 + {{- end }} + energy: + source: http + uri: http://{{ .host }}/api/monitorjson + {{- if eq .usage "pv" }} + jq: .Datas[{{ $idx }}][4] # reverse active energy, unit: kWh + {{- else }} + jq: .Datas[{{ $idx }}][3] # forward active energy, unit: kWh + {{- end }} + cache: {{ .cache }} diff --git a/templates/definition/meter/iammeter-3p.yaml b/templates/definition/meter/iammeter-3p.yaml new file mode 100644 index 000000000..46f735bf1 --- /dev/null +++ b/templates/definition/meter/iammeter-3p.yaml @@ -0,0 +1,93 @@ +template: iammeter-3p +products: + - brand: IAMMETER + description: + generic: WEM3080T + - brand: IAMMETER + description: + generic: WEM3046T + - brand: IAMMETER + description: + generic: WEM3050T +requirements: + description: + de: | + Die Aktivierung des Net Metering Mode (NEM) (=phasensaldierende Zählung) ist erforderlich. + Siehe https://www.iammeter.com/newsshow/net-energy-metering + en: | + Net Metering Mode (NEM) must be enabled. + See https://www.iammeter.com/newsshow/net-energy-metering +params: + - name: usage + choice: ["grid", "pv", "charge"] + - name: host + - name: cache + advanced: true + default: 2s +render: | + type: custom + power: + source: http + uri: http://{{ .host }}/api/monitorjson + jq: .Datas[3][2] # active power, unit: W + cache: {{ .cache }} + {{- if eq .usage "pv" }} + scale: -1 + {{- end }} + energy: + source: http + uri: http://{{ .host }}/api/monitorjson + {{- if eq .usage "pv" }} + jq: .Datas[3][4] # reverse active energy, unit: kWh + {{- else }} + jq: .Datas[3][3] # forward active energy, unit: kWh + {{- end }} + cache: {{ .cache }} + powers: + - source: http + uri: http://{{ .host }}/api/monitorjson + jq: .Datas[0][2] # L1 power, unit: W + cache: {{ .cache }} + {{- if eq .usage "pv" }} + scale: -1 + {{- end }} + - source: http + uri: http://{{ .host }}/api/monitorjson + jq: .Datas[1][2] # L2 power, unit: W + cache: {{ .cache }} + {{- if eq .usage "pv" }} + scale: -1 + {{- end }} + - source: http + uri: http://{{ .host }}/api/monitorjson + jq: .Datas[2][2] # L3 power, unit: W + cache: {{ .cache }} + {{- if eq .usage "pv" }} + scale: -1 + {{- end }} + currents: + - source: http + uri: http://{{ .host }}/api/monitorjson + jq: .Datas[0][1] # L1 current, unit: A + cache: {{ .cache }} + - source: http + uri: http://{{ .host }}/api/monitorjson + jq: .Datas[1][1] # L2 current, unit: A + cache: {{ .cache }} + - source: http + uri: http://{{ .host }}/api/monitorjson + jq: .Datas[2][1] # L3 current, unit: A + cache: {{ .cache }} + voltages: + - source: http + uri: http://{{ .host }}/api/monitorjson + jq: .Datas[0][0] # L1 voltage, unit: V + cache: {{ .cache }} + - source: http + uri: http://{{ .host }}/api/monitorjson + jq: .Datas[1][0] # L2 voltage, unit: V + cache: {{ .cache }} + - source: http + uri: http://{{ .host }}/api/monitorjson + jq: .Datas[2][0] # L3 voltage, unit: V + cache: {{ .cache }} diff --git a/templates/definition/meter/iammeter.yaml b/templates/definition/meter/iammeter.yaml index 407cfd709..b182fece4 100644 --- a/templates/definition/meter/iammeter.yaml +++ b/templates/definition/meter/iammeter.yaml @@ -1,4 +1,5 @@ template: iammeter +deprecated: true products: - brand: IAMMETER description: