Skip to content

Commit

Permalink
Add M-TEC Energy Butler (#8901)
Browse files Browse the repository at this point in the history
  • Loading branch information
premultiply authored Jul 11, 2023
1 parent fd327c3 commit 383ef6a
Show file tree
Hide file tree
Showing 5 changed files with 212 additions and 0 deletions.
47 changes: 47 additions & 0 deletions templates/definition/meter/mtec-eb-gen2.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
template: mtec-eb-gen2
products:
- brand: M-TEC
description:
generic: Energy Butler GEN2
params:
- name: usage
choice: ["grid", "pv", "battery"]
- name: modbus
choice: ["rs485"]
render: |
type: custom
{{- if eq .usage "grid" }}
power:
source: modbus
{{- include "modbus" . | indent 2 }}
register:
address: 11000 # Zähler (NVP) Leistung
type: holding
decode: int32
{{- end }}
{{- if eq .usage "pv" }}
power:
source: modbus
{{- include "modbus" . | indent 2 }}
register:
address: 11028 # PV Leistung
type: holding
decode: uint32
{{- end }}
{{- if eq .usage "battery" }}
power:
source: modbus
{{- include "modbus" . | indent 2 }}
register:
address: 40258 # Batterie Leistung
type: holding
decode: int32
soc:
source: modbus
{{- include "modbus" . | indent 2 }}
register:
address: 43000 # State of Charge (SOC)
type: holding
decode: uint16
scale: 0.01
{{- end }}
47 changes: 47 additions & 0 deletions templates/definition/meter/mtec-eb-gen3.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
template: mtec-eb-gen3
products:
- brand: M-TEC
description:
generic: Energy Butler GEN3
params:
- name: usage
choice: ["grid", "pv", "battery"]
- name: modbus
choice: ["rs485"]
render: |
type: custom
{{- if eq .usage "grid" }}
power:
source: modbus
{{- include "modbus" . | indent 2 }}
register:
address: 11000 # Zähler (NVP) Leistung
type: holding
decode: int32
{{- end }}
{{- if eq .usage "pv" }}
power:
source: modbus
{{- include "modbus" . | indent 2 }}
register:
address: 11028 # PV Leistung
type: holding
decode: uint32
{{- end }}
{{- if eq .usage "battery" }}
power:
source: modbus
{{- include "modbus" . | indent 2 }}
register:
address: 30258 # Batterie Leistung
type: holding
decode: int32
soc:
source: modbus
{{- include "modbus" . | indent 2 }}
register:
address: 33000 # State of Charge (SOC)
type: holding
decode: uint16
scale: 0.01
{{- end }}
58 changes: 58 additions & 0 deletions templates/docs/meter/mtec-eb-gen2_0.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
product:
brand: M-TEC
description: Energy Butler GEN2
render:
- usage: grid
default: |
type: template
template: mtec-eb-gen2
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
- usage: pv
default: |
type: template
template: mtec-eb-gen2
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
- usage: battery
default: |
type: template
template: mtec-eb-gen2
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
58 changes: 58 additions & 0 deletions templates/docs/meter/mtec-eb-gen3_0.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
product:
brand: M-TEC
description: Energy Butler GEN3
render:
- usage: grid
default: |
type: template
template: mtec-eb-gen3
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
- usage: pv
default: |
type: template
template: mtec-eb-gen3
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
- usage: battery
default: |
type: template
template: mtec-eb-gen3
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
2 changes: 2 additions & 0 deletions templates/evcc.io/brands.json
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@
"Janitza",
"Kostal",
"LG",
"M-TEC",
"my-PV",
"myStrom",
"OpenEMS",
Expand Down Expand Up @@ -147,6 +148,7 @@
"IGEN Tech",
"Kostal",
"LG",
"M-TEC",
"myStrom",
"OpenEMS",
"Powerfox",
Expand Down

0 comments on commit 383ef6a

Please sign in to comment.