Skip to content

Commit d516bc0

Browse files
committed
Merge remote-tracking branch 'upstream/master'
2 parents 4f2c4a5 + 6cdd844 commit d516bc0

File tree

189 files changed

+3737
-1348
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

189 files changed

+3737
-1348
lines changed

.github/ISSUE_TEMPLATE/bug_report.yaml

+8-2
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,10 @@ body:
3939
render: yaml
4040
description: >
4141
Show evcc configuration file <code>evcc.yaml</code>
42+
43+
Please make sure your report does NOT contain **passwords**, **sponsor token** or other **credentials**!
44+
45+
To quickly dump a redacted configuration without secrets, you can use the `evcc dump --cfg` command.
4246
4347
- type: textarea
4448
validations:
@@ -54,20 +58,22 @@ body:
5458
validations:
5559
required: true
5660
attributes:
57-
label: What type of operating system are you running?
61+
label: What type of operating system or environment does evcc run on?
5862
description: >
5963
**NOTE** if you're using HomeAssistant or Docker we ask you to reproduce the problem on plain Linux or Windows first.
6064
options:
6165
- Linux
6266
- Windows
6367
- Docker container
6468
- HomeAssistant Add-on
69+
- macOS
70+
- other
6571

6672
- type: checkboxes
6773
id: nightly
6874
attributes:
6975
label: Nightly build
70-
description: Check if issue as already been fixed in the latest nightly build
76+
description: Check if the issue has not already been fixed in the latest nightly build
7177
options:
7278
- label: I have verified that the issue is reproducible with the latest nightly build
7379
required: true

.github/workflows/nightly.yml

-3
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,6 @@ jobs:
6868
context: .
6969
platforms: linux/amd64,linux/arm64,linux/arm/v6
7070
push: true
71-
build-args: |
72-
TESLA_CLIENT_ID=${{ secrets.TESLA_CLIENT_ID }}
7371
tags: |
7472
evcc/evcc:nightly
7573
@@ -106,7 +104,6 @@ jobs:
106104
args: --snapshot -f .goreleaser-nightly.yml --clean
107105
env:
108106
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
109-
TESLA_CLIENT_ID: ${{ secrets.TESLA_CLIENT_ID }}
110107

111108
- uses: actions/setup-python@v5
112109
with:

.github/workflows/release.yml

-2
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,6 @@ jobs:
4848
push: true
4949
build-args: |
5050
RELEASE=1
51-
TESLA_CLIENT_ID=${{ secrets.TESLA_CLIENT_ID }}
5251
tags: ${{ steps.meta.outputs.tags }}
5352

5453
apt:
@@ -100,7 +99,6 @@ jobs:
10099
env:
101100
# use GH_TOKEN for access to evcc-io/homebrew-tap
102101
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
103-
TESLA_CLIENT_ID: ${{ secrets.TESLA_CLIENT_ID }}
104102

105103
- uses: actions/setup-python@v5
106104
with:

.goreleaser-nightly.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ builds:
1111
- -trimpath
1212
- -tags=release
1313
ldflags:
14-
- -X github.com/evcc-io/evcc/server.Version={{ .Tag }} -X github.com/evcc-io/evcc/server.Commit={{ .ShortCommit }} -X github.com/evcc-io/evcc/vehicle/tesla.TESLA_CLIENT_ID={{ .Env.TESLA_CLIENT_ID }} -s -w
14+
- -X github.com/evcc-io/evcc/server.Version={{ .Tag }} -X github.com/evcc-io/evcc/server.Commit={{ .ShortCommit }} -s -w
1515
env:
1616
- CGO_ENABLED=0
1717
goos:
@@ -36,11 +36,11 @@ builds:
3636
- goos: darwin
3737
goarch: arm64
3838
ldflags:
39-
- -X github.com/evcc-io/evcc/server.Version={{ .Tag }} -X github.com/evcc-io/evcc/server.Commit={{ .ShortCommit }} -X github.com/evcc-io/evcc/vehicle/tesla.TESLA_CLIENT_ID={{ .Env.TESLA_CLIENT_ID }} -s -w -B gobuildid
39+
- -X github.com/evcc-io/evcc/server.Version={{ .Tag }} -X github.com/evcc-io/evcc/server.Commit={{ .ShortCommit }} -s -w -B gobuildid
4040
- goos: darwin
4141
goarch: amd64
4242
ldflags:
43-
- -X github.com/evcc-io/evcc/server.Version={{ .Tag }} -X github.com/evcc-io/evcc/server.Commit={{ .ShortCommit }} -X github.com/evcc-io/evcc/vehicle/tesla.TESLA_CLIENT_ID={{ .Env.TESLA_CLIENT_ID }} -s -w -B gobuildid
43+
- -X github.com/evcc-io/evcc/server.Version={{ .Tag }} -X github.com/evcc-io/evcc/server.Commit={{ .ShortCommit }} -s -w -B gobuildid
4444

4545
archives:
4646
- builds:

.goreleaser.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ builds:
1414
- -trimpath
1515
- -tags=release
1616
ldflags:
17-
- -X github.com/evcc-io/evcc/server.Version={{ .Version }} -X github.com/evcc-io/evcc/vehicle/tesla.TESLA_CLIENT_ID={{ .Env.TESLA_CLIENT_ID }} -s -w
17+
- -X github.com/evcc-io/evcc/server.Version={{ .Version }} -s -w
1818
env:
1919
- CGO_ENABLED=0
2020
goos:
@@ -41,11 +41,11 @@ builds:
4141
- goos: darwin
4242
goarch: arm64
4343
ldflags:
44-
- -X github.com/evcc-io/evcc/server.Version={{ .Version }} -X github.com/evcc-io/evcc/vehicle/tesla.TESLA_CLIENT_ID={{ .Env.TESLA_CLIENT_ID }} -s -w -B gobuildid
44+
- -X github.com/evcc-io/evcc/server.Version={{ .Version }} -s -w -B gobuildid
4545
- goos: darwin
4646
goarch: amd64
4747
ldflags:
48-
- -X github.com/evcc-io/evcc/server.Version={{ .Version }} -X github.com/evcc-io/evcc/vehicle/tesla.TESLA_CLIENT_ID={{ .Env.TESLA_CLIENT_ID }} -s -w -B gobuildid
48+
- -X github.com/evcc-io/evcc/server.Version={{ .Version }} -s -w -B gobuildid
4949

5050
env:
5151
- CGO_ENABLED=0

Dockerfile

+2-8
Original file line numberDiff line numberDiff line change
@@ -56,18 +56,12 @@ COPY --from=node /build/dist /build/dist
5656
ARG TARGETOS
5757
ARG TARGETARCH
5858
ARG TARGETVARIANT
59-
60-
RUN case "${TARGETVARIANT}" in \
61-
"armhf") export GOARM='6' ;; \
62-
"armv7") export GOARM='6' ;; \
63-
"v6") export GOARM='6' ;; \
64-
"v7") export GOARM='7' ;; \
65-
esac;
59+
ARG GOARM=${TARGETVARIANT#v}
6660

6761
ARG TESLA_CLIENT_ID
6862
ENV TESLA_CLIENT_ID=${TESLA_CLIENT_ID}
6963

70-
RUN RELEASE=${RELEASE} GOOS=${TARGETOS} GOARCH=${TARGETARCH} make build
64+
RUN RELEASE=${RELEASE} GOOS=${TARGETOS} GOARCH=${TARGETARCH} GOARM=${GOARM} make build
7165

7266

7367
# STEP 3 build a small image including module support

api/chargemodestatus.go

-2
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,7 @@ const (
3131
StatusA ChargeStatus = "A" // Fzg. angeschlossen: nein Laden aktiv: nein Ladestation betriebsbereit, Fahrzeug getrennt
3232
StatusB ChargeStatus = "B" // Fzg. angeschlossen: ja Laden aktiv: nein Fahrzeug verbunden, Netzspannung liegt nicht an
3333
StatusC ChargeStatus = "C" // Fzg. angeschlossen: ja Laden aktiv: ja Fahrzeug lädt, Netzspannung liegt an
34-
StatusD ChargeStatus = "D" // Fzg. angeschlossen: ja Laden aktiv: ja Fahrzeug lädt mit externer Belüfungsanforderung (für Blei-Säure-Batterien)
3534
StatusE ChargeStatus = "E" // Fzg. angeschlossen: ja Laden aktiv: nein Fehler Fahrzeug / Kabel (CP-Kurzschluss, 0V)
36-
StatusF ChargeStatus = "F" // Fzg. angeschlossen: ja Laden aktiv: nein Fehler EVSE oder Abstecken simulieren (CP-Wake-up, -12V)
3735
)
3836

3937
var StatusEasA = map[ChargeStatus]ChargeStatus{StatusE: StatusA}

api/error.go

+4-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,10 @@ var ErrMustRetry = errors.New("must retry")
1212
var ErrSponsorRequired = errors.New("sponsorship required, see https://github.com/evcc-io/evcc#sponsorship")
1313

1414
// ErrMissingCredentials indicates that user/password are missing
15-
var ErrMissingCredentials = errors.New("missing credentials")
15+
var ErrMissingCredentials = errors.New("missing user/password credentials")
16+
17+
// ErrMissingToken indicates that access/refresh tokens are missing
18+
var ErrMissingToken = errors.New("missing token credentials")
1619

1720
// ErrOutdated indicates that result is outdated
1821
var ErrOutdated = errors.New("outdated")

assets/js/components/Config/Modbus.vue

+4-4
Original file line numberDiff line numberDiff line change
@@ -116,9 +116,9 @@
116116
<PropertyField
117117
id="modbusBaudrate"
118118
property="baudrate"
119-
type="Int"
119+
type="Choice"
120120
class="me-2 w-50"
121-
:valid-values="baudrateOptions"
121+
:choice="baudrateOptions"
122122
required
123123
:model-value="baudrate || defaultBaudrate"
124124
@change="$emit('update:baudrate', $event.target.value)"
@@ -128,9 +128,9 @@
128128
<PropertyField
129129
id="modbusComset"
130130
property="comset"
131-
type="String"
131+
type="Choice"
132132
class="me-2 w-50"
133-
:valid-values="comsetOptions"
133+
:choice="comsetOptions"
134134
required
135135
:model-value="comset || defaultComset || '8N1'"
136136
@change="$emit('update:comset', $event.target.value)"

assets/js/components/Config/VehicleModal.vue

+4-4
Original file line numberDiff line numberDiff line change
@@ -96,9 +96,9 @@
9696
<PropertyField
9797
id="vehicleParamMode"
9898
v-model="values.mode"
99-
type="String"
99+
type="Choice"
100100
class="w-100"
101-
:valid-values="[
101+
:choice="[
102102
{ key: 'off', name: $t('main.mode.off') },
103103
{ key: 'pv', name: $t('main.mode.pv') },
104104
{ key: 'minpv', name: $t('main.mode.minpv') },
@@ -177,10 +177,10 @@
177177
<PropertyField
178178
id="vehicleParamPriority"
179179
v-model="values.priority"
180-
type="Int"
180+
type="Choice"
181181
size="w-100"
182182
class="me-2"
183-
:valid-values="priorityOptions"
183+
:choice="priorityOptions"
184184
required
185185
/>
186186
</FormRow>

assets/js/components/Config/defaultYaml/tariffs.yaml

+2-1
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,6 @@
99
# price: 0.08 # EUR/kWh
1010

1111
#co2: # carbon intensity forecast data
12-
# type: grünstromindex
12+
# type: template
13+
# template: grünstromindex
1314
# zip: <zip>

assets/js/components/Energyflow/Energyflow.vue

+20-10
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@
103103
data-testid="energyflow-entry-batterydischarge"
104104
@details-clicked="openBatterySettingsModal"
105105
>
106-
<template v-if="batteryGridChargeActive" #subline>
106+
<template v-if="batteryGridChargeLimitSet" #subline>
107107
<div class="d-none d-md-block">&nbsp;</div>
108108
</template>
109109
</EnergyflowEntry>
@@ -177,13 +177,25 @@
177177
detailsClickable
178178
@details-clicked="openBatterySettingsModal"
179179
>
180-
<template v-if="batteryGridChargeActive" #subline>
180+
<template v-if="batteryGridChargeLimitSet" #subline>
181181
<button
182182
type="button"
183-
class="btn-reset d-flex justify-content-between"
183+
class="btn-reset d-flex justify-content-between text-start pe-4"
184184
@click.stop="openBatterySettingsModal"
185185
>
186-
{{ batteryGridChargeText }} (≤ {{ batteryGridChargeLimitFmt }})
186+
<span v-if="batteryGridChargeActive">
187+
{{ $t("main.energyflow.batteryGridChargeActive") }}
188+
<span class="text-nowrap"
189+
>(≤ <u>{{ batteryGridChargeLimitFmt }}</u
190+
>)</span
191+
>
192+
</span>
193+
<span v-else>
194+
{{ $t("main.energyflow.batteryGridChargeLimit") }}
195+
<span class="text-nowrap"
196+
>≤ <u>{{ batteryGridChargeLimitFmt }}</u></span
197+
>
198+
</span>
187199
</button>
188200
</template>
189201
</EnergyflowEntry>
@@ -341,19 +353,17 @@ export default {
341353
pvPossible() {
342354
return this.pvConfigured || this.gridConfigured;
343355
},
344-
batteryGridChargeText() {
345-
return this.$t(
346-
`main.energyflow.${this.co2Available ? "clean" : "cheap"}BatteryGridCharge`
347-
);
348-
},
349356
batteryGridChargeNow() {
350357
if (this.co2Available) {
351358
return this.fmtCo2Short(this.tariffCo2);
352359
}
353360
return this.fmtPricePerKWh(this.tariffGrid, this.currency, true);
354361
},
362+
batteryGridChargeLimitSet() {
363+
return this.batteryGridChargeLimit !== null;
364+
},
355365
batteryGridChargeLimitFmt() {
356-
if (this.batteryGridChargeLimit === null) {
366+
if (!this.batteryGridChargeLimitSet) {
357367
return;
358368
}
359369
if (this.co2Available) {

assets/js/components/Sessions/AvgCostGroupedChart.vue

+1-2
Original file line numberDiff line numberDiff line change
@@ -92,8 +92,7 @@ export default {
9292
...commonOptions.plugins,
9393
tooltip: {
9494
...commonOptions.plugins.tooltip,
95-
intersect: false,
96-
mode: "index",
95+
axis: "r",
9796
position: "topBottomCenter",
9897
callbacks: {
9998
title: () => null,

assets/js/components/Sessions/CostGroupedChart.vue

+1-2
Original file line numberDiff line numberDiff line change
@@ -86,9 +86,8 @@ export default {
8686
...commonOptions.plugins,
8787
tooltip: {
8888
...commonOptions.plugins.tooltip,
89-
mode: "index",
89+
axis: "r",
9090
position: "center",
91-
intersect: false,
9291
callbacks: {
9392
label: (tooltipItem) => this.formatValue(tooltipItem.raw || 0),
9493
labelColor: tooltipLabelColor(false),

assets/js/components/Sessions/CostHistoryChart.vue

+1-2
Original file line numberDiff line numberDiff line change
@@ -223,8 +223,7 @@ export default {
223223
...commonOptions.plugins,
224224
tooltip: {
225225
...commonOptions.plugins.tooltip,
226-
mode: "index",
227-
intersect: false,
226+
axis: "x",
228227
positioner: (context) => {
229228
const { chart, tooltipPosition } = context;
230229
const { tooltip } = chart;

assets/js/components/Sessions/EnergyGroupedChart.vue

+1-2
Original file line numberDiff line numberDiff line change
@@ -102,9 +102,8 @@ export default {
102102
...commonOptions.plugins,
103103
tooltip: {
104104
...commonOptions.plugins.tooltip,
105-
mode: "index",
105+
axis: "r",
106106
position: "center",
107-
intersect: false,
108107
callbacks: {
109108
label: (tooltipItem) => this.formatValue(tooltipItem.raw || 0),
110109
labelColor: tooltipLabelColor(false),

assets/js/components/Sessions/EnergyHistoryChart.vue

+1-2
Original file line numberDiff line numberDiff line change
@@ -159,8 +159,7 @@ export default {
159159
...commonOptions.plugins,
160160
tooltip: {
161161
...commonOptions.plugins.tooltip,
162-
mode: "index",
163-
intersect: false,
162+
axis: "x",
164163
positioner: (context) => {
165164
const { chart, tooltipPosition } = context;
166165
const { tooltip } = chart;

assets/js/components/Sessions/SolarGroupedChart.vue

+1-2
Original file line numberDiff line numberDiff line change
@@ -92,8 +92,7 @@ export default {
9292
...commonOptions.plugins,
9393
tooltip: {
9494
...commonOptions.plugins.tooltip,
95-
intersect: false,
96-
mode: "index",
95+
axis: "r",
9796
position: "topBottomCenter",
9897
callbacks: {
9998
title: () => null,

assets/js/components/Sessions/SolarYearChart.vue

+1-2
Original file line numberDiff line numberDiff line change
@@ -147,8 +147,7 @@ export default {
147147
...commonOptions.plugins,
148148
tooltip: {
149149
...commonOptions.plugins.tooltip,
150-
intersect: false,
151-
mode: "index",
150+
axis: "xy",
152151
position: "topBottomCenter",
153152
callbacks: {
154153
label: (tooltipItem) => {

assets/js/components/Sessions/chartConfig.js

+2
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,8 @@ export const commonOptions = {
4545
boxPadding: 5,
4646
usePointStyle: false,
4747
borderWidth: 0.00001,
48+
mode: "index",
49+
intersect: false,
4850
},
4951
},
5052
};

assets/js/components/Site.vue

+4-1
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ export default {
6767
6868
// details
6969
gridConfigured: Boolean,
70-
gridPower: Number,
70+
grid: Object,
7171
homePower: Number,
7272
pvPower: Number,
7373
pv: Array,
@@ -113,6 +113,9 @@ export default {
113113
pvConfigured: function () {
114114
return this.pv?.length > 0;
115115
},
116+
gridPower: function () {
117+
return this.grid?.power || 0;
118+
},
116119
energyflow: function () {
117120
return this.collectProps(Energyflow);
118121
},
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<template>
2+
<svg width="1em" height="1em" viewBox="0 0 24 24">
3+
<path
4+
fill="currentColor"
5+
d="M8 22q-.425 0-.712-.288T7 21V5q0-.425.288-.712T8 4h2V3q0-.425.288-.712T11 2h2q.425 0 .713.288T14 3v1h2q.425 0 .713.288T17 5v16q0 .425-.288.713T16 22zm1-2h6V6H9zm0 0h6zm1-5.275q0 .575.213 1.088t.612.912l.225.225q.275.275.688.275t.712-.275q.3-.3.3-.712t-.3-.713l-.225-.225q-.125-.125-.175-.262T12 14.75q0-.175.05-.312t.175-.263l.95-.95q.4-.4.613-.9t.212-1.05q0-.575-.212-1.087t-.613-.913l-.25-.25q-.3-.3-.7-.288t-.7.313q-.275.3-.288.7t.288.7l.225.225q.125.125.188.262t.062.313q0 .15-.062.288t-.188.262l-.925.95q-.4.4-.612.9T10 14.725"
6+
/>
7+
</svg>
8+
</template>
9+
10+
<script>
11+
export default {
12+
name: "Battery",
13+
};
14+
</script>

0 commit comments

Comments
 (0)