Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
premultiply authored and andig committed Sep 14, 2023
1 parent 0a3a0cb commit 4c02929
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion templates/definition/charger/abl.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ requirements:
evcc: ["sponsorship"]
params:
- name: modbus
choice: ["ascii", "tcp"]
choice: ["ascii"]
baudrate: 38400
comset: 8E1
- name: timeout
Expand Down
8 changes: 4 additions & 4 deletions util/templates/documentation_modbus.tpl
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{{- if .rtuserial }}

# Attached to local serial interface (Modbus RTU)
modbus: rtuserial
modbus: rtu
id: {{ .id }}
device: {{ .device }} # Geräteadresse, typische Werte sind /dev/ttyUSB0, /dev/ttyAMA0, /dev/ttyS0 oder COM3
baudrate: {{ .baudrate }} # Baudrate, typische Werte sind 9600, 19200, 38400, 57600, 115200
Expand All @@ -10,15 +10,15 @@ comset: {{ .comset }} # Parität, Datenbits, Stoppbits, typische Werte sind 8N1,
{{- if .rtutcp }}

# Attached to transparent serial device server (Modbus RTU over TCP/IP)
modbus: rtutcp
modbus: rtu-over-tcpip
id: {{ .id }}
host: {{ .host }} # Hostname
port: {{ .port }} # Port
{{- end }}
{{- if .asciiserial }}

# Attached to local serial interface (Modbus ASCII)
modbus: asciiserial
modbus: ascii
id: {{ .id }}
device: {{ .device }} # Geräteadresse, typische Werte sind /dev/ttyUSB0, /dev/ttyAMA0, /dev/ttyS0 oder COM3
baudrate: {{ .baudrate }} # Baudrate, typische Werte sind 9600, 19200, 38400, 57600, 115200
Expand All @@ -27,7 +27,7 @@ comset: {{ .comset }} # Parität, Datenbits, Stoppbits, typische Werte sind 8N1,
{{- if .asciitcp }}

# Attached to transparent serial device server (Modbus ASCII over TCP/IP)
modbus: asciitcp
modbus: ascii-over-tcpip
id: {{ .id }}
host: {{ .host }} # Hostname
port: {{ .port }} # Port
Expand Down
10 changes: 5 additions & 5 deletions util/templates/modbus.tpl
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
{{- define "modbus" }}
id: {{ .id }}
{{- if or (eq .modbus "rs485serial") (eq .modbus "rtuserial") (eq .modbus "asciiserial") }}
{{- if or (eq .modbus "rs485serial") (eq .modbus "rtu") (eq .modbus "ascii") }}
# Serial interface (Modbus RTU/ASCII)
device: {{ .device }}
baudrate: {{ .baudrate }}
comset: "{{ .comset }}"
{{- else if or (eq .modbus "rs485tcpip") (eq .modbus "rtutcp") }}
# Modbus RTU via TCP/IP
{{- else if or (eq .modbus "rs485tcpip") (eq .modbus "rtu-over-tcpip") }}
# Modbus RTU over TCP/IP
uri: {{ .host }}:{{ .port }}
rtu: true
{{- else if or (eq .modbus "asciitcp") }}
# Modbus ASCII via TCP/IP
{{- else if or (eq .modbus "ascii-over-tcpip") }}
# Modbus ASCII over TCP/IP
uri: {{ .host }}:{{ .port }}
{{- else if or (eq .modbus "tcpip") (eq .modbus "tcp") }}
# Modbus TCP
Expand Down

0 comments on commit 4c02929

Please sign in to comment.