From cab9aeeb23566c62230980085746d9682b5c988e Mon Sep 17 00:00:00 2001 From: premultiply <4681172+premultiply@users.noreply.github.com> Date: Wed, 7 Aug 2024 19:12:59 +0000 Subject: [PATCH 01/20] wip --- templates/definition/charger/ocpp-abb-tac.yaml | 13 +++++++++++++ .../definition/charger/ocpp-alfen-eve.yaml | 11 +++++++++++ .../definition/charger/ocpp-eledio-go.yaml | 17 +++++++++++++++++ .../charger/ocpp-entratek-powerdot.yaml | 14 ++++++++++++++ .../definition/charger/ocpp-goe-charger.yaml | 17 +++++++++++++++++ templates/definition/charger/ocpp-template.yaml | 14 ++++++++++++++ .../definition/charger/ocpp-zaptec-go.yaml | 15 +++++++++++++++ 7 files changed, 101 insertions(+) create mode 100644 templates/definition/charger/ocpp-abb-tac.yaml create mode 100644 templates/definition/charger/ocpp-alfen-eve.yaml create mode 100644 templates/definition/charger/ocpp-eledio-go.yaml create mode 100644 templates/definition/charger/ocpp-entratek-powerdot.yaml create mode 100644 templates/definition/charger/ocpp-goe-charger.yaml create mode 100644 templates/definition/charger/ocpp-template.yaml create mode 100644 templates/definition/charger/ocpp-zaptec-go.yaml diff --git a/templates/definition/charger/ocpp-abb-tac.yaml b/templates/definition/charger/ocpp-abb-tac.yaml new file mode 100644 index 0000000000..b27970a0bd --- /dev/null +++ b/templates/definition/charger/ocpp-abb-tac.yaml @@ -0,0 +1,13 @@ +template: ocpp-abb-tac +products: + - brand: ABB + description: + generic: Terra AC [OCPP] +group: ocpp +capabilities: ["mA", "rfid"] +requirements: + description: + generic: https://library.e.abb.com/public/8f07987a3a284da6bf4e4f8f53cd6502/ABB_Terra_AC_Charger_OCPP1.6_ImplementationOverview%20_v1.8_FW1.6.6.pdf + evcc: ["sponsorship"] +render: | + {{ include "ocpp" . }} diff --git a/templates/definition/charger/ocpp-alfen-eve.yaml b/templates/definition/charger/ocpp-alfen-eve.yaml new file mode 100644 index 0000000000..bdbb4fa3b1 --- /dev/null +++ b/templates/definition/charger/ocpp-alfen-eve.yaml @@ -0,0 +1,11 @@ +template: ocpp-alfen-eve +products: + - brand: Alfen + description: + generic: Eve [OCPP] +group: ocpp +capabilities: ["mA", "rfid", "1p3p"] +requirements: + evcc: ["sponsorship"] +render: | + {{ include "ocpp" . }} diff --git a/templates/definition/charger/ocpp-eledio-go.yaml b/templates/definition/charger/ocpp-eledio-go.yaml new file mode 100644 index 0000000000..df64643a17 --- /dev/null +++ b/templates/definition/charger/ocpp-eledio-go.yaml @@ -0,0 +1,17 @@ +template: ocpp-enercab-smart +products: + - brand: enercab + description: + generic: smart [OCPP] + - brand: eledio + description: + generic: go [OCPP] +group: ocpp +capabilities: ["1p3p"] +requirements: + description: + generic: | + https://www.enercab.at/index.php?controller=attachment&id_attachment=311 + evcc: ["sponsorship"] +render: | + {{ include "ocpp" . }} diff --git a/templates/definition/charger/ocpp-entratek-powerdot.yaml b/templates/definition/charger/ocpp-entratek-powerdot.yaml new file mode 100644 index 0000000000..c97393ec88 --- /dev/null +++ b/templates/definition/charger/ocpp-entratek-powerdot.yaml @@ -0,0 +1,14 @@ +template: ocpp-entratek-powerdot +products: + - brand: EntraTek + description: + generic: Power Dot Fix [OCPP] + - brand: EntraTek + description: + generic: Power Dot Pro 2 [OCPP] +group: ocpp +capabilities: ["rfid"] +requirements: + evcc: ["sponsorship"] +render: | + {{ include "ocpp" . }} diff --git a/templates/definition/charger/ocpp-goe-charger.yaml b/templates/definition/charger/ocpp-goe-charger.yaml new file mode 100644 index 0000000000..d0bb20d40d --- /dev/null +++ b/templates/definition/charger/ocpp-goe-charger.yaml @@ -0,0 +1,17 @@ +template: ocpp-goe-charger +products: + - brand: go-e + description: + generic: Charger V3 [OCPP] + - brand: go-e + description: + generic: Charger Gemini [OCPP] + - brand: go-e + description: + generic: Charger PRO [OCPP] +group: ocpp +capabilities: ["rfid", "1p3p"] +requirements: + evcc: ["sponsorship"] +render: | + {{ include "ocpp" . }} diff --git a/templates/definition/charger/ocpp-template.yaml b/templates/definition/charger/ocpp-template.yaml new file mode 100644 index 0000000000..d611d7ec9f --- /dev/null +++ b/templates/definition/charger/ocpp-template.yaml @@ -0,0 +1,14 @@ +template: ocpp- +products: + - brand: Vendor + description: + generic: Model +group: ocpp +capabilities: ["mA", "rfid", "1p3p"] +requirements: + description: + de: + en: + evcc: ["sponsorship"] +render: | + {{ include "ocpp" . }} diff --git a/templates/definition/charger/ocpp-zaptec-go.yaml b/templates/definition/charger/ocpp-zaptec-go.yaml new file mode 100644 index 0000000000..9c134b48fe --- /dev/null +++ b/templates/definition/charger/ocpp-zaptec-go.yaml @@ -0,0 +1,15 @@ +template: ocpp-zaptec-go +products: + - brand: Zaptec + description: + generic: Go [OCPP] +group: ocpp +capabilities: ["rfid"] +requirements: + description: + generic: | + * OCPP Native mode + https://help.zaptec.com/hc/en-001/articles/22330328601489-Zaptec-Go-OCPP-Native-configuration-guide#h_01HP261F5NP6Z9VY0MVHJCZEBJ + evcc: ["sponsorship"] +render: | + {{ include "ocpp" . }} From 1d9e1ac2ecd15caab2a3e692643de31fdbe6d819 Mon Sep 17 00:00:00 2001 From: premultiply <4681172+premultiply@users.noreply.github.com> Date: Wed, 7 Aug 2024 19:16:21 +0000 Subject: [PATCH 02/20] wip --- templates/definition/charger/ocpp-template.yaml | 14 -------------- 1 file changed, 14 deletions(-) delete mode 100644 templates/definition/charger/ocpp-template.yaml diff --git a/templates/definition/charger/ocpp-template.yaml b/templates/definition/charger/ocpp-template.yaml deleted file mode 100644 index d611d7ec9f..0000000000 --- a/templates/definition/charger/ocpp-template.yaml +++ /dev/null @@ -1,14 +0,0 @@ -template: ocpp- -products: - - brand: Vendor - description: - generic: Model -group: ocpp -capabilities: ["mA", "rfid", "1p3p"] -requirements: - description: - de: - en: - evcc: ["sponsorship"] -render: | - {{ include "ocpp" . }} From 821de35c356c747382240c59bf7d5f056a8596b2 Mon Sep 17 00:00:00 2001 From: premultiply <4681172+premultiply@users.noreply.github.com> Date: Thu, 8 Aug 2024 16:46:57 +0200 Subject: [PATCH 03/20] wip --- templates/definition/charger/ocpp-goe-charger.yaml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/templates/definition/charger/ocpp-goe-charger.yaml b/templates/definition/charger/ocpp-goe-charger.yaml index d0bb20d40d..7c3e011b95 100644 --- a/templates/definition/charger/ocpp-goe-charger.yaml +++ b/templates/definition/charger/ocpp-goe-charger.yaml @@ -9,7 +9,9 @@ products: - brand: go-e description: generic: Charger PRO [OCPP] -group: ocpp + - brand: Fronius + description: + generic: Wattpilot [OCPP] capabilities: ["rfid", "1p3p"] requirements: evcc: ["sponsorship"] From e9267084cb9d469f35a8b8d91eb768e5c541a07d Mon Sep 17 00:00:00 2001 From: premultiply <4681172+premultiply@users.noreply.github.com> Date: Thu, 8 Aug 2024 16:47:40 +0200 Subject: [PATCH 04/20] wip --- templates/definition/charger/ocpp-abb-tac.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/templates/definition/charger/ocpp-abb-tac.yaml b/templates/definition/charger/ocpp-abb-tac.yaml index b27970a0bd..f42beb2814 100644 --- a/templates/definition/charger/ocpp-abb-tac.yaml +++ b/templates/definition/charger/ocpp-abb-tac.yaml @@ -3,7 +3,6 @@ products: - brand: ABB description: generic: Terra AC [OCPP] -group: ocpp capabilities: ["mA", "rfid"] requirements: description: From 1c88a13d737bdf508515536a94df0f4983373836 Mon Sep 17 00:00:00 2001 From: premultiply <4681172+premultiply@users.noreply.github.com> Date: Thu, 8 Aug 2024 16:48:13 +0200 Subject: [PATCH 05/20] wip --- templates/definition/charger/ocpp-alfen-eve.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/templates/definition/charger/ocpp-alfen-eve.yaml b/templates/definition/charger/ocpp-alfen-eve.yaml index bdbb4fa3b1..36b8183805 100644 --- a/templates/definition/charger/ocpp-alfen-eve.yaml +++ b/templates/definition/charger/ocpp-alfen-eve.yaml @@ -3,7 +3,6 @@ products: - brand: Alfen description: generic: Eve [OCPP] -group: ocpp capabilities: ["mA", "rfid", "1p3p"] requirements: evcc: ["sponsorship"] From d63b9a3341824e9169d35b172e29d4553c1a8d3a Mon Sep 17 00:00:00 2001 From: premultiply <4681172+premultiply@users.noreply.github.com> Date: Thu, 8 Aug 2024 16:48:55 +0200 Subject: [PATCH 06/20] wip --- templates/definition/charger/ocpp-eledio-go.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/templates/definition/charger/ocpp-eledio-go.yaml b/templates/definition/charger/ocpp-eledio-go.yaml index df64643a17..5951c330a8 100644 --- a/templates/definition/charger/ocpp-eledio-go.yaml +++ b/templates/definition/charger/ocpp-eledio-go.yaml @@ -6,7 +6,6 @@ products: - brand: eledio description: generic: go [OCPP] -group: ocpp capabilities: ["1p3p"] requirements: description: From 846779ce26de418ddee9d18a718d0e5535d8ec88 Mon Sep 17 00:00:00 2001 From: premultiply <4681172+premultiply@users.noreply.github.com> Date: Thu, 8 Aug 2024 16:49:38 +0200 Subject: [PATCH 07/20] wip --- templates/definition/charger/ocpp-entratek-powerdot.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/templates/definition/charger/ocpp-entratek-powerdot.yaml b/templates/definition/charger/ocpp-entratek-powerdot.yaml index c97393ec88..ba646ae159 100644 --- a/templates/definition/charger/ocpp-entratek-powerdot.yaml +++ b/templates/definition/charger/ocpp-entratek-powerdot.yaml @@ -6,7 +6,6 @@ products: - brand: EntraTek description: generic: Power Dot Pro 2 [OCPP] -group: ocpp capabilities: ["rfid"] requirements: evcc: ["sponsorship"] From 1d150339c7a6e9c7b8e447cf357a7a360653ef48 Mon Sep 17 00:00:00 2001 From: premultiply <4681172+premultiply@users.noreply.github.com> Date: Thu, 8 Aug 2024 16:51:04 +0200 Subject: [PATCH 08/20] wip --- templates/definition/charger/ocpp-zaptec-go.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/templates/definition/charger/ocpp-zaptec-go.yaml b/templates/definition/charger/ocpp-zaptec-go.yaml index 9c134b48fe..ac33e0487a 100644 --- a/templates/definition/charger/ocpp-zaptec-go.yaml +++ b/templates/definition/charger/ocpp-zaptec-go.yaml @@ -3,7 +3,6 @@ products: - brand: Zaptec description: generic: Go [OCPP] -group: ocpp capabilities: ["rfid"] requirements: description: From 5b31b2147099b718181afbfc8f68594fe6f0bf46 Mon Sep 17 00:00:00 2001 From: premultiply <4681172+premultiply@users.noreply.github.com> Date: Thu, 8 Aug 2024 15:06:47 +0000 Subject: [PATCH 09/20] wip --- templates/definition/charger/ocpp-sungrow-ac.yaml | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 templates/definition/charger/ocpp-sungrow-ac.yaml diff --git a/templates/definition/charger/ocpp-sungrow-ac.yaml b/templates/definition/charger/ocpp-sungrow-ac.yaml new file mode 100644 index 0000000000..074a4aed14 --- /dev/null +++ b/templates/definition/charger/ocpp-sungrow-ac.yaml @@ -0,0 +1,10 @@ +template: ocpp-sungrow-ac +products: + - brand: Sungrow + description: + generic: AC011E [OCPP] +capabilities: ["mA", "rfid"] +requirements: + evcc: ["sponsorship"] +render: | + {{ include "ocpp" . }} From 98c8a6279091f1109082b7f97cc636ce34bda495 Mon Sep 17 00:00:00 2001 From: Michael Geers Date: Fri, 9 Aug 2024 20:58:40 +0200 Subject: [PATCH 10/20] add protocol field to template; add requirements (sponsor, description) and protocol support to presets --- assets/js/components/Config/VehicleModal.vue | 17 +++++++++--- server/http_config_metadata_handler.go | 1 + server/product.go | 1 + templates/definition/charger/abb.yaml | 1 + templates/definition/charger/alfen.yaml | 1 + templates/definition/charger/cfos.yaml | 5 +++- .../definition/charger/daheimladen-mb.yaml | 3 ++- .../definition/charger/fronius-wattpilot.yaml | 1 + templates/definition/charger/go-e-v3.yaml | 9 ++++++- templates/definition/charger/go-e.yaml | 6 ++++- .../definition/charger/ocpp-abb-tac.yaml | 5 ++-- .../definition/charger/ocpp-alfen-eve.yaml | 6 ++--- .../definition/charger/ocpp-eledio-go.yaml | 7 ++--- .../charger/ocpp-entratek-powerdot.yaml | 8 +++--- .../definition/charger/ocpp-goe-charger.yaml | 12 ++++----- .../definition/charger/ocpp-homecharge.yaml | 2 +- .../definition/charger/ocpp-pulsarplus.yaml | 13 ++++++++- .../definition/charger/ocpp-sungrow-ac.yaml | 6 ++--- .../definition/charger/ocpp-zaptec-go.yaml | 8 +++--- templates/definition/charger/zaptec.yaml | 6 ++++- templates/definition/vehicle/seat-cupra.yaml | 2 +- templates/definition/vehicle/seat.yaml | 8 +++++- util/templates/defaults.go | 4 ++- util/templates/defaults.yaml | 5 ++++ util/templates/documentation.go | 1 + util/templates/documentation.tpl | 3 +++ util/templates/template.go | 27 +++++++++++++++++-- util/templates/types.go | 12 +++++++++ 28 files changed, 141 insertions(+), 39 deletions(-) diff --git a/assets/js/components/Config/VehicleModal.vue b/assets/js/components/Config/VehicleModal.vue index 8de376eff4..016d414495 100644 --- a/assets/js/components/Config/VehicleModal.vue +++ b/assets/js/components/Config/VehicleModal.vue @@ -299,11 +299,22 @@ export default { }; }, computed: { + uniqueProducts() { + // add protocol to name if multiple products with same name exist + // TODO: add this logic to all devices (charger, meter, ...) + const names = this.products.map((p) => p.name); + return this.products.map((p) => { + if (names.filter((n) => n === p.name).length > 1 && p.protocol) { + return { ...p, name: `${p.name} (${p.protocol})` }; + } + return p; + }); + }, templateOptions() { return { - online: this.products.filter((p) => !p.group && p.template !== "offline"), - generic: this.products.filter((p) => p.group === "generic"), - scooter: this.products.filter((p) => p.group === "scooter"), + online: this.uniqueProducts.filter((p) => !p.group && p.template !== "offline"), + generic: this.uniqueProducts.filter((p) => p.group === "generic"), + scooter: this.uniqueProducts.filter((p) => p.group === "scooter"), }; }, templateParams() { diff --git a/server/http_config_metadata_handler.go b/server/http_config_metadata_handler.go index a588870011..637569516d 100644 --- a/server/http_config_metadata_handler.go +++ b/server/http_config_metadata_handler.go @@ -82,6 +82,7 @@ func productsHandler(w http.ResponseWriter, r *http.Request) { Name: p.Title(lang), Template: t.TemplateDefinition.Template, Group: t.Group, + Protocol: t.Protocol, }) } } diff --git a/server/product.go b/server/product.go index 2ba4f3c512..bc03e15149 100644 --- a/server/product.go +++ b/server/product.go @@ -4,6 +4,7 @@ type product struct { Name string `json:"name"` Template string `json:"template"` Group string `json:"group,omitempty"` + Protocol string `json:"protocol,omitempty"` } type products []product diff --git a/templates/definition/charger/abb.yaml b/templates/definition/charger/abb.yaml index 0ddc3fbb1b..5768c2ac50 100644 --- a/templates/definition/charger/abb.yaml +++ b/templates/definition/charger/abb.yaml @@ -1,4 +1,5 @@ template: abb +protocol: modbus products: - brand: ABB description: diff --git a/templates/definition/charger/alfen.yaml b/templates/definition/charger/alfen.yaml index 2be02e9dc5..ab50177dc4 100644 --- a/templates/definition/charger/alfen.yaml +++ b/templates/definition/charger/alfen.yaml @@ -1,4 +1,5 @@ template: alfen +protocol: modbus products: - brand: Alfen description: diff --git a/templates/definition/charger/cfos.yaml b/templates/definition/charger/cfos.yaml index e66ff82f38..e9f290f789 100644 --- a/templates/definition/charger/cfos.yaml +++ b/templates/definition/charger/cfos.yaml @@ -2,7 +2,10 @@ template: cfos products: - brand: cFos description: - generic: Power Brain, Power Brain Solar + generic: Power Brain + - brand: cFos + description: + generic: Power Brain Solar capabilities: ["mA", "rfid", "1p3p"] requirements: description: diff --git a/templates/definition/charger/daheimladen-mb.yaml b/templates/definition/charger/daheimladen-mb.yaml index bbda1aee95..668be32a85 100644 --- a/templates/definition/charger/daheimladen-mb.yaml +++ b/templates/definition/charger/daheimladen-mb.yaml @@ -1,8 +1,9 @@ template: daheimladen-mb +protocol: modbus products: - brand: DaheimLaden description: - generic: Wallbox (via ModbusTCP) + generic: Wallbox requirements: description: de: Die Wallbox muss über eine aktuelle Firmware mit Modbus-Unterstützung verfügen. In den Einstellungen muss "Nachladen" (Smart) bzw. "RSDA" (Touch) aktiviert sein diff --git a/templates/definition/charger/fronius-wattpilot.yaml b/templates/definition/charger/fronius-wattpilot.yaml index 90f7eac343..622794f8a7 100644 --- a/templates/definition/charger/fronius-wattpilot.yaml +++ b/templates/definition/charger/fronius-wattpilot.yaml @@ -1,4 +1,5 @@ template: fronius-wattpilot +protocol: localapi products: - brand: Fronius description: diff --git a/templates/definition/charger/go-e-v3.yaml b/templates/definition/charger/go-e-v3.yaml index af427d079b..0b7994a57c 100644 --- a/templates/definition/charger/go-e-v3.yaml +++ b/templates/definition/charger/go-e-v3.yaml @@ -1,9 +1,16 @@ template: go-e-v3 +protocol: localapi covers: ["go-e-gemini"] products: - brand: go-e description: - generic: Charger Gemini, HOME+, HOMEfix (V3) + generic: Charger Gemini + - brand: go-e + description: + generic: Charger HOME+ + - brand: go-e + description: + generic: Charger V3 capabilities: ["1p3p", "rfid"] requirements: description: diff --git a/templates/definition/charger/go-e.yaml b/templates/definition/charger/go-e.yaml index 8792565384..81e3fd12c7 100644 --- a/templates/definition/charger/go-e.yaml +++ b/templates/definition/charger/go-e.yaml @@ -1,8 +1,12 @@ template: go-e +protocol: localapi products: - brand: go-e description: - generic: Charger HOME+, HOMEfix, Pro + generic: Charger HOMEfix + - brand: go-e + description: + generic: Charger PRO capabilities: ["rfid"] requirements: description: diff --git a/templates/definition/charger/ocpp-abb-tac.yaml b/templates/definition/charger/ocpp-abb-tac.yaml index f42beb2814..19ff636ae5 100644 --- a/templates/definition/charger/ocpp-abb-tac.yaml +++ b/templates/definition/charger/ocpp-abb-tac.yaml @@ -2,11 +2,12 @@ template: ocpp-abb-tac products: - brand: ABB description: - generic: Terra AC [OCPP] + generic: Terra AC capabilities: ["mA", "rfid"] requirements: description: generic: https://library.e.abb.com/public/8f07987a3a284da6bf4e4f8f53cd6502/ABB_Terra_AC_Charger_OCPP1.6_ImplementationOverview%20_v1.8_FW1.6.6.pdf - evcc: ["sponsorship"] +params: + - preset: ocpp render: | {{ include "ocpp" . }} diff --git a/templates/definition/charger/ocpp-alfen-eve.yaml b/templates/definition/charger/ocpp-alfen-eve.yaml index 36b8183805..3a7c2dc0d6 100644 --- a/templates/definition/charger/ocpp-alfen-eve.yaml +++ b/templates/definition/charger/ocpp-alfen-eve.yaml @@ -2,9 +2,9 @@ template: ocpp-alfen-eve products: - brand: Alfen description: - generic: Eve [OCPP] + generic: Eve capabilities: ["mA", "rfid", "1p3p"] -requirements: - evcc: ["sponsorship"] +params: + - preset: ocpp render: | {{ include "ocpp" . }} diff --git a/templates/definition/charger/ocpp-eledio-go.yaml b/templates/definition/charger/ocpp-eledio-go.yaml index 5951c330a8..2b07ebd3d0 100644 --- a/templates/definition/charger/ocpp-eledio-go.yaml +++ b/templates/definition/charger/ocpp-eledio-go.yaml @@ -2,15 +2,16 @@ template: ocpp-enercab-smart products: - brand: enercab description: - generic: smart [OCPP] + generic: smart - brand: eledio description: - generic: go [OCPP] + generic: go capabilities: ["1p3p"] requirements: description: generic: | https://www.enercab.at/index.php?controller=attachment&id_attachment=311 - evcc: ["sponsorship"] +params: + - preset: ocpp render: | {{ include "ocpp" . }} diff --git a/templates/definition/charger/ocpp-entratek-powerdot.yaml b/templates/definition/charger/ocpp-entratek-powerdot.yaml index ba646ae159..ec900ebaf7 100644 --- a/templates/definition/charger/ocpp-entratek-powerdot.yaml +++ b/templates/definition/charger/ocpp-entratek-powerdot.yaml @@ -2,12 +2,12 @@ template: ocpp-entratek-powerdot products: - brand: EntraTek description: - generic: Power Dot Fix [OCPP] + generic: Power Dot Fix - brand: EntraTek description: - generic: Power Dot Pro 2 [OCPP] + generic: Power Dot Pro 2 capabilities: ["rfid"] -requirements: - evcc: ["sponsorship"] +params: + - preset: ocpp render: | {{ include "ocpp" . }} diff --git a/templates/definition/charger/ocpp-goe-charger.yaml b/templates/definition/charger/ocpp-goe-charger.yaml index 7c3e011b95..56bbfaa80b 100644 --- a/templates/definition/charger/ocpp-goe-charger.yaml +++ b/templates/definition/charger/ocpp-goe-charger.yaml @@ -2,18 +2,18 @@ template: ocpp-goe-charger products: - brand: go-e description: - generic: Charger V3 [OCPP] + generic: Charger V3 - brand: go-e description: - generic: Charger Gemini [OCPP] + generic: Charger Gemini - brand: go-e description: - generic: Charger PRO [OCPP] + generic: Charger PRO - brand: Fronius description: - generic: Wattpilot [OCPP] + generic: Wattpilot capabilities: ["rfid", "1p3p"] -requirements: - evcc: ["sponsorship"] +params: + - preset: ocpp render: | {{ include "ocpp" . }} diff --git a/templates/definition/charger/ocpp-homecharge.yaml b/templates/definition/charger/ocpp-homecharge.yaml index 162535ed49..f2bcdd5fc2 100644 --- a/templates/definition/charger/ocpp-homecharge.yaml +++ b/templates/definition/charger/ocpp-homecharge.yaml @@ -2,7 +2,7 @@ template: homecharge products: - brand: Homecharge description: - generic: Homecharger HC11L, HC22L + generic: HC11L, HC22L requirements: description: de: | diff --git a/templates/definition/charger/ocpp-pulsarplus.yaml b/templates/definition/charger/ocpp-pulsarplus.yaml index 9df311b40f..27572e3702 100644 --- a/templates/definition/charger/ocpp-pulsarplus.yaml +++ b/templates/definition/charger/ocpp-pulsarplus.yaml @@ -2,11 +2,21 @@ template: pulsarplus products: - brand: wallbox description: - generic: Pulsar Plus, Pulsar Max, Commander 2, Copper SB + generic: Pulsar Plus + - brand: wallbox + description: + generic: Pulsar Max + - brand: wallbox + description: + generic: Commander 2 + - brand: wallbox + description: + generic: Copper SB requirements: description: de: | Anleitung: https://support.wallbox.com/en/knowledge-base/ocpp-activation-and-setup-guide/ + * “OCPP aktivieren” (myWallbox app) bzw. den “OCPP-WebSocket-Verbindung” Schalter (myWallbox Portal) aktivieren * Zusätzlich die “Verbesserte Ladegerätsteuerung” (Profil -> Experimentelle Funktionen) einschalten (myWallbox app) * URL: ws://[evcc-adresse]:8887/ (Verbindung über das lokale Netzwerk) @@ -14,6 +24,7 @@ requirements: * Passwort: leer lassen en: | Setup Guide: https://support.wallbox.com/en/knowledge-base/ocpp-activation-and-setup-guide/ + * Switch on “Enable OCPP” (myWallbox app) or enable the “OCPP WebSocket connection” switch (myWallbox Portal) * Enable “Improved charger control” (Profile -> Experimental functions) (myWallbox app) * URL: ws://[evcc-adresse]:8887/ (local network connection) diff --git a/templates/definition/charger/ocpp-sungrow-ac.yaml b/templates/definition/charger/ocpp-sungrow-ac.yaml index 074a4aed14..1ef3eae35f 100644 --- a/templates/definition/charger/ocpp-sungrow-ac.yaml +++ b/templates/definition/charger/ocpp-sungrow-ac.yaml @@ -2,9 +2,9 @@ template: ocpp-sungrow-ac products: - brand: Sungrow description: - generic: AC011E [OCPP] + generic: AC011E capabilities: ["mA", "rfid"] -requirements: - evcc: ["sponsorship"] +params: + - preset: ocpp render: | {{ include "ocpp" . }} diff --git a/templates/definition/charger/ocpp-zaptec-go.yaml b/templates/definition/charger/ocpp-zaptec-go.yaml index ac33e0487a..c6c03fc399 100644 --- a/templates/definition/charger/ocpp-zaptec-go.yaml +++ b/templates/definition/charger/ocpp-zaptec-go.yaml @@ -2,13 +2,15 @@ template: ocpp-zaptec-go products: - brand: Zaptec description: - generic: Go [OCPP] + generic: Go capabilities: ["rfid"] requirements: description: generic: | - * OCPP Native mode + OCPP Native mode + https://help.zaptec.com/hc/en-001/articles/22330328601489-Zaptec-Go-OCPP-Native-configuration-guide#h_01HP261F5NP6Z9VY0MVHJCZEBJ - evcc: ["sponsorship"] +params: + - preset: ocpp render: | {{ include "ocpp" . }} diff --git a/templates/definition/charger/zaptec.yaml b/templates/definition/charger/zaptec.yaml index 87564d2b50..95e7d6245b 100644 --- a/templates/definition/charger/zaptec.yaml +++ b/templates/definition/charger/zaptec.yaml @@ -1,8 +1,12 @@ template: zaptec +protocol: localapi products: - brand: Zaptec description: - generic: Go, Pro + generic: Go + - brand: Zaptec + description: + generic: Pro requirements: evcc: ["sponsorship"] params: diff --git a/templates/definition/vehicle/seat-cupra.yaml b/templates/definition/vehicle/seat-cupra.yaml index aacb774a8d..ef8836c721 100644 --- a/templates/definition/vehicle/seat-cupra.yaml +++ b/templates/definition/vehicle/seat-cupra.yaml @@ -2,7 +2,7 @@ template: cupra products: - brand: Seat description: - generic: CupraConnect Gen4 (Born) + generic: Born params: - preset: vehicle-base - preset: vehicle-identify diff --git a/templates/definition/vehicle/seat.yaml b/templates/definition/vehicle/seat.yaml index c96cc2b059..40d08693c9 100644 --- a/templates/definition/vehicle/seat.yaml +++ b/templates/definition/vehicle/seat.yaml @@ -2,7 +2,13 @@ template: seat products: - brand: Seat description: - generic: CupraConnect Gen3 (Ateca, Leon, Formentor) + generic: Ateca + - brand: Seat + description: + generic: Leon + - brand: Seat + description: + generic: Formentor params: - preset: vehicle-base - preset: vehicle-identify diff --git a/util/templates/defaults.go b/util/templates/defaults.go index 82f58579b3..fbc98aa1e2 100644 --- a/util/templates/defaults.go +++ b/util/templates/defaults.go @@ -13,7 +13,9 @@ var defaults []byte type configDefaults struct { Params []Param // Default values for common parameters Presets map[string]struct { - Params []Param + Params []Param + Protocol string + Requirements Requirements } Modbus struct { // Details about possible ModbusInterfaces and ModbusConnectionTypes Interfaces map[string][]string // Information about physical modbus interface types (rs485, tcpip) diff --git a/util/templates/defaults.yaml b/util/templates/defaults.yaml index 79f29d9360..00dbd0846c 100644 --- a/util/templates/defaults.yaml +++ b/util/templates/defaults.yaml @@ -346,6 +346,7 @@ presets: de: Zusätzlicher prozentualer Aufschlag (z.B. 0.2 für 20%) en: Additional percentage charge (e.g. 0.2 for 20%) eebus: + protocol: eebus params: - name: ski help: @@ -372,6 +373,9 @@ presets: - name: icon advanced: true ocpp: + protocol: ocpp + requirements: + evcc: ["sponsorship"] params: - name: stationid type: string @@ -404,6 +408,7 @@ presets: default: 2m mqtt: + protocol: mqtt params: - name: host help: diff --git a/util/templates/documentation.go b/util/templates/documentation.go index c041af521b..6ec9ef08a7 100644 --- a/util/templates/documentation.go +++ b/util/templates/documentation.go @@ -96,6 +96,7 @@ func (t *Template) RenderDocumentation(product Product, lang string) ([]byte, er "ProductGroup": t.GroupTitle(lang), "Capabilities": t.Capabilities, "Requirements": t.Requirements.EVCC, + "Protocol": t.Protocol, "RequirementDescription": t.Requirements.Description.String(lang), "Params": filteredParams, "AdvancedParams": hasAdvancedParams, diff --git a/util/templates/documentation.tpl b/util/templates/documentation.tpl index 3450ee07bd..c11ebbefa6 100644 --- a/util/templates/documentation.tpl +++ b/util/templates/documentation.tpl @@ -49,6 +49,9 @@ product: {{- if .ProductGroup }} group: {{ .ProductGroup }} {{- end }} +{{- if .Protocol }} +protocol: {{ .Protocol }} +{{- end }} {{- if .Capabilities }} capabilities: ["{{ join "\", \"" .Capabilities }}"] {{- end }} diff --git a/util/templates/template.go b/util/templates/template.go index b982a8f291..589f02a9ca 100644 --- a/util/templates/template.go +++ b/util/templates/template.go @@ -42,16 +42,20 @@ func (t *Template) UpdateParamsWithDefaults() error { func (t *Template) Validate() error { for _, c := range t.Capabilities { if !slices.Contains(ValidCapabilities, c) { - return fmt.Errorf("invalid capability '%s' in template %s", c, t.Template) + return fmt.Errorf("invalid capability '%s' in template %s. valid options: %s", c, t.Template, ValidCapabilities) } } for _, r := range t.Requirements.EVCC { if !slices.Contains(ValidRequirements, r) { - return fmt.Errorf("invalid requirement '%s' in template %s", r, t.Template) + return fmt.Errorf("invalid requirement '%s' in template %s. valid options: %s", r, t.Template, ValidCapabilities) } } + if t.Protocol != "" && !slices.Contains(ValidProtocols, t.Protocol) { + return fmt.Errorf("invalid protocol '%s' in template %s. valid options: %s", t.Protocol, t.Template, ValidProtocols) + } + for _, p := range t.Params { switch p.Name { case ParamUsage: @@ -119,7 +123,26 @@ func (t *Template) ResolvePresets() error { return fmt.Errorf("could not find preset definition: %s", p.Preset) } + // add preset params t.Params = append(t.Params, base.Params...) + + // apply protocol if not already set + if t.Protocol == "" && base.Protocol != "" { + t.Protocol = base.Protocol + } + + // set description if not already set + if t.Requirements.Description.DE == "" && t.Requirements.Description.EN == "" && t.Requirements.Description.Generic == "" { + t.Requirements.Description = base.Requirements.Description + } + + // append requirements if not already present + for _, r := range base.Requirements.EVCC { + if !slices.Contains(t.Requirements.EVCC, r) { + t.Requirements.EVCC = append(t.Requirements.EVCC, r) + } + } + continue } diff --git a/util/templates/types.go b/util/templates/types.go index c95838f588..c80ea91c1c 100644 --- a/util/templates/types.go +++ b/util/templates/types.go @@ -60,6 +60,17 @@ const ( var ValidRequirements = []string{RequirementEEBUS, RequirementMQTT, RequirementSponsorship} +const ( + ProtocolOCPP = "ocpp" // Open Charge Point Protocol + ProtocolLocalApi = "localapi" // local vendor-specific API + ProtocolCloudApi = "cloudapi" // cloud-based vendor API + ProtocolModbus = "modbus" // Modbus RTU or TCP + ProtocolMQTT = "mqtt" // MQTT + ProtocolEEBUS = "eebus" // EEBUS +) + +var ValidProtocols = []string{ProtocolOCPP, ProtocolLocalApi, ProtocolCloudApi, ProtocolModbus, ProtocolMQTT, ProtocolEEBUS} + var predefinedTemplateProperties = []string{ "type", "template", "name", ModbusParamNameId, ModbusParamNameDevice, ModbusParamNameBaudrate, ModbusParamNameComset, @@ -246,6 +257,7 @@ type TemplateDefinition struct { Group string `json:",omitempty"` // the group this template belongs to, references groupList entries Covers []string `json:",omitempty"` // list of covered outdated template names Products []Product `json:",omitempty"` // list of products this template is compatible with + Protocol string `json:",omitempty"` // communication protocol used in this template. used do differentiate templates for the same device Capabilities []string `json:",omitempty"` Requirements Requirements `json:"-"` Linked []LinkedTemplate `json:",omitempty"` // a list of templates that should be processed as part of the guided setup From bada07e331e9d4ceb40bb4b888124acd507a91bb Mon Sep 17 00:00:00 2001 From: premultiply <4681172+premultiply@users.noreply.github.com> Date: Tue, 13 Aug 2024 08:53:44 +0000 Subject: [PATCH 11/20] remove dup --- templates/definition/charger/ocpp-fronius-wattpilot.yaml | 9 --------- 1 file changed, 9 deletions(-) delete mode 100644 templates/definition/charger/ocpp-fronius-wattpilot.yaml diff --git a/templates/definition/charger/ocpp-fronius-wattpilot.yaml b/templates/definition/charger/ocpp-fronius-wattpilot.yaml deleted file mode 100644 index 11657c6484..0000000000 --- a/templates/definition/charger/ocpp-fronius-wattpilot.yaml +++ /dev/null @@ -1,9 +0,0 @@ -template: ocpp-fronius-wattpilot -products: - - brand: Fronius - description: - generic: Wattpilot (OCPP) -params: - - preset: ocpp -render: | - {{ include "ocpp" . }} From 1cd31ebb8a5a2e776ec84623bfa42b33d7fff471 Mon Sep 17 00:00:00 2001 From: premultiply <4681172+premultiply@users.noreply.github.com> Date: Wed, 14 Aug 2024 14:17:26 +0000 Subject: [PATCH 12/20] covers wattpilot --- templates/definition/charger/ocpp-goe-charger.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/templates/definition/charger/ocpp-goe-charger.yaml b/templates/definition/charger/ocpp-goe-charger.yaml index 56bbfaa80b..13233d024c 100644 --- a/templates/definition/charger/ocpp-goe-charger.yaml +++ b/templates/definition/charger/ocpp-goe-charger.yaml @@ -1,4 +1,5 @@ template: ocpp-goe-charger +covers: ["ocpp-fronius-wattpilot"] products: - brand: go-e description: From 0c899c3842b587972b499c8ba3c8ea191eff40bf Mon Sep 17 00:00:00 2001 From: premultiply <4681172+premultiply@users.noreply.github.com> Date: Sun, 18 Aug 2024 12:31:11 +0000 Subject: [PATCH 13/20] add chargers --- templates/definition/charger/ocpp-autoaid.yaml | 13 +++++++++++++ templates/definition/charger/ocpp-beny-bcp.yaml | 10 ++++++++++ .../definition/charger/ocpp-chargeamps-halo.yaml | 10 ++++++++++ templates/definition/charger/ocpp-enplus.yaml | 10 ++++++++++ 4 files changed, 43 insertions(+) create mode 100644 templates/definition/charger/ocpp-autoaid.yaml create mode 100644 templates/definition/charger/ocpp-beny-bcp.yaml create mode 100644 templates/definition/charger/ocpp-chargeamps-halo.yaml create mode 100644 templates/definition/charger/ocpp-enplus.yaml diff --git a/templates/definition/charger/ocpp-autoaid.yaml b/templates/definition/charger/ocpp-autoaid.yaml new file mode 100644 index 0000000000..189d6f6f16 --- /dev/null +++ b/templates/definition/charger/ocpp-autoaid.yaml @@ -0,0 +1,13 @@ +template: ocpp-autoaid +products: + - brand: Autoaid + description: + generic: Intelligent Wallbox + - brand: Autoaid + description: + generic: Business Wallbox +capabilities: ["rfid"] +params: + - preset: ocpp +render: | + {{ include "ocpp" . }} diff --git a/templates/definition/charger/ocpp-beny-bcp.yaml b/templates/definition/charger/ocpp-beny-bcp.yaml new file mode 100644 index 0000000000..8f51ffc5ad --- /dev/null +++ b/templates/definition/charger/ocpp-beny-bcp.yaml @@ -0,0 +1,10 @@ +template: ocpp-beny-bcp +products: + - brand: ZJ Beny + description: + generic: BCP EV charger +capabilities: ["rfid"] +params: + - preset: ocpp +render: | + {{ include "ocpp" . }} diff --git a/templates/definition/charger/ocpp-chargeamps-halo.yaml b/templates/definition/charger/ocpp-chargeamps-halo.yaml new file mode 100644 index 0000000000..1fb89a3267 --- /dev/null +++ b/templates/definition/charger/ocpp-chargeamps-halo.yaml @@ -0,0 +1,10 @@ +template: ocpp-chargeamps-halo +products: + - brand: Charge Amps + description: + generic: Halo +capabilities: ["rfid"] +params: + - preset: ocpp +render: | + {{ include "ocpp" . }} diff --git a/templates/definition/charger/ocpp-enplus.yaml b/templates/definition/charger/ocpp-enplus.yaml new file mode 100644 index 0000000000..32303450cd --- /dev/null +++ b/templates/definition/charger/ocpp-enplus.yaml @@ -0,0 +1,10 @@ +template: ocpp-enplus +products: + - brand: EN+ + description: + generic: AC EV Charger +capabilities: ["rfid"] +params: + - preset: ocpp +render: | + {{ include "ocpp" . }} From 3aa20ce809d20c34f5cadc1fff7489fad3306368 Mon Sep 17 00:00:00 2001 From: premultiply <4681172+premultiply@users.noreply.github.com> Date: Sun, 18 Aug 2024 15:21:53 +0000 Subject: [PATCH 14/20] wip --- .../charger/{ocpp-beny-bcp.yaml => ocpp-beny.yaml} | 2 +- .../{ocpp-chargeamps-halo.yaml => ocpp-chargeampsyaml} | 2 +- templates/definition/charger/ocpp-elvi.yaml | 5 ++--- .../{ocpp-eledio-go.yaml => ocpp-enercab-smart.yaml} | 0 ...{ocpp-entratek-powerdot.yaml => ocpp-entratek.yaml} | 2 +- templates/definition/charger/ocpp-esolutions.yaml | 10 ++++++++++ templates/definition/charger/ocpp-homecharge.yaml | 6 +++--- .../{ocpp-orbis-viaris.yaml => ocpp-orbis.yaml} | 5 ++--- .../{ocpp-pulsarplus.yaml => ocpp-wallbox.yaml} | 4 ++-- 9 files changed, 22 insertions(+), 14 deletions(-) rename templates/definition/charger/{ocpp-beny-bcp.yaml => ocpp-beny.yaml} (86%) rename templates/definition/charger/{ocpp-chargeamps-halo.yaml => ocpp-chargeampsyaml} (83%) rename templates/definition/charger/{ocpp-eledio-go.yaml => ocpp-enercab-smart.yaml} (100%) rename templates/definition/charger/{ocpp-entratek-powerdot.yaml => ocpp-entratek.yaml} (87%) create mode 100644 templates/definition/charger/ocpp-esolutions.yaml rename templates/definition/charger/{ocpp-orbis-viaris.yaml => ocpp-orbis.yaml} (67%) rename templates/definition/charger/{ocpp-pulsarplus.yaml => ocpp-wallbox.yaml} (96%) diff --git a/templates/definition/charger/ocpp-beny-bcp.yaml b/templates/definition/charger/ocpp-beny.yaml similarity index 86% rename from templates/definition/charger/ocpp-beny-bcp.yaml rename to templates/definition/charger/ocpp-beny.yaml index 8f51ffc5ad..0f976c7033 100644 --- a/templates/definition/charger/ocpp-beny-bcp.yaml +++ b/templates/definition/charger/ocpp-beny.yaml @@ -1,4 +1,4 @@ -template: ocpp-beny-bcp +template: ocpp-beny products: - brand: ZJ Beny description: diff --git a/templates/definition/charger/ocpp-chargeamps-halo.yaml b/templates/definition/charger/ocpp-chargeampsyaml similarity index 83% rename from templates/definition/charger/ocpp-chargeamps-halo.yaml rename to templates/definition/charger/ocpp-chargeampsyaml index 1fb89a3267..9c41f8406a 100644 --- a/templates/definition/charger/ocpp-chargeamps-halo.yaml +++ b/templates/definition/charger/ocpp-chargeampsyaml @@ -1,4 +1,4 @@ -template: ocpp-chargeamps-halo +template: ocpp-chargeamps products: - brand: Charge Amps description: diff --git a/templates/definition/charger/ocpp-elvi.yaml b/templates/definition/charger/ocpp-elvi.yaml index 3e511077d6..6341fe88cb 100644 --- a/templates/definition/charger/ocpp-elvi.yaml +++ b/templates/definition/charger/ocpp-elvi.yaml @@ -1,10 +1,9 @@ -template: elvi +template: ocpp-elvi +covers: ["elvi"] products: - brand: EVBox description: generic: Elvi -requirements: - evcc: ["sponsorship"] params: - preset: ocpp - name: meter diff --git a/templates/definition/charger/ocpp-eledio-go.yaml b/templates/definition/charger/ocpp-enercab-smart.yaml similarity index 100% rename from templates/definition/charger/ocpp-eledio-go.yaml rename to templates/definition/charger/ocpp-enercab-smart.yaml diff --git a/templates/definition/charger/ocpp-entratek-powerdot.yaml b/templates/definition/charger/ocpp-entratek.yaml similarity index 87% rename from templates/definition/charger/ocpp-entratek-powerdot.yaml rename to templates/definition/charger/ocpp-entratek.yaml index ec900ebaf7..f3b84de15d 100644 --- a/templates/definition/charger/ocpp-entratek-powerdot.yaml +++ b/templates/definition/charger/ocpp-entratek.yaml @@ -1,4 +1,4 @@ -template: ocpp-entratek-powerdot +template: ocpp-entratek products: - brand: EntraTek description: diff --git a/templates/definition/charger/ocpp-esolutions.yaml b/templates/definition/charger/ocpp-esolutions.yaml new file mode 100644 index 0000000000..ea19bac748 --- /dev/null +++ b/templates/definition/charger/ocpp-esolutions.yaml @@ -0,0 +1,10 @@ +template: ocpp-esolutions +products: + - brand: Free2move eSolutions + description: + generic: eProWallbox +capabilities: ["rfid"] +params: + - preset: ocpp +render: | + {{ include "ocpp" . }} diff --git a/templates/definition/charger/ocpp-homecharge.yaml b/templates/definition/charger/ocpp-homecharge.yaml index f9beaf70a5..131095e30b 100644 --- a/templates/definition/charger/ocpp-homecharge.yaml +++ b/templates/definition/charger/ocpp-homecharge.yaml @@ -1,8 +1,9 @@ -template: homecharge +template: ocpp-homecharge +covers: ["homecharge"] products: - brand: Homecharge description: - generic: HC11L, HC22L + generic: Homecharger requirements: description: de: | @@ -13,7 +14,6 @@ requirements: The charger must be equipped with a built-in meter (models HC11L/HC22L Energy or Profi). For the OCPP configuration, you need to access the EFR-SECC charge controller at http://host/secc. For login credentials, ask your dealer or the vendor EFR (www.efr.de). - evcc: ["sponsorship"] params: - preset: ocpp render: | diff --git a/templates/definition/charger/ocpp-orbis-viaris.yaml b/templates/definition/charger/ocpp-orbis.yaml similarity index 67% rename from templates/definition/charger/ocpp-orbis-viaris.yaml rename to templates/definition/charger/ocpp-orbis.yaml index 87cc9dfd71..389cb5ca43 100644 --- a/templates/definition/charger/ocpp-orbis-viaris.yaml +++ b/templates/definition/charger/ocpp-orbis.yaml @@ -1,10 +1,9 @@ -template: orbis-viaris +template: ocpp-orbis +covers: ["orbis-viaris"] products: - brand: Orbis description: generic: Viaris -requirements: - evcc: ["sponsorship"] params: - preset: ocpp render: | diff --git a/templates/definition/charger/ocpp-pulsarplus.yaml b/templates/definition/charger/ocpp-wallbox.yaml similarity index 96% rename from templates/definition/charger/ocpp-pulsarplus.yaml rename to templates/definition/charger/ocpp-wallbox.yaml index f1a5b067d8..1d3cee60f2 100644 --- a/templates/definition/charger/ocpp-pulsarplus.yaml +++ b/templates/definition/charger/ocpp-wallbox.yaml @@ -1,4 +1,5 @@ -template: pulsarplus +template: ocpp-wallbox +covers: ["pulsarplus"] products: - brand: wallbox description: @@ -30,7 +31,6 @@ requirements: * URL: ws://[evcc-adresse]:8887/ (local network connection) * Charge Point Identity: Custom value (e.g. serial number of charger) which is reused in configuration as *stationid* * Password: leave empty - evcc: ["sponsorship"] params: - preset: ocpp render: | From 39e568c400faf0e04a1c30be61026d0c5c5a157c Mon Sep 17 00:00:00 2001 From: premultiply <4681172+premultiply@users.noreply.github.com> Date: Tue, 20 Aug 2024 22:33:34 +0000 Subject: [PATCH 15/20] wip --- templates/definition/charger/ocpp-abl.yaml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 templates/definition/charger/ocpp-abl.yaml diff --git a/templates/definition/charger/ocpp-abl.yaml b/templates/definition/charger/ocpp-abl.yaml new file mode 100644 index 0000000000..22df4c5fe6 --- /dev/null +++ b/templates/definition/charger/ocpp-abl.yaml @@ -0,0 +1,16 @@ +template: ocpp-abl +products: + - brand: ABL Sursum + description: + generic: eMH2 + - brand: ABL Sursum + description: + generic: eMH3 + - brand: ABL Sursum + description: + generic: eMH4 +capabilities: ["mA", "rfid"] +params: + - preset: ocpp +render: | + {{ include "ocpp" . }} From ee34ef00382f7426c2e8abe6972ad2cee6808a42 Mon Sep 17 00:00:00 2001 From: premultiply <4681172+premultiply@users.noreply.github.com> Date: Wed, 16 Oct 2024 13:08:10 +0200 Subject: [PATCH 16/20] wip --- templates/definition/charger/ocpp-abb-tac.yaml | 2 ++ templates/definition/charger/ocpp-abb.yaml | 12 ------------ .../definition/charger/ocpp-fronius-wattpilot.yaml | 11 ----------- ...cpp-pulsarplus-fw5.yaml => ocpp-wallbox-fw5.yaml} | 3 ++- 4 files changed, 4 insertions(+), 24 deletions(-) delete mode 100644 templates/definition/charger/ocpp-abb.yaml delete mode 100644 templates/definition/charger/ocpp-fronius-wattpilot.yaml rename templates/definition/charger/{ocpp-pulsarplus-fw5.yaml => ocpp-wallbox-fw5.yaml} (96%) diff --git a/templates/definition/charger/ocpp-abb-tac.yaml b/templates/definition/charger/ocpp-abb-tac.yaml index 19ff636ae5..bf73c3674b 100644 --- a/templates/definition/charger/ocpp-abb-tac.yaml +++ b/templates/definition/charger/ocpp-abb-tac.yaml @@ -1,4 +1,5 @@ template: ocpp-abb-tac +covers: ["ocpp-abb"] products: - brand: ABB description: @@ -11,3 +12,4 @@ params: - preset: ocpp render: | {{ include "ocpp" . }} + stacklevelzero: true diff --git a/templates/definition/charger/ocpp-abb.yaml b/templates/definition/charger/ocpp-abb.yaml deleted file mode 100644 index 10af39c4cd..0000000000 --- a/templates/definition/charger/ocpp-abb.yaml +++ /dev/null @@ -1,12 +0,0 @@ -template: ocpp-abb -products: - - brand: ABB - description: - generic: TerraAC -requirements: - evcc: ["sponsorship", "skiptest"] -params: - - preset: ocpp -render: | - {{ include "ocpp" . }} - stacklevelzero: true diff --git a/templates/definition/charger/ocpp-fronius-wattpilot.yaml b/templates/definition/charger/ocpp-fronius-wattpilot.yaml deleted file mode 100644 index 03bf03e2d2..0000000000 --- a/templates/definition/charger/ocpp-fronius-wattpilot.yaml +++ /dev/null @@ -1,11 +0,0 @@ -template: ocpp-fronius-wattpilot -products: - - brand: Fronius - description: - generic: Wattpilot (OCPP) -requirements: - evcc: ["sponsorship", "skiptest"] -params: - - preset: ocpp -render: | - {{ include "ocpp" . }} diff --git a/templates/definition/charger/ocpp-pulsarplus-fw5.yaml b/templates/definition/charger/ocpp-wallbox-fw5.yaml similarity index 96% rename from templates/definition/charger/ocpp-pulsarplus-fw5.yaml rename to templates/definition/charger/ocpp-wallbox-fw5.yaml index 60c4615515..e1045d4dce 100644 --- a/templates/definition/charger/ocpp-pulsarplus-fw5.yaml +++ b/templates/definition/charger/ocpp-wallbox-fw5.yaml @@ -1,4 +1,5 @@ -template: pulsarplus-fw5 +template: wallbox-fw5 +covers: ["pulsarplus-fw5"] products: - brand: wallbox description: From 4b8f40a5a087aa18e9de28324e3187b1ddd1efd1 Mon Sep 17 00:00:00 2001 From: premultiply <4681172+premultiply@users.noreply.github.com> Date: Sun, 13 Apr 2025 18:27:02 +0200 Subject: [PATCH 17/20] wip --- templates/definition/charger/abl-em4.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/templates/definition/charger/abl-em4.yaml b/templates/definition/charger/abl-em4.yaml index 3e59928739..9f74ad0655 100644 --- a/templates/definition/charger/abl-em4.yaml +++ b/templates/definition/charger/abl-em4.yaml @@ -1,4 +1,5 @@ template: abl-em4 +protocol: modbus products: - brand: ABL description: From 0039315fe14125098fe4735927f52ad9e0586e97 Mon Sep 17 00:00:00 2001 From: Michael Geers Date: Tue, 15 Apr 2025 06:53:36 +0200 Subject: [PATCH 18/20] template consistancy; add protocol to name if needed --- assets/js/components/Config/ChargerModal.vue | 20 +++++++++++++++---- assets/js/components/Config/VehicleModal.vue | 11 ---------- i18n/de.toml | 8 ++++++++ i18n/en.toml | 8 ++++++++ templates/definition/charger/abl.yaml | 5 ++++- templates/definition/charger/eebus.yaml | 4 ++-- templates/definition/charger/ocpp-autel.yaml | 5 ++++- .../definition/charger/ocpp-mennekes-acu.yaml | 5 ++++- .../definition/charger/ocpp-wallbox-fw5.yaml | 14 ++++++++++++- templates/definition/charger/ocpp.yaml | 4 ++-- .../definition/charger/phoenix-ev-eth.yaml | 19 ++++++++++++++++-- .../definition/charger/phoenix-ev-ser.yaml | 3 ++- .../definition/charger/pracht-alpha.yaml | 11 +++++++++- templates/definition/charger/tessie.yaml | 2 +- 14 files changed, 91 insertions(+), 28 deletions(-) diff --git a/assets/js/components/Config/ChargerModal.vue b/assets/js/components/Config/ChargerModal.vue index d0e20151c9..79a5bb2cb1 100644 --- a/assets/js/components/Config/ChargerModal.vue +++ b/assets/js/components/Config/ChargerModal.vue @@ -221,17 +221,29 @@ export default { } return this.$t(`config.charger.titleEdit`); }, + uniqueProducts() { + // append protocol if multiple products with same name exist + const names = this.products.map((p) => p.name); + return this.products.map((p) => { + if (names.filter((n) => n === p.name).length > 1 && p.protocol) { + const protocol = this.$t(`config.deviceProtocol.${p.protocol}`); + const name = `${p.name} (${protocol})`; + return { ...p, name }; + } + return p; + }); + }, chargerOptions() { - return this.products.filter((p) => !p.group); + return this.uniqueProducts.filter((p) => !p.group); }, genericOptions() { - return this.products.filter((p) => p.group === "generic"); + return this.uniqueProducts.filter((p) => p.group === "generic"); }, switchSocketOptions() { - return this.products.filter((p) => p.group === "switchsockets"); + return this.uniqueProducts.filter((p) => p.group === "switchsockets"); }, heatingdevicesOptions() { - return this.products.filter((p) => p.group === "heating"); + return this.uniqueProducts.filter((p) => p.group === "heating"); }, templateParams() { const params = this.template?.Params || []; diff --git a/assets/js/components/Config/VehicleModal.vue b/assets/js/components/Config/VehicleModal.vue index 882480cbce..e2fa90d727 100644 --- a/assets/js/components/Config/VehicleModal.vue +++ b/assets/js/components/Config/VehicleModal.vue @@ -289,17 +289,6 @@ export default { }; }, computed: { - uniqueProducts() { - // add protocol to name if multiple products with same name exist - // TODO: add this logic to all devices (charger, meter, ...) - const names = this.products.map((p) => p.name); - return this.products.map((p) => { - if (names.filter((n) => n === p.name).length > 1 && p.protocol) { - return { ...p, name: `${p.name} (${p.protocol})` }; - } - return p; - }); - }, templateOptions() { return { online: this.products.filter((p) => !p.group && p.template !== "offline"), diff --git a/i18n/de.toml b/i18n/de.toml index b4764812bb..3110a11a5a 100644 --- a/i18n/de.toml +++ b/i18n/de.toml @@ -59,6 +59,14 @@ labelInterval = "Aktualisierungsintervall" labelResidualPower = "Residualleistung" title = "Regelverhalten" +[config.deviceProtocol] +cloudapi = "Cloud" +eebus = "EEBus" +localapi = "Lokal" +modbus = "Modbus" +mqtt = "MQTT" +ocpp = "OCPP" + [config.deviceValue] amount = "Anzahl" broker = "Broker" diff --git a/i18n/en.toml b/i18n/en.toml index 363f0c6d38..9e2463cfee 100644 --- a/i18n/en.toml +++ b/i18n/en.toml @@ -59,6 +59,14 @@ labelInterval = "Update interval" labelResidualPower = "Residual power" title = "Control behavior" +[config.deviceProtocol] +cloudapi = "Cloud" +eebus = "EEBus" +localapi = "Local" +modbus = "Modbus" +mqtt = "MQTT" +ocpp = "OCPP" + [config.deviceValue] amount = "Amount" broker = "Broker" diff --git a/templates/definition/charger/abl.yaml b/templates/definition/charger/abl.yaml index 9879772c32..66de0835f2 100644 --- a/templates/definition/charger/abl.yaml +++ b/templates/definition/charger/abl.yaml @@ -2,7 +2,10 @@ template: abl products: - brand: ABL description: - generic: eMH1, eMH2 + generic: eMH1 + - brand: ABL + description: + generic: eMH2 - brand: SENEC description: generic: Wallbox pro diff --git a/templates/definition/charger/eebus.yaml b/templates/definition/charger/eebus.yaml index 8909b87434..38d999988a 100644 --- a/templates/definition/charger/eebus.yaml +++ b/templates/definition/charger/eebus.yaml @@ -1,8 +1,8 @@ template: eebus products: - description: - de: EEBUS kompatible Wallbox - en: EEBUS compatible Wallbox + de: EEBUS kompatible + en: EEBUS compatible group: generic capabilities: ["mA"] requirements: diff --git a/templates/definition/charger/ocpp-autel.yaml b/templates/definition/charger/ocpp-autel.yaml index 390c964015..09f03d8474 100644 --- a/templates/definition/charger/ocpp-autel.yaml +++ b/templates/definition/charger/ocpp-autel.yaml @@ -2,7 +2,10 @@ template: ocpp-autel products: - brand: AUTEL description: - generic: AC MaxiCharger, AC Compact (OCPP) + generic: AC MaxiCharger + - brand: AUTEL + description: + generic: AC Compact capabilities: ["mA"] requirements: evcc: ["sponsorship", "skiptest"] diff --git a/templates/definition/charger/ocpp-mennekes-acu.yaml b/templates/definition/charger/ocpp-mennekes-acu.yaml index 4ec830497d..888d5d2537 100644 --- a/templates/definition/charger/ocpp-mennekes-acu.yaml +++ b/templates/definition/charger/ocpp-mennekes-acu.yaml @@ -5,7 +5,10 @@ products: generic: eMobility Gateway (ACU) - brand: Mennekes description: - generic: Smart, Smart T (ACU) + generic: Smart (ACU) + - brand: Mennekes + description: + generic: Smart T (ACU) capabilities: ["rfid"] requirements: description: diff --git a/templates/definition/charger/ocpp-wallbox-fw5.yaml b/templates/definition/charger/ocpp-wallbox-fw5.yaml index 89689e9eff..7b6786d605 100644 --- a/templates/definition/charger/ocpp-wallbox-fw5.yaml +++ b/templates/definition/charger/ocpp-wallbox-fw5.yaml @@ -1,13 +1,24 @@ template: wallbox-fw5 +protocol: ocpp covers: ["pulsarplus-fw5"] products: - brand: wallbox description: - generic: Pulsar Plus, Pulsar Max, Commander 2, Copper SB (FW 5.x) + generic: Pulsar Plus (FW 5.x) + - brand: wallbox + description: + generic: Pulsar Max (FW 5.x) + - brand: wallbox + description: + generic: Commander 2 (FW 5.x) + - brand: wallbox + description: + generic: Copper SB (FW 5.x) requirements: description: de: | Anleitung: https://support.wallbox.com/en/knowledge-base/ocpp-activation-and-setup-guide/ + * “OCPP aktivieren” (myWallbox app) bzw. den “OCPP-WebSocket-Verbindung” Schalter (myWallbox Portal) aktivieren * Zusätzlich die “Verbesserte Ladegerätsteuerung” (Profil -> Experimentelle Funktionen) einschalten (myWallbox app) * URL: ws://[evcc-adresse]:8887/ (Verbindung über das lokale Netzwerk) @@ -15,6 +26,7 @@ requirements: * Passwort: leer lassen en: | Setup Guide: https://support.wallbox.com/en/knowledge-base/ocpp-activation-and-setup-guide/ + * Switch on “Enable OCPP” (myWallbox app) or enable the “OCPP WebSocket connection” switch (myWallbox Portal) * Enable “Improved charger control” (Profile -> Experimental functions) (myWallbox app) * URL: ws://[evcc-adresse]:8887/ (local network connection) diff --git a/templates/definition/charger/ocpp.yaml b/templates/definition/charger/ocpp.yaml index 77d005c4e5..4f75aa45cd 100644 --- a/templates/definition/charger/ocpp.yaml +++ b/templates/definition/charger/ocpp.yaml @@ -1,8 +1,8 @@ template: ocpp products: - description: - de: OCPP 1.6J kompatible Wallbox mit Smart Charging Profil - en: OCPP 1.6J compatible charger with Smart Charging Profile + de: OCPP 1.6J kompatible (Smart Charging) + en: OCPP 1.6J compatible (Smart Charging) group: generic capabilities: ["mA", "rfid", "1p3p"] requirements: diff --git a/templates/definition/charger/phoenix-ev-eth.yaml b/templates/definition/charger/phoenix-ev-eth.yaml index fb28fc812a..1333319ba0 100644 --- a/templates/definition/charger/phoenix-ev-eth.yaml +++ b/templates/definition/charger/phoenix-ev-eth.yaml @@ -2,10 +2,25 @@ template: phoenix-ev-eth products: - brand: Phoenix Contact description: - generic: EV-CC-AC1-M3-CBC-RCM-ETH, EV-CC-AC1-M3-CBC-RCM-ETH-3G, EV-CC-AC1-M3-RCM-ETH-XP, EV-CC-AC1-M3-RCM-ETH-3G-XP + generic: EV-CC-AC1-M3-CBC-RCM-ETH + - brand: Phoenix Contact + description: + generic: EV-CC-AC1-M3-CBC-RCM-ETH-3G + - brand: Phoenix Contact + description: + generic: EV-CC-AC1-M3-RCM-ETH-XP + - brand: Phoenix Contact + description: + generic: EV-CC-AC1-M3-RCM-ETH-3G-XP + - brand: Wallbe + description: + generic: Eco + - brand: Wallbe + description: + generic: Eco 2.0(s) - brand: Wallbe description: - generic: Eco, Eco 2.0(s), Pro + generic: Pro - brand: ESL description: generic: Walli LIGHT diff --git a/templates/definition/charger/phoenix-ev-ser.yaml b/templates/definition/charger/phoenix-ev-ser.yaml index 388d9920a4..112640259f 100644 --- a/templates/definition/charger/phoenix-ev-ser.yaml +++ b/templates/definition/charger/phoenix-ev-ser.yaml @@ -1,8 +1,9 @@ template: phoenix-ev-ser +protocol: modbus products: - brand: Phoenix Contact description: - generic: EV-SER (Modbus RTU) + generic: EV-SER params: - name: modbus choice: ["rs485"] diff --git a/templates/definition/charger/pracht-alpha.yaml b/templates/definition/charger/pracht-alpha.yaml index 5f4078ccb8..4248097a79 100644 --- a/templates/definition/charger/pracht-alpha.yaml +++ b/templates/definition/charger/pracht-alpha.yaml @@ -2,7 +2,16 @@ template: pracht-alpha products: - brand: Pracht description: - generic: Alpha XT, XT+, Mono XT, Mono XT+, PNI + generic: Alpha XT + - brand: Pracht + description: + generic: XT+ + - brand: Pracht + description: + generic: Mono XT + - brand: Pracht + description: + generic: PNI requirements: evcc: ["sponsorship"] params: diff --git a/templates/definition/charger/tessie.yaml b/templates/definition/charger/tessie.yaml index 5c9d30f537..03321fa4f1 100644 --- a/templates/definition/charger/tessie.yaml +++ b/templates/definition/charger/tessie.yaml @@ -1,5 +1,5 @@ template: tessie -group: generic +protocol: cloudapi products: - description: generic: Tessie From 59bf40a2bb9bf8f8bd8e162bd024df6d48ed4623 Mon Sep 17 00:00:00 2001 From: premultiply <4681172+premultiply@users.noreply.github.com> Date: Fri, 16 May 2025 19:02:33 +0200 Subject: [PATCH 19/20] wip --- .../definition/charger/ocpp-alfen-eve.yaml | 10 ---------- .../definition/charger/ocpp-chargeampsyaml | 10 ---------- .../charger/ocpp-enercab-smart.yaml | 17 ---------------- .../definition/charger/ocpp-goe-charger.yaml | 20 ------------------- .../definition/charger/ocpp-sungrow-ac.yaml | 10 ---------- .../definition/charger/ocpp-wallbox-fw5.yaml | 18 ----------------- 6 files changed, 85 deletions(-) delete mode 100644 templates/definition/charger/ocpp-alfen-eve.yaml delete mode 100644 templates/definition/charger/ocpp-chargeampsyaml delete mode 100644 templates/definition/charger/ocpp-enercab-smart.yaml delete mode 100644 templates/definition/charger/ocpp-goe-charger.yaml delete mode 100644 templates/definition/charger/ocpp-sungrow-ac.yaml diff --git a/templates/definition/charger/ocpp-alfen-eve.yaml b/templates/definition/charger/ocpp-alfen-eve.yaml deleted file mode 100644 index 3a7c2dc0d6..0000000000 --- a/templates/definition/charger/ocpp-alfen-eve.yaml +++ /dev/null @@ -1,10 +0,0 @@ -template: ocpp-alfen-eve -products: - - brand: Alfen - description: - generic: Eve -capabilities: ["mA", "rfid", "1p3p"] -params: - - preset: ocpp -render: | - {{ include "ocpp" . }} diff --git a/templates/definition/charger/ocpp-chargeampsyaml b/templates/definition/charger/ocpp-chargeampsyaml deleted file mode 100644 index 9c41f8406a..0000000000 --- a/templates/definition/charger/ocpp-chargeampsyaml +++ /dev/null @@ -1,10 +0,0 @@ -template: ocpp-chargeamps -products: - - brand: Charge Amps - description: - generic: Halo -capabilities: ["rfid"] -params: - - preset: ocpp -render: | - {{ include "ocpp" . }} diff --git a/templates/definition/charger/ocpp-enercab-smart.yaml b/templates/definition/charger/ocpp-enercab-smart.yaml deleted file mode 100644 index 2b07ebd3d0..0000000000 --- a/templates/definition/charger/ocpp-enercab-smart.yaml +++ /dev/null @@ -1,17 +0,0 @@ -template: ocpp-enercab-smart -products: - - brand: enercab - description: - generic: smart - - brand: eledio - description: - generic: go -capabilities: ["1p3p"] -requirements: - description: - generic: | - https://www.enercab.at/index.php?controller=attachment&id_attachment=311 -params: - - preset: ocpp -render: | - {{ include "ocpp" . }} diff --git a/templates/definition/charger/ocpp-goe-charger.yaml b/templates/definition/charger/ocpp-goe-charger.yaml deleted file mode 100644 index 13233d024c..0000000000 --- a/templates/definition/charger/ocpp-goe-charger.yaml +++ /dev/null @@ -1,20 +0,0 @@ -template: ocpp-goe-charger -covers: ["ocpp-fronius-wattpilot"] -products: - - brand: go-e - description: - generic: Charger V3 - - brand: go-e - description: - generic: Charger Gemini - - brand: go-e - description: - generic: Charger PRO - - brand: Fronius - description: - generic: Wattpilot -capabilities: ["rfid", "1p3p"] -params: - - preset: ocpp -render: | - {{ include "ocpp" . }} diff --git a/templates/definition/charger/ocpp-sungrow-ac.yaml b/templates/definition/charger/ocpp-sungrow-ac.yaml deleted file mode 100644 index 1ef3eae35f..0000000000 --- a/templates/definition/charger/ocpp-sungrow-ac.yaml +++ /dev/null @@ -1,10 +0,0 @@ -template: ocpp-sungrow-ac -products: - - brand: Sungrow - description: - generic: AC011E -capabilities: ["mA", "rfid"] -params: - - preset: ocpp -render: | - {{ include "ocpp" . }} diff --git a/templates/definition/charger/ocpp-wallbox-fw5.yaml b/templates/definition/charger/ocpp-wallbox-fw5.yaml index a8ca843f32..fbc11bade9 100644 --- a/templates/definition/charger/ocpp-wallbox-fw5.yaml +++ b/templates/definition/charger/ocpp-wallbox-fw5.yaml @@ -1,20 +1,3 @@ -<<<<<<<< HEAD:templates/definition/charger/ocpp-wallbox.yaml -template: ocpp-wallbox -covers: ["pulsarplus"] -products: - - brand: wallbox - description: - generic: Pulsar Plus - - brand: wallbox - description: - generic: Pulsar Max - - brand: wallbox - description: - generic: Commander 2 - - brand: wallbox - description: - generic: Copper SB -======== template: wallbox-fw5 covers: ["pulsarplus-fw5"] products: @@ -30,7 +13,6 @@ products: - brand: wallbox description: generic: Copper SB (FW 5.x) ->>>>>>>> master:templates/definition/charger/ocpp-wallbox-fw5.yaml requirements: description: de: | From 08db3b77f96cfa375649dc1b55c3ac1551100c95 Mon Sep 17 00:00:00 2001 From: premultiply <4681172+premultiply@users.noreply.github.com> Date: Fri, 16 May 2025 19:04:20 +0200 Subject: [PATCH 20/20] wip --- .../definition/charger/ocpp-wallbox.yaml | 22 ------------------- .../definition/charger/ocpp-zaptec-go.yaml | 16 -------------- 2 files changed, 38 deletions(-) delete mode 100644 templates/definition/charger/ocpp-zaptec-go.yaml diff --git a/templates/definition/charger/ocpp-wallbox.yaml b/templates/definition/charger/ocpp-wallbox.yaml index a8ca843f32..d603a65e6c 100644 --- a/templates/definition/charger/ocpp-wallbox.yaml +++ b/templates/definition/charger/ocpp-wallbox.yaml @@ -1,4 +1,3 @@ -<<<<<<<< HEAD:templates/definition/charger/ocpp-wallbox.yaml template: ocpp-wallbox covers: ["pulsarplus"] products: @@ -14,23 +13,6 @@ products: - brand: wallbox description: generic: Copper SB -======== -template: wallbox-fw5 -covers: ["pulsarplus-fw5"] -products: - - brand: wallbox - description: - generic: Pulsar Plus (FW 5.x) - - brand: wallbox - description: - generic: Pulsar Max (FW 5.x) - - brand: wallbox - description: - generic: Commander 2 (FW 5.x) - - brand: wallbox - description: - generic: Copper SB (FW 5.x) ->>>>>>>> master:templates/definition/charger/ocpp-wallbox-fw5.yaml requirements: description: de: | @@ -52,9 +34,5 @@ requirements: evcc: ["sponsorship", "skiptest"] params: - preset: ocpp - - name: metervalues - default: -Current.Offered,Power.Offered render: | {{ include "ocpp" . }} - remotestart: true - stacklevelzero: true diff --git a/templates/definition/charger/ocpp-zaptec-go.yaml b/templates/definition/charger/ocpp-zaptec-go.yaml deleted file mode 100644 index c6c03fc399..0000000000 --- a/templates/definition/charger/ocpp-zaptec-go.yaml +++ /dev/null @@ -1,16 +0,0 @@ -template: ocpp-zaptec-go -products: - - brand: Zaptec - description: - generic: Go -capabilities: ["rfid"] -requirements: - description: - generic: | - OCPP Native mode - - https://help.zaptec.com/hc/en-001/articles/22330328601489-Zaptec-Go-OCPP-Native-configuration-guide#h_01HP261F5NP6Z9VY0MVHJCZEBJ -params: - - preset: ocpp -render: | - {{ include "ocpp" . }}