From 98d9cb0a244023452652673f209c44109bf04bb8 Mon Sep 17 00:00:00 2001 From: andig Date: Fri, 27 Sep 2024 11:46:54 +0200 Subject: [PATCH 1/8] chore: fix typo --- templates/definition/meter/fronius-solarapi-v1.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/definition/meter/fronius-solarapi-v1.yaml b/templates/definition/meter/fronius-solarapi-v1.yaml index 0e07cd3d1c..bdfad303e0 100644 --- a/templates/definition/meter/fronius-solarapi-v1.yaml +++ b/templates/definition/meter/fronius-solarapi-v1.yaml @@ -7,7 +7,7 @@ capabilities: ["battery-control"] requirements: description: de: | - Solar API sollte nur als Fallback genutzt werden. Die Intergration über Modbus ist bevorzugt. + Solar API sollte nur als Fallback genutzt werden. Die Integration über Modbus ist bevorzugt. Benutzername und Passwort werden nur für die aktive Batteriesteuerung benötigt. From 13d862287af7fd2696d8620cac80bba85b236e76 Mon Sep 17 00:00:00 2001 From: Andreas Linde <42185+DerAndereAndi@users.noreply.github.com> Date: Fri, 27 Sep 2024 16:43:57 +0200 Subject: [PATCH 2/8] Add Elli Wallbox 2 (#16375) --- .../definition/charger/elli-wallbox-2.yaml | 60 +++++++++++++++++++ 1 file changed, 60 insertions(+) create mode 100644 templates/definition/charger/elli-wallbox-2.yaml diff --git a/templates/definition/charger/elli-wallbox-2.yaml b/templates/definition/charger/elli-wallbox-2.yaml new file mode 100644 index 0000000000..a52b44e85b --- /dev/null +++ b/templates/definition/charger/elli-wallbox-2.yaml @@ -0,0 +1,60 @@ +template: eebus +products: + - brand: Elli + description: + generic: Charger Connect 2 + - brand: Elli + description: + generic: Charger Pro 2 + - brand: Elli + description: + generic: Charger Pro Eichrecht 2 + - brand: Volkswagen + description: + generic: Charger Connect 2 + - brand: Volkswagen + description: + generic: Charger Pro 2 + - brand: Volkswagen + description: + generic: Charger Pro Eichrecht 2 + - brand: Skoda + description: + generic: Charger Connect + - brand: Skoda + description: + generic: Charger Pro + - brand: Skoda + description: + generic: Charger Pro Eichrecht + - brand: Cupra + description: + generic: Charger Pro 2 + - brand: Cupra + description: + generic: Charger Pro 2 + - brand: Cupra + description: + generic: Charger Pro Eichrecht 2 +capabilities: ["iso151182", "mA"] +requirements: + evcc: ["eebus"] + description: + de: | + Die Wallbox muss im normalen Lademodus betrieben werden. + + Die Nutzung der Phasenumschaltung ist in evcc momentan noch nicht möglich. + + Eine Identifikation des Fahrzeugs über die RFID Karte ist nicht möglich. + en: | + The device has to be used in the normal charging mode. + + The usage of phase switching is currently not possible in evcc. + + The identification of a vehicle using the RFID card is not possible. +params: + - preset: eebus +render: | + {{ include "eebus" . }} + meter: true + vasvw: true From 0a8c2cdd1529cab7cf02df2177f959273d1529a5 Mon Sep 17 00:00:00 2001 From: andig Date: Fri, 27 Sep 2024 17:32:47 +0200 Subject: [PATCH 3/8] AC Elwa 2: fix register types --- charger/mypv-elwa2.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/charger/mypv-elwa2.go b/charger/mypv-elwa2.go index 82c3893334..bc74c12c02 100644 --- a/charger/mypv-elwa2.go +++ b/charger/mypv-elwa2.go @@ -117,7 +117,7 @@ func (wb *MyPvElwa2) heartbeat(timeout time.Duration) { // Status implements the api.Charger interface func (wb *MyPvElwa2) Status() (api.ChargeStatus, error) { res := api.StatusA - b, err := wb.conn.ReadInputRegisters(elwaRegStatus, 1) + b, err := wb.conn.ReadHoldingRegisters(elwaRegStatus, 1) if err != nil { return res, err } @@ -181,7 +181,7 @@ var _ api.Meter = (*MyPvElwa2)(nil) // CurrentPower implements the api.Meter interface func (wb *MyPvElwa2) CurrentPower() (float64, error) { - b, err := wb.conn.ReadInputRegisters(elwaRegPower, 1) + b, err := wb.conn.ReadHoldingRegisters(elwaRegPower, 1) if err != nil { return 0, err } @@ -193,7 +193,7 @@ var _ api.Battery = (*MyPvElwa2)(nil) // CurrentPower implements the api.Meter interface func (wb *MyPvElwa2) Soc() (float64, error) { - b, err := wb.conn.ReadInputRegisters(elwaRegTemp, 1) + b, err := wb.conn.ReadHoldingRegisters(elwaRegTemp, 1) if err != nil { return 0, err } @@ -205,7 +205,7 @@ var _ api.SocLimiter = (*MyPvElwa2)(nil) // GetLimitSoc implements the api.SocLimiter interface func (wb *MyPvElwa2) GetLimitSoc() (int64, error) { - b, err := wb.conn.ReadInputRegisters(elwaRegTempLimit, 1) + b, err := wb.conn.ReadHoldingRegisters(elwaRegTempLimit, 1) if err != nil { return 0, err } From 5f88ab408af2160bcc74a09c2f24e2c7cc6b626e Mon Sep 17 00:00:00 2001 From: andig Date: Fri, 27 Sep 2024 17:39:27 +0200 Subject: [PATCH 4/8] cli: support heating --- cmd/dumper.go | 34 ++++++++++++++++++++++++++++------ 1 file changed, 28 insertions(+), 6 deletions(-) diff --git a/cmd/dumper.go b/cmd/dumper.go index 780cf0d29d..53a2c9a667 100644 --- a/cmd/dumper.go +++ b/cmd/dumper.go @@ -4,6 +4,7 @@ import ( "errors" "fmt" "os" + "slices" "strings" "text/tabwriter" "time" @@ -36,6 +37,11 @@ func (d *dumper) DumpWithHeader(name string, device interface{}) { func (d *dumper) Dump(name string, v interface{}) { w := tabwriter.NewWriter(os.Stdout, 0, 0, 1, ' ', 0) + var isHeating bool + if fd, ok := v.(api.FeatureDescriber); ok { + isHeating = slices.Contains(fd.Features(), api.Heating) + } + // meter if v, ok := v.(api.Meter); ok { @@ -95,10 +101,18 @@ func (d *dumper) Dump(name string, v interface{}) { } } - if err != nil { - fmt.Fprintf(w, "Soc:\t%v\n", err) + if isHeating { + if err != nil { + fmt.Fprintf(w, "Temp:\t%v\n", err) + } else { + fmt.Fprintf(w, "Temp:\t%.0f°C\n", soc) + } } else { - fmt.Fprintf(w, "Soc:\t%.0f%%\n", soc) + if err != nil { + fmt.Fprintf(w, "Soc:\t%v\n", err) + } else { + fmt.Fprintf(w, "Soc:\t%.0f%%\n", soc) + } } } @@ -204,10 +218,18 @@ func (d *dumper) Dump(name string, v interface{}) { } if v, ok := v.(api.SocLimiter); ok { - if limitSoc, err := v.GetLimitSoc(); err != nil { - fmt.Fprintf(w, "Limit Soc:\t%v\n", err) + if isHeating { + if limitSoc, err := v.GetLimitSoc(); err != nil { + fmt.Fprintf(w, "Max Temp:\t%v\n", err) + } else { + fmt.Fprintf(w, "Max Temp:\t%d°C\n", limitSoc) + } } else { - fmt.Fprintf(w, "Limit Soc:\t%d%%\n", limitSoc) + if limitSoc, err := v.GetLimitSoc(); err != nil { + fmt.Fprintf(w, "Limit Soc:\t%v\n", err) + } else { + fmt.Fprintf(w, "Limit Soc:\t%d%%\n", limitSoc) + } } } From 7620c5fc5ceca1c2a92287e9cf803347e8aa06ad Mon Sep 17 00:00:00 2001 From: andig Date: Fri, 27 Sep 2024 17:55:15 +0200 Subject: [PATCH 5/8] chore: fix cloudsmith install --- .github/workflows/nightly.yml | 8 +++++--- .github/workflows/release.yml | 8 +++++--- Makefile | 4 ++-- 3 files changed, 12 insertions(+), 8 deletions(-) diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index 7ee5ecb6da..4a8ee56e07 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -89,9 +89,6 @@ jobs: go-version: ${{ env.GO_VERSION }} id: go - - name: Install Cloudsmith CLI - run: pip install --upgrade cloudsmith-cli - - name: Patch ASN1 run: make patch-asn1-sudo @@ -111,6 +108,11 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} TESLA_CLIENT_ID: ${{ secrets.TESLA_CLIENT_ID }} + - name: Install Cloudsmith CLI + run: | + python3 -m venv venv + venv/bin/pip install --upgrade cloudsmith-cli + - name: Publish .deb to Cloudsmith env: CLOUDSMITH_API_KEY: ${{ secrets.CLOUDSMITH_API_KEY }} diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index c992aa03e6..2e5d987048 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -68,9 +68,6 @@ jobs: go-version: ${{ env.GO_VERSION }} id: go - - name: Install Cloudsmith CLI - run: pip install --upgrade cloudsmith-cli - - name: Patch ASN1 run: make patch-asn1-sudo @@ -105,6 +102,11 @@ jobs: GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} TESLA_CLIENT_ID: ${{ secrets.TESLA_CLIENT_ID }} + - name: Install Cloudsmith CLI + run: | + python3 -m venv venv + venv/bin/pip install --upgrade cloudsmith-cli + - name: Publish .deb to Cloudsmith env: CLOUDSMITH_API_KEY: ${{ secrets.CLOUDSMITH_API_KEY }} diff --git a/Makefile b/Makefile index 28233cd953..b930ff2c82 100644 --- a/Makefile +++ b/Makefile @@ -96,12 +96,12 @@ publish-release:: apt-nightly:: $(foreach file, $(wildcard $(PACKAGES)/*.deb), \ - cloudsmith push deb evcc/unstable/any-distro/any-version $(file); \ + venv/bin/cloudsmith push deb evcc/unstable/any-distro/any-version $(file); \ ) apt-release:: $(foreach file, $(wildcard $(PACKAGES)/*.deb), \ - cloudsmith push deb evcc/stable/any-distro/any-version $(file); \ + venv/bin/cloudsmith push deb evcc/stable/any-distro/any-version $(file); \ ) # gokrazy image From bfeb390d691aee8d3f9c76efb6d50e527c3f1ace Mon Sep 17 00:00:00 2001 From: andig Date: Fri, 27 Sep 2024 17:57:11 +0200 Subject: [PATCH 6/8] Revert "chore: fix cloudsmith install" This reverts commit 7620c5fc5ceca1c2a92287e9cf803347e8aa06ad. --- .github/workflows/nightly.yml | 8 +++----- .github/workflows/release.yml | 8 +++----- Makefile | 4 ++-- 3 files changed, 8 insertions(+), 12 deletions(-) diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index 4a8ee56e07..7ee5ecb6da 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -89,6 +89,9 @@ jobs: go-version: ${{ env.GO_VERSION }} id: go + - name: Install Cloudsmith CLI + run: pip install --upgrade cloudsmith-cli + - name: Patch ASN1 run: make patch-asn1-sudo @@ -108,11 +111,6 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} TESLA_CLIENT_ID: ${{ secrets.TESLA_CLIENT_ID }} - - name: Install Cloudsmith CLI - run: | - python3 -m venv venv - venv/bin/pip install --upgrade cloudsmith-cli - - name: Publish .deb to Cloudsmith env: CLOUDSMITH_API_KEY: ${{ secrets.CLOUDSMITH_API_KEY }} diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 2e5d987048..c992aa03e6 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -68,6 +68,9 @@ jobs: go-version: ${{ env.GO_VERSION }} id: go + - name: Install Cloudsmith CLI + run: pip install --upgrade cloudsmith-cli + - name: Patch ASN1 run: make patch-asn1-sudo @@ -102,11 +105,6 @@ jobs: GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} TESLA_CLIENT_ID: ${{ secrets.TESLA_CLIENT_ID }} - - name: Install Cloudsmith CLI - run: | - python3 -m venv venv - venv/bin/pip install --upgrade cloudsmith-cli - - name: Publish .deb to Cloudsmith env: CLOUDSMITH_API_KEY: ${{ secrets.CLOUDSMITH_API_KEY }} diff --git a/Makefile b/Makefile index b930ff2c82..28233cd953 100644 --- a/Makefile +++ b/Makefile @@ -96,12 +96,12 @@ publish-release:: apt-nightly:: $(foreach file, $(wildcard $(PACKAGES)/*.deb), \ - venv/bin/cloudsmith push deb evcc/unstable/any-distro/any-version $(file); \ + cloudsmith push deb evcc/unstable/any-distro/any-version $(file); \ ) apt-release:: $(foreach file, $(wildcard $(PACKAGES)/*.deb), \ - venv/bin/cloudsmith push deb evcc/stable/any-distro/any-version $(file); \ + cloudsmith push deb evcc/stable/any-distro/any-version $(file); \ ) # gokrazy image From 0b94d970d20933b914bf78b986906db2511dce48 Mon Sep 17 00:00:00 2001 From: andig Date: Fri, 27 Sep 2024 17:59:55 +0200 Subject: [PATCH 7/8] chore: use installed python --- .github/workflows/nightly.yml | 7 ++++--- .github/workflows/release.yml | 7 ++++--- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index 7ee5ecb6da..1f7cd97f61 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -89,9 +89,6 @@ jobs: go-version: ${{ env.GO_VERSION }} id: go - - name: Install Cloudsmith CLI - run: pip install --upgrade cloudsmith-cli - - name: Patch ASN1 run: make patch-asn1-sudo @@ -111,6 +108,10 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} TESLA_CLIENT_ID: ${{ secrets.TESLA_CLIENT_ID }} + - uses: actions/setup-python@v5 + - name: Install Cloudsmith CLI + run: pip install --upgrade cloudsmith-cli + - name: Publish .deb to Cloudsmith env: CLOUDSMITH_API_KEY: ${{ secrets.CLOUDSMITH_API_KEY }} diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index c992aa03e6..23cd9922aa 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -68,9 +68,6 @@ jobs: go-version: ${{ env.GO_VERSION }} id: go - - name: Install Cloudsmith CLI - run: pip install --upgrade cloudsmith-cli - - name: Patch ASN1 run: make patch-asn1-sudo @@ -105,6 +102,10 @@ jobs: GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} TESLA_CLIENT_ID: ${{ secrets.TESLA_CLIENT_ID }} + - uses: actions/setup-python@v5 + - name: Install Cloudsmith CLI + run: pip install --upgrade cloudsmith-cli + - name: Publish .deb to Cloudsmith env: CLOUDSMITH_API_KEY: ${{ secrets.CLOUDSMITH_API_KEY }} From 53928bd9308bed0648aac362121315f0fd2ca957 Mon Sep 17 00:00:00 2001 From: andig Date: Fri, 27 Sep 2024 18:05:02 +0200 Subject: [PATCH 8/8] chore: upgrade goreleaser --- .goreleaser-nightly.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.goreleaser-nightly.yml b/.goreleaser-nightly.yml index 1948c8dcbe..df384ee9c9 100644 --- a/.goreleaser-nightly.yml +++ b/.goreleaser-nightly.yml @@ -50,7 +50,7 @@ checksum: name_template: "checksums.txt" snapshot: - name_template: '{{ .Version }}{{ if eq (len (split .Version ".")) 2 }}.0{{ end }}+{{ .Timestamp }}' + version_template: '{{ .Version }}{{ if eq (len (split .Version ".")) 2 }}.0{{ end }}+{{ .Timestamp }}' changelog: sort: asc