From d81f0a05ba9a0f55eee6ab65eb60aefc4427003a Mon Sep 17 00:00:00 2001 From: Andreas Linde Date: Sat, 8 Oct 2022 10:17:05 +0200 Subject: [PATCH 1/4] Update Shelly 3em template Add energy values to charge usage --- templates/definition/meter/shelly-3em.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/definition/meter/shelly-3em.yaml b/templates/definition/meter/shelly-3em.yaml index 043d3569d..643d1b1c6 100644 --- a/templates/definition/meter/shelly-3em.yaml +++ b/templates/definition/meter/shelly-3em.yaml @@ -13,7 +13,7 @@ render: | source: http uri: http://{{ .host }}/status jq: .emeters | map(.power) | add - {{if eq .usage "grid" -}} + {{- if or (eq .usage "charge") (eq .usage "grid") }} energy: source: http uri: http://{{ .host }}/status From 58cb88b068d1148652a5eaa8683de656105132d5 Mon Sep 17 00:00:00 2001 From: Andreas Linde Date: Sat, 8 Oct 2022 13:38:21 +0200 Subject: [PATCH 2/4] Add Siemens 7KT1665 meter template MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Details taken from https://github.com/evcc-io/evcc/discussions/4210#discussioncomment-3827786 and https://github.com/evcc-io/evcc/discussions/4210#discussioncomment-3827841 Output verified with `—expand` against example in first link --- .../definition/meter/siemens-7kt1665.yaml | 59 +++++++++++ templates/docs/meter/siemens_0.yaml | 100 ++++++++++++++++++ 2 files changed, 159 insertions(+) create mode 100644 templates/definition/meter/siemens-7kt1665.yaml create mode 100644 templates/docs/meter/siemens_0.yaml diff --git a/templates/definition/meter/siemens-7kt1665.yaml b/templates/definition/meter/siemens-7kt1665.yaml new file mode 100644 index 000000000..9f82a3d5a --- /dev/null +++ b/templates/definition/meter/siemens-7kt1665.yaml @@ -0,0 +1,59 @@ +template: siemens +products: + - brand: Siemens + description: + generic: 7KT1665 +params: + - name: usage + choice: ["grid", "pv", "battery", "charge"] + - name: modbus + choice: ["rs485", "tcpip"] +render: | + type: custom + power: + source: modbus + {{- include "modbus" . | indent 2 }} + register: + address: 57 + type: input + decode: uint32 + scale: 0.01 + timeout: 5s + {{- if or (eq .usage "charge") (eq .usage "grid") }} + energy: + source: modbus + {{- include "modbus" . | indent 2 }} + register: + address: 6687 + type: input + decode: uint32 + scale: 0.001 + timeout: 5s + {{ end -}} + {{- if or (eq .usage "charge") (eq .usage "grid") }} + currents: + - source: modbus + {{- include "modbus" . | indent 2 }} + register: + address: 7 + type: input + decode: uint32 + scale: 0.0001 + timeout: 5s + - source: modbus + {{- include "modbus" . | indent 2 }} + register: + address: 9 + type: input + decode: uint32 + scale: 0.0001 + timeout: 5s + - source: modbus + {{- include "modbus" . | indent 2 }} + register: + address: 11 + type: input + decode: uint32 + scale: 0.0001 + timeout: 5s + {{ end -}} diff --git a/templates/docs/meter/siemens_0.yaml b/templates/docs/meter/siemens_0.yaml new file mode 100644 index 000000000..298e0cafc --- /dev/null +++ b/templates/docs/meter/siemens_0.yaml @@ -0,0 +1,100 @@ +product: + brand: Siemens + description: 7KT1665 +render: + - usage: grid + default: | + type: template + template: siemens + 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 + + # Modbus TCP + modbus: tcpip + id: 1 + host: 192.0.2.2 # Hostname + port: 502 # Port + - usage: pv + default: | + type: template + template: siemens + 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 + + # Modbus TCP + modbus: tcpip + id: 1 + host: 192.0.2.2 # Hostname + port: 502 # Port + - usage: battery + default: | + type: template + template: siemens + 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 + + # Modbus TCP + modbus: tcpip + id: 1 + host: 192.0.2.2 # Hostname + port: 502 # Port + - usage: charge + default: | + type: template + template: siemens + usage: charge + + # 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 + + # Modbus TCP + modbus: tcpip + id: 1 + host: 192.0.2.2 # Hostname + port: 502 # Port From 9ec63b4d91d64e3773a2d250970e69622451ff64 Mon Sep 17 00:00:00 2001 From: Andreas Linde Date: Sat, 8 Oct 2022 13:48:29 +0200 Subject: [PATCH 3/4] Template schema updates Some changes where not reflected in the schema --- templates/definition/devices-schema.json | 31 +++++++++--------------- 1 file changed, 12 insertions(+), 19 deletions(-) diff --git a/templates/definition/devices-schema.json b/templates/definition/devices-schema.json index 4960463c4..2d6f47c72 100644 --- a/templates/definition/devices-schema.json +++ b/templates/definition/devices-schema.json @@ -10,6 +10,12 @@ "template": { "$": "#/definitions/Template" }, + "covers": { + "type": "array", + "items": { + "type": "string" + } + }, "products": { "type": "array", "items": { @@ -19,8 +25,11 @@ "group": { "$ref": "#/definitions/Groups" }, - "guidedsetup": { - "$ref": "#/definitions/GuidedSetup" + "linked": { + "type": "array", + "items": { + "$ref": "#/definitions/Linked" + } }, "capabilities": { "type": "array", @@ -58,7 +67,7 @@ }, "required": ["name"], "title": "Template" - }, + }, "Product": { "type": "object", "additionalProperties": false, @@ -80,22 +89,6 @@ "type": "string", "enum": ["generic", "switchsockets", "scooter", "sockets"] }, - "GuidedSetup": { - "type": "object", - "additionalProperties": false, - "properties": { - "enable": { - "type": "boolean" - }, - "linked": { - "type": "array", - "items": { - "$ref": "#/definitions/Linked" - } - } - }, - "required": ["enable"] - }, "Linked": { "type": "object", "additionalProperties": false, From 117d454adccc8120f4684eac5fa7b22f00968912 Mon Sep 17 00:00:00 2001 From: Andreas Linde Date: Sat, 8 Oct 2022 14:53:58 +0200 Subject: [PATCH 4/4] Add info to Elli about RFID usage --- templates/definition/charger/elli-charger-connect.yaml | 4 ++++ templates/definition/charger/elli-charger-pro.yaml | 4 ++++ templates/docs/charger/elliconnect_0.yaml | 2 ++ templates/docs/charger/ellipro_0.yaml | 2 ++ 4 files changed, 12 insertions(+) diff --git a/templates/definition/charger/elli-charger-connect.yaml b/templates/definition/charger/elli-charger-connect.yaml index d748bfe08..ce1fdd6cd 100644 --- a/templates/definition/charger/elli-charger-connect.yaml +++ b/templates/definition/charger/elli-charger-connect.yaml @@ -11,10 +11,14 @@ requirements: de: | Dem Gerät muss eine feste IP Adresse zugewiesen sein (Manuell oder per DHCP). + Eine Identifikation des Fahrzeugs über die RFID Karte ist nicht möglich. + Die Unterstützung ist im Beta Stadium und es kann noch zu Problemen kommen! en: | The device has to have a fix IP address (manuall or via DHCP). + The identification of a vehicle using the RFID card is not possible. + The support is in beta state and problems can occur! params: - preset: eebusnometer diff --git a/templates/definition/charger/elli-charger-pro.yaml b/templates/definition/charger/elli-charger-pro.yaml index b7132e2b0..23c5c0b6f 100644 --- a/templates/definition/charger/elli-charger-pro.yaml +++ b/templates/definition/charger/elli-charger-pro.yaml @@ -11,10 +11,14 @@ requirements: de: | Dem Gerät muss eine feste IP Adresse zugewiesen sein (Manuell oder per DHCP). + Eine Identifikation des Fahrzeugs über die RFID Karte ist nicht möglich. + Die Unterstützung ist im Beta Stadium und es kann noch zu Problemen kommen! en: | The device has to have a fix IP address (manuall or via DHCP). + The identification of a vehicle using the RFID card is not possible. + The support is in beta state and problems can occur! params: - preset: eebusmeter diff --git a/templates/docs/charger/elliconnect_0.yaml b/templates/docs/charger/elliconnect_0.yaml index 7c75eb3b6..da07b9f1f 100644 --- a/templates/docs/charger/elliconnect_0.yaml +++ b/templates/docs/charger/elliconnect_0.yaml @@ -6,6 +6,8 @@ requirements: ["eebus"] description: | Dem Gerät muss eine feste IP Adresse zugewiesen sein (Manuell oder per DHCP). + Eine Identifikation des Fahrzeugs über die RFID Karte ist nicht möglich. + Die Unterstützung ist im Beta Stadium und es kann noch zu Problemen kommen! render: diff --git a/templates/docs/charger/ellipro_0.yaml b/templates/docs/charger/ellipro_0.yaml index 91a246387..fdba61039 100644 --- a/templates/docs/charger/ellipro_0.yaml +++ b/templates/docs/charger/ellipro_0.yaml @@ -6,6 +6,8 @@ requirements: ["eebus"] description: | Dem Gerät muss eine feste IP Adresse zugewiesen sein (Manuell oder per DHCP). + Eine Identifikation des Fahrzeugs über die RFID Karte ist nicht möglich. + Die Unterstützung ist im Beta Stadium und es kann noch zu Problemen kommen! render: