Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Templates: Rework Modbus config #8600

Draft
wants to merge 31 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from 26 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion templates/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ Example Use Case: With SMA Home Manager, there can be a SMA Energy Meter used fo
**Predefined name values**:

- `usage`: specifies a list of meter classes, the device can be used for. Possible values are `grid`, `pv`, `battery`, and `charger`
- `modbus`: specifies that this device is accessed via modbus. It requires the `choice` property to have a list of possible interface values the device provides. These values can be `rs485` and `tcpip`. The command will use either to ask the appropriate questions and settings. The `render` section needs to include the string `{{include "modbus" .}}` in all places where the configuration needs modbus settings.
- `modbus`: specifies that this device is accessed via modbus. It requires the `choice` property to have a list of possible interface values the device provides. These values can be `rtu`, `tcp` or `ascii`. The command will use either to ask the appropriate questions and settings. The `render` section needs to include the string `{{include "modbus" .}}` in all places where the configuration needs modbus settings.

#### Usage Options

Expand Down
2 changes: 1 addition & 1 deletion templates/definition/charger/abb.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ requirements:
evcc: ["sponsorship"]
params:
- name: modbus
choice: ["rs485", "tcpip"]
choice: ["rtu", "tcp"]
render: |
type: abb
{{- include "modbus" . }}
2 changes: 1 addition & 1 deletion templates/definition/charger/abl-em4.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ requirements:
evcc: ["sponsorship"]
params:
- name: modbus
choice: ["tcpip"]
choice: ["tcp"]
id: 255
- name: connector
default: 1
Expand Down
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: ["rs485"]
choice: ["ascii"]
baudrate: 38400
comset: 8E1
- name: timeout
Expand Down
2 changes: 1 addition & 1 deletion templates/definition/charger/alfen.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ requirements:
evcc: ["sponsorship"]
params:
- name: modbus
choice: ["tcpip"]
choice: ["tcp"]
render: |
type: alfen
{{- include "modbus" . }}
2 changes: 1 addition & 1 deletion templates/definition/charger/alphatec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ requirements:
evcc: ["sponsorship"]
params:
- name: modbus
choice: ["rs485"]
choice: ["rtu"]
baudrate: 9600
comset: 8N1
- name: timeout
Expand Down
2 changes: 1 addition & 1 deletion templates/definition/charger/amperfied.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ requirements:
evcc: ["sponsorship"]
params:
- name: modbus
choice: ["tcpip"]
choice: ["tcp"]
id: 255
render: |
type: heidelberg
Expand Down
2 changes: 1 addition & 1 deletion templates/definition/charger/amtron.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ requirements:
evcc: ["sponsorship"]
params:
- name: modbus
choice: ["tcpip"]
choice: ["tcp"]
id: 255
render: |
type: amtron
Expand Down
2 changes: 1 addition & 1 deletion templates/definition/charger/dadapower.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ products:
capabilities: ["1p3p", "mA", "rfid"]
params:
- name: modbus
choice: ["tcpip"]
choice: ["tcp"]
id: 1
render: |
type: dadapower
Expand Down
2 changes: 1 addition & 1 deletion templates/definition/charger/em2go.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ requirements:
en: "Recent firmware with Modbus support required (Pro Power: 1.01 and OCPP/ONC: 3.15)"
params:
- name: modbus
choice: ["tcpip"]
choice: ["tcp"]
id: 255
render: |
type: em2go
Expand Down
2 changes: 1 addition & 1 deletion templates/definition/charger/evse-din.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ products:
generic: EVSE DIN
params:
- name: modbus
choice: ["rs485"]
choice: ["rtu"]
baudrate: 9600
comset: 8N1
render: |
Expand Down
2 changes: 1 addition & 1 deletion templates/definition/charger/heidelberg.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ requirements:
evcc: ["sponsorship"]
params:
- name: modbus
choice: ["rs485"]
choice: ["rtu"]
baudrate: 19200
comset: 8E1
render: |
Expand Down
2 changes: 1 addition & 1 deletion templates/definition/charger/hesotec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ requirements:
evcc: ["sponsorship"]
params:
- name: modbus
choice: ["tcpip"]
choice: ["tcp"]
render: |
type: hesotec
{{- include "modbus" . }}
2 changes: 1 addition & 1 deletion templates/definition/charger/icharge-cion.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ products:
generic: i-CHARGE CION
params:
- name: modbus
choice: ["tcpip"]
choice: ["tcp"]
render: |
type: custom
status:
Expand Down
2 changes: 1 addition & 1 deletion templates/definition/charger/innogy-ebox.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ requirements:
evcc: ["sponsorship"]
params:
- name: modbus
choice: ["tcpip"]
choice: ["tcp"]
render: |
type: innogy
{{- include "modbus" . }}
2 changes: 1 addition & 1 deletion templates/definition/charger/keba-modbus.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ requirements:
en: Requires firmware version 3.10.42 (C-series) bzw. 1.11 (X-series). For phase switching the Keba phase switch (KeContact S10) is also required.
params:
- name: modbus
choice: ["tcpip"]
choice: ["tcp"]
id: 255
render: |
type: keba-modbus
Expand Down
2 changes: 1 addition & 1 deletion templates/definition/charger/kse.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ requirements:
evcc: ["sponsorship"]
params:
- name: modbus
choice: ["rs485"]
choice: ["rtu"]
baudrate: 9600
comset: 8E1
id: 100
Expand Down
2 changes: 1 addition & 1 deletion templates/definition/charger/obo.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ products:
generic: Ion
params:
- name: modbus
choice: ["rs485", "tcpip"]
choice: ["rtu"]
baudrate: 19200
comset: 8E1
id: 101
Expand Down
2 changes: 1 addition & 1 deletion templates/definition/charger/phoenix-charx.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ products:
generic: EvLoad/ Mikro 2.0
params:
- name: modbus
choice: ["tcpip"]
choice: ["tcp"]
id: 255
- name: connector
render: |
Expand Down
2 changes: 1 addition & 1 deletion templates/definition/charger/phoenix-em-eth.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ products:
generic: EM-CP-PP-ETH (Modbus TCP)
params:
- name: modbus
choice: ["tcpip"]
choice: ["tcp"]
id: 255
render: |
type: phoenix-em-eth
Expand Down
2 changes: 1 addition & 1 deletion templates/definition/charger/phoenix-ev-eth.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ requirements:
evcc: ["sponsorship"]
params:
- name: modbus
choice: ["tcpip"]
choice: ["tcp"]
id: 255
render: |
type: phoenix-ev-eth
Expand Down
2 changes: 1 addition & 1 deletion templates/definition/charger/phoenix-ev-ser.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ products:
generic: EV-SER (Modbus RTU)
params:
- name: modbus
choice: ["rs485"]
choice: ["rtu"]
render: |
type: phoenix-ev-ser
{{- include "modbus" . }}
2 changes: 1 addition & 1 deletion templates/definition/charger/pracht-alpha.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ requirements:
evcc: ["sponsorship"]
params:
- name: modbus
choice: ["rs485", "tcpip"]
choice: ["rtu", "tcp"]
baudrate: 9600
comset: 8N1
id: 1
Expand Down
2 changes: 1 addition & 1 deletion templates/definition/charger/scheider-evlink.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ requirements:
evcc: ["sponsorship"]
params:
- name: modbus
choice: ["tcpip"]
choice: ["tcp"]
id: 255
render: |
type: schneider
Expand Down
2 changes: 1 addition & 1 deletion templates/definition/charger/versicharge.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ requirements:
en: Requires firmware >= 2.121.5
params:
- name: modbus
choice: ["tcpip"]
choice: ["tcp"]
id: 2
render: |
type: versicharge
Expand Down
2 changes: 1 addition & 1 deletion templates/definition/charger/vestel.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ requirements:
evcc: ["sponsorship"]
params:
- name: modbus
choice: ["tcpip"]
choice: ["tcp"]
id: 255
render: |
type: vestel
Expand Down
5 changes: 3 additions & 2 deletions templates/definition/common-schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -124,8 +124,9 @@
"items": {
"type": "string",
"enum": [
"tcpip",
"rs485"
"tcp",
"rtu",
"ascii"
]
}
},
Expand Down
2 changes: 1 addition & 1 deletion templates/definition/meter/abb-ab.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ params:
- name: usage
choice: ["grid", "charge"]
- name: modbus
choice: ["rs485"]
choice: ["rtu"]
render: |
type: modbus
model: abb
Expand Down
2 changes: 1 addition & 1 deletion templates/definition/meter/acrel-adw300.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ params:
- name: usage
choice: ["grid", "pv", "charge"]
- name: modbus
choice: ["rs485", "tcpip"]
choice: ["rtu", "tcp"]
baudrate: 1200
render: |
type: custom
Expand Down
2 changes: 1 addition & 1 deletion templates/definition/meter/alpha-ess-smile.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ params:
choice: ["grid", "pv", "battery"]
allinone: true
- name: modbus
choice: ["rs485", "tcpip"]
choice: ["rtu", "tcp"]
baudrate: 9600
id: 85
- name: capacity
Expand Down
2 changes: 1 addition & 1 deletion templates/definition/meter/be-mpm3pm.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ params:
- name: usage
choice: ["grid", "charge"]
- name: modbus
choice: ["rs485"]
choice: ["rtu"]
render: |
type: modbus
{{- include "modbus" . }}
Expand Down
2 changes: 1 addition & 1 deletion templates/definition/meter/cfos.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ params:
- name: usage
choice: ["charge"]
- name: modbus
choice: ["tcpip"]
choice: ["tcp"]
port: 4702
id: 2
render: |
Expand Down
2 changes: 1 addition & 1 deletion templates/definition/meter/cg-em24.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ params:
- name: usage
choice: ["grid", "charge"]
- name: modbus
choice: ["rs485", "tcpip"]
choice: ["rtu", "tcp"]
render: |
type: modbus
{{- include "modbus" . }}
Expand Down
2 changes: 1 addition & 1 deletion templates/definition/meter/cg-emt3xx.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ params:
- name: usage
choice: ["grid", "charge"]
- name: modbus
choice: ["rs485", "tcpip"]
choice: ["rtu", "tcp"]
render: |
type: modbus
{{- include "modbus" . }}
Expand Down
2 changes: 1 addition & 1 deletion templates/definition/meter/deye-hybrid.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ params:
choice: ["grid", "pv", "battery"]
allinone: true
- name: modbus
choice: ["rs485", "tcpip"]
choice: ["rtu", "tcp"]
baudrate: 9600
id: 1
- name: capacity
Expand Down
2 changes: 1 addition & 1 deletion templates/definition/meter/dzg.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ params:
- name: usage
choice: ["charge"]
- name: modbus
choice: ["rs485"]
choice: ["rtu"]
render: |
type: modbus
model: dzg
Expand Down
2 changes: 1 addition & 1 deletion templates/definition/meter/eastron-sdm120.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ params:
- name: usage
choice: ["grid", "charge"]
- name: modbus
choice: ["rs485"]
choice: ["rtu"]
render: |
type: modbus
{{- include "modbus" . }}
Expand Down
2 changes: 1 addition & 1 deletion templates/definition/meter/eastron-sdm220_230.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ params:
- name: usage
choice: ["grid", "charge"]
- name: modbus
choice: ["rs485"]
choice: ["rtu"]
render: |
type: modbus
{{- include "modbus" . }}
Expand Down
2 changes: 1 addition & 1 deletion templates/definition/meter/eastron-sdm72.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ params:
- name: usage
choice: ["grid", "charge"]
- name: modbus
choice: ["rs485"]
choice: ["rtu"]
render: |
type: modbus
{{- include "modbus" . }}
Expand Down
2 changes: 1 addition & 1 deletion templates/definition/meter/eastron-sdm72v2_630.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ params:
- name: usage
choice: ["grid", "charge"]
- name: modbus
choice: ["rs485"]
choice: ["rtu"]
render: |
type: modbus
{{- include "modbus" . }}
Expand Down