Skip to content

Commit

Permalink
Add Acrel ADW300 (#9330)
Browse files Browse the repository at this point in the history
  • Loading branch information
premultiply authored Aug 12, 2023
1 parent dbe0f2f commit 5ceafc8
Show file tree
Hide file tree
Showing 3 changed files with 185 additions and 0 deletions.
107 changes: 107 additions & 0 deletions templates/definition/meter/acrel-adw300.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,107 @@
template: acrel-adw300
products:
- brand: Acrel
description:
generic: ADW300 Wireless Metering Meter
params:
- name: usage
choice: ["grid", "pv", "charge"]
- name: modbus
choice: ["rs485", "tcpip"]
baudrate: 1200
render: |
type: custom
power:
source: modbus
{{- include "modbus" . | indent 2 }}
register:
address: 36 # Total active power
type: holding
decode: int32
{{- if eq .usage "pv" }}
scale: -1
{{- end }}
energy:
source: modbus
{{- include "modbus" . | indent 2 }}
register:
{{- if eq .usage "pv" }}
address: 64 # Reversing active energy consumption
{{- else }}
address: 62 # Forward active energy consumption
{{- end }}
type: holding
decode: int32
scale: 0.01
currents:
- source: modbus
{{- include "modbus" . | indent 2 }}
register:
address: 26 # Electricity of A phase
type: holding
decode: uint16
scale: 0.01
- source: modbus
{{- include "modbus" . | indent 2 }}
register:
address: 27 # Electricity of B phase
type: holding
decode: uint16
scale: 0.01
- source: modbus
{{- include "modbus" . | indent 2 }}
register:
address: 28 # Electricity of C phase
type: holding
decode: uint16
scale: 0.01
voltages:
- source: modbus
{{- include "modbus" . | indent 2 }}
register:
address: 20 # Voltage of A phase
type: holding
decode: uint16
scale: 0.1
- source: modbus
{{- include "modbus" . | indent 2 }}
register:
address: 21 # Voltage of B phase
type: holding
decode: uint16
scale: 0.1
- source: modbus
{{- include "modbus" . | indent 2 }}
register:
address: 22 # Voltage of C phase
type: holding
decode: uint16
scale: 0.1
powers:
- source: modbus
{{- include "modbus" . | indent 2 }}
register:
address: 30 # Active power of A phase
type: holding
decode: int32
{{- if eq .usage "pv" }}
scale: -1
{{- end }}
- source: modbus
{{- include "modbus" . | indent 2 }}
register:
address: 32 # Active power of B phase
type: holding
decode: int32
{{- if eq .usage "pv" }}
scale: -1
{{- end }}
- source: modbus
{{- include "modbus" . | indent 2 }}
register:
address: 34 # Active power of C phase
type: holding
decode: int32
{{- if eq .usage "pv" }}
scale: -1
{{- end }}
76 changes: 76 additions & 0 deletions templates/docs/meter/acrel-adw300_0.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
product:
brand: Acrel
description: ADW300 Wireless Metering Meter
render:
- usage: grid
default: |
type: template
template: acrel-adw300
usage: grid
# RS485 via adapter (Modbus RTU)
modbus: rs485serial
id: 1
device: /dev/ttyUSB0 # USB-RS485 Adapter Adresse
baudrate: 1200 # 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: acrel-adw300
usage: pv
# RS485 via adapter (Modbus RTU)
modbus: rs485serial
id: 1
device: /dev/ttyUSB0 # USB-RS485 Adapter Adresse
baudrate: 1200 # 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: acrel-adw300
usage: charge
# RS485 via adapter (Modbus RTU)
modbus: rs485serial
id: 1
device: /dev/ttyUSB0 # USB-RS485 Adapter Adresse
baudrate: 1200 # 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
2 changes: 2 additions & 0 deletions templates/evcc.io/brands.json
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@
],
"Meters": [
"ABB",
"Acrel",
"Alpha ESS",
"AVM",
"Bernecker Engineering",
Expand Down Expand Up @@ -134,6 +135,7 @@
"Zuidwijk"
],
"PVBattery": [
"Acrel",
"Alpha ESS",
"AVM",
"Bosswerk",
Expand Down

0 comments on commit 5ceafc8

Please sign in to comment.