Add Janitza meter (#3527)

This commit is contained in:
andig 2022-05-28 20:30:00 +02:00 • committed by GitHub
parent 306169219a
commit 9fde314d19
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 128 additions and 3 deletions

2
go.mod
View file

@ -73,7 +73,7 @@ require (
github.com/spf13/viper v1.11.0
github.com/stretchr/testify v1.7.1
github.com/tv42/httpunix v0.0.0-20191220191345-2ba4b9c3382c
github.com/volkszaehler/mbmd v0.0.0-20220513145931-a8df46294407
github.com/volkszaehler/mbmd v0.0.0-20220528181824-7251dd80a3fb
github.com/writeas/go-strip-markdown v2.0.1+incompatible
gitlab.com/bboehmke/sunny v0.15.1-0.20211022160056-2fba1c86ade6
golang.org/x/exp v0.0.0-20220518171630-0b5c67f07fdf

4
go.sum
View file

@ -910,8 +910,8 @@ github.com/vmihailenco/msgpack/v5 v5.3.5 h1:5gO0H1iULLWGhs2H5tbAHIZTV8/cYafcFOr9
github.com/vmihailenco/msgpack/v5 v5.3.5/go.mod h1:7xyJ9e+0+9SaZT0Wt1RGleJXzli6Q/V5KbhBonMG9jc=
github.com/vmihailenco/tagparser/v2 v2.0.0 h1:y09buUbR+b5aycVFQs/g70pqKVZNBmxwAhO7/IwNM9g=
github.com/vmihailenco/tagparser/v2 v2.0.0/go.mod h1:Wri+At7QHww0WTrCBeu4J6bNtoV6mEfg5OIWRZA9qds=
github.com/volkszaehler/mbmd v0.0.0-20220513145931-a8df46294407 h1:GyDTzbudD4tlden9A9UvTiKQvr0GuNdpFm6mtThm5Qg=
github.com/volkszaehler/mbmd v0.0.0-20220513145931-a8df46294407/go.mod h1:JP4R5rxFO4QlDo/DoNp8YrPD2YV0+imTfRTL5xBCUjs=
github.com/volkszaehler/mbmd v0.0.0-20220528181824-7251dd80a3fb h1:ESIHQLaabzC22atuOQ4B3CwyA0sxkTZOD+P/5MbneRY=
github.com/volkszaehler/mbmd v0.0.0-20220528181824-7251dd80a3fb/go.mod h1:JP4R5rxFO4QlDo/DoNp8YrPD2YV0+imTfRTL5xBCUjs=
github.com/writeas/go-strip-markdown v2.0.1+incompatible h1:IIqxTM5Jr7RzhigcL6FkrCNfXkvbR+Nbu1ls48pXYcw=
github.com/writeas/go-strip-markdown v2.0.1+incompatible/go.mod h1:Rsyu10ZhbEK9pXdk8V6MVnZmTzRG0alMNLMwa0J01fE=
github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU=

View file

@ -0,0 +1,23 @@
template: janitza-b23
products:
- brand: Janitza
description:
generic: B23
params:
- name: usage
choice: ["grid", "pv", "battery", "charge"]
- name: modbus
choice: ["rs485", "tcpip"]
render: |
type: modbus
model: janitza
{{- include "modbus" . }}
{{- if eq .usage "charge" }}
energy: Import # only required for charge meter usage
{{- end }}
{{- if or (eq .usage "charge") (eq .usage "grid") }}
currents:
- CurrentL1
- CurrentL2
- CurrentL3
{{- end }}

View file

@ -0,0 +1,100 @@
product:
brand: Janitza
description: B23
render:
- usage: grid
default: |
type: template
template: janitza-b23
usage: grid
# RS485 via adapter (Modbus RTU)
modbus: rs485serial
id: 1
device: /dev/ttyUSB0 # USB-RS485 Adapter Adresse
baudrate: 9600 # Prüfe die Geräteeinstellungen, typische Werte sind 9600, 19200, 38400, 57600, 115200
comset: "8N1" # Kommunikationsparameter für den Adapter
# RS485 via TCP/IP (Modbus RTU)
modbus: rs485tcpip
id: 1
host: 192.0.2.2 # Hostname
port: 502 # Port
# Modbus TCP
modbus: tcpip
id: 1
host: 192.0.2.2 # Hostname
port: 502 # Port
- usage: pv
default: |
type: template
template: janitza-b23
usage: pv
# RS485 via adapter (Modbus RTU)
modbus: rs485serial
id: 1
device: /dev/ttyUSB0 # USB-RS485 Adapter Adresse
baudrate: 9600 # Prüfe die Geräteeinstellungen, typische Werte sind 9600, 19200, 38400, 57600, 115200
comset: "8N1" # Kommunikationsparameter für den Adapter
# RS485 via TCP/IP (Modbus RTU)
modbus: rs485tcpip
id: 1
host: 192.0.2.2 # Hostname
port: 502 # Port
# Modbus TCP
modbus: tcpip
id: 1
host: 192.0.2.2 # Hostname
port: 502 # Port
- usage: battery
default: |
type: template
template: janitza-b23
usage: battery
# RS485 via adapter (Modbus RTU)
modbus: rs485serial
id: 1
device: /dev/ttyUSB0 # USB-RS485 Adapter Adresse
baudrate: 9600 # Prüfe die Geräteeinstellungen, typische Werte sind 9600, 19200, 38400, 57600, 115200
comset: "8N1" # Kommunikationsparameter für den Adapter
# RS485 via TCP/IP (Modbus RTU)
modbus: rs485tcpip
id: 1
host: 192.0.2.2 # Hostname
port: 502 # Port
# Modbus TCP
modbus: tcpip
id: 1
host: 192.0.2.2 # Hostname
port: 502 # Port
- usage: charge
default: |
type: template
template: janitza-b23
usage: charge
# RS485 via adapter (Modbus RTU)
modbus: rs485serial
id: 1
device: /dev/ttyUSB0 # USB-RS485 Adapter Adresse
baudrate: 9600 # Prüfe die Geräteeinstellungen, typische Werte sind 9600, 19200, 38400, 57600, 115200
comset: "8N1" # Kommunikationsparameter für den Adapter
# RS485 via TCP/IP (Modbus RTU)
modbus: rs485tcpip
id: 1
host: 192.0.2.2 # Hostname
port: 502 # Port
# Modbus TCP
modbus: tcpip
id: 1
host: 192.0.2.2 # Hostname
port: 502 # Port

View file

@ -54,6 +54,7 @@
"FENECON",
"Fronius",
"Huawei",
"Janitza",
"Kostal",
"LG",
"OpenEMS",
@ -81,6 +82,7 @@
"FENECON",
"Fronius",
"Huawei",
"Janitza",
"Kostal",
"LG",
"OpenEMS",