diff --git a/go.mod b/go.mod index 22caf684f..d58f21153 100644 --- a/go.mod +++ b/go.mod @@ -90,7 +90,7 @@ require ( github.com/teslamotors/vehicle-command v0.3.4 github.com/traefik/yaegi v0.16.1 github.com/tv42/httpunix v0.0.0-20191220191345-2ba4b9c3382c - github.com/volkszaehler/mbmd v0.0.0-20250411152441-99388f32e2c3 + github.com/volkszaehler/mbmd v0.0.0-20250503134953-5c7e3f60eee5 github.com/writeas/go-strip-markdown/v2 v2.1.1 gitlab.com/bboehmke/sunny v0.16.0 go.uber.org/mock v0.5.2 diff --git a/go.sum b/go.sum index d81581913..172eda4d6 100644 --- a/go.sum +++ b/go.sum @@ -693,8 +693,8 @@ github.com/vmihailenco/msgpack/v5 v5.4.1 h1:cQriyiUvjTwOHg8QZaPihLWeRAAVoCpE00IU github.com/vmihailenco/msgpack/v5 v5.4.1/go.mod h1:GaZTsDaehaPpQVyxrf5mtQlH+pc21PIudVV/E3rRQok= 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-20250411152441-99388f32e2c3 h1:eQmg4LiwllMxNmqChmyKDx6p5HwMK+SYRkGTPQ9aIkY= -github.com/volkszaehler/mbmd v0.0.0-20250411152441-99388f32e2c3/go.mod h1:egeAZti78O7U6QcdDPze5NHiiLdPSviw6YA7rsNYSMQ= +github.com/volkszaehler/mbmd v0.0.0-20250503134953-5c7e3f60eee5 h1:1AwOQySiUEmrAQY2X7FJCKJtHsGiTE/T53sIB1qMQ34= +github.com/volkszaehler/mbmd v0.0.0-20250503134953-5c7e3f60eee5/go.mod h1:egeAZti78O7U6QcdDPze5NHiiLdPSviw6YA7rsNYSMQ= github.com/writeas/go-strip-markdown/v2 v2.1.1 h1:hAxUM21Uhznf/FnbVGiJciqzska6iLei22Ijc3q2e28= github.com/writeas/go-strip-markdown/v2 v2.1.1/go.mod h1:UvvgPJgn1vvN8nWuE5e7v/+qmDu3BSVnKAB6Gl7hFzA= github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU= diff --git a/templates/definition/meter/cg-em24.yaml b/templates/definition/meter/cg-em24.yaml index 47616409a..fb288dcdf 100644 --- a/templates/definition/meter/cg-em24.yaml +++ b/templates/definition/meter/cg-em24.yaml @@ -10,7 +10,7 @@ params: - name: usage choice: ["grid", "charge"] - name: modbus - choice: ["rs485", "tcpip"] + choice: ["rs485"] render: | type: mbmd {{- include "modbus" . }} diff --git a/templates/definition/meter/cg-em24_e1.yaml b/templates/definition/meter/cg-em24_e1.yaml new file mode 100644 index 000000000..c8252668e --- /dev/null +++ b/templates/definition/meter/cg-em24_e1.yaml @@ -0,0 +1,35 @@ +template: cg-em24_e1 +products: + - brand: Carlo Gavazzi + description: + generic: EM24_E1 + - brand: Victron + description: + generic: EM24_E1 +params: + - name: usage + choice: ["grid", "charge"] + - name: modbus + choice: ["tcpip"] +render: | + type: mbmd + {{- include "modbus" . }} + model: cgem24_e1 + power: Power + energy: Import + currents: + - CurrentL1 + - CurrentL2 + - CurrentL3 + {{- if eq .usage "grid" }} + powers: + - PowerL1 + - PowerL2 + - PowerL3 + {{- end }} + {{- if eq .usage "charge" }} + voltages: + - VoltageL1 + - VoltageL2 + - VoltageL3 + {{- end }}