Skip to content

Commit

Permalink
Merge branch 'evcc-io:master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
Blowfly69 authored Aug 1, 2024
2 parents a354c8b + ec9a2ab commit 229c391
Show file tree
Hide file tree
Showing 282 changed files with 10,955 additions and 3,965 deletions.
1 change: 1 addition & 0 deletions .github/ISSUE_TEMPLATE/bug_report.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ body:
render: text
description: >
Show evcc log output of the issue, see https://docs.evcc.io/en/docs/faq#how-do-i-create-a-log-file-for-error-analysis for instructions.
In case of issues with physical devices like chargers, meters or vehicles, make sure that the log file has level `trace` enabled for the device.
- type: dropdown
validations:
Expand Down
2 changes: 2 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,5 @@ updates:
directory: "/"
schedule:
interval: "monthly"
labels:
- "infrastructure"
4 changes: 2 additions & 2 deletions .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ jobs:
uses: docker/setup-buildx-action@v3

- name: Publish
uses: docker/build-push-action@v5
uses: docker/build-push-action@v6
with:
context: .
platforms: linux/amd64,linux/arm64,linux/arm/v6
Expand Down Expand Up @@ -103,7 +103,7 @@ jobs:
key: ${{ runner.os }}-${{ github.sha }}-dist

- name: Create nightly build
uses: goreleaser/goreleaser-action@v5
uses: goreleaser/goreleaser-action@v6
with:
version: latest
args: --snapshot -f .goreleaser-nightly.yml --clean
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ jobs:
evcc/evcc
- name: Publish
uses: docker/build-push-action@v5
uses: docker/build-push-action@v6
with:
context: .
platforms: linux/amd64,linux/arm64,linux/arm/v6
Expand Down Expand Up @@ -96,7 +96,7 @@ jobs:
# run: make image-rootfs

- name: Create Github Release
uses: goreleaser/goreleaser-action@v5
uses: goreleaser/goreleaser-action@v6
with:
version: latest
args: release --clean
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/stale.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ on:
workflow_dispatch:
schedule:
- cron: "0 0 * * *"
issue_comment:
types: [created]

jobs:
stale:
Expand All @@ -12,7 +14,7 @@ jobs:
- uses: actions/stale@v9
id: stale
with:
days-before-stale: 20
days-before-stale: 7
days-before-close: 5
exempt-issue-labels: "pinned,security,backlog,bug"
exempt-pr-labels: "pinned,security,backlog,bug"
2 changes: 2 additions & 0 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
version: 2

dist: release
release:
github:
Expand Down
7 changes: 7 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,13 @@ make ui build

evcc already includes many translations for the UI. We're using [Weblate](https://hosted.weblate.org/projects/evcc/evcc/) to maintain translations. Feel free to add more languages or verify and edit existing translations. Weblate will automatically push all modifications to the evcc repository where they get reviewed and merged.

If you find a text that is not yet translatable in [Weblate](https://hosted.weblate.org/projects/evcc/evcc/), you can help us by making it translatable. To do this, you can simply find the missing translation text in the code and apply similar changes as in these two Pull Requests:

- [UI: Add missing translation for Error during startup](https://github.com/evcc-io/evcc/pull/14695)
- [Translation: kein Plan, keine Grenze](https://github.com/evcc-io/evcc/pull/7461/)

Note: To ensure the build succeeds after creating new translations, make sure to include your new translations in both the [de.toml](i18n/de.toml) and [en.toml](i18n/en.toml) files.

[![Languages](https://hosted.weblate.org/widgets/evcc/-/evcc/multi-auto.svg)](https://hosted.weblate.org/engage/evcc/)

[1]: https://go.dev
Expand Down
4 changes: 3 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -84,13 +84,15 @@ COPY packaging/docker/bin/* /app/

# mDNS
EXPOSE 5353/udp
# EEBus
EXPOSE 4712/tcp
# UI and /api
EXPOSE 7070/tcp
# KEBA charger
EXPOSE 7090/udp
# OCPP charger
EXPOSE 8887/tcp
# GoodWe Wifi Inverter
# Modbus UDP
EXPOSE 8899/udp
# SMA Energy Manager
EXPOSE 9522/udp
Expand Down
3 changes: 2 additions & 1 deletion api/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"time"
)

//go:generate mockgen -package api -destination mock.go github.com/evcc-io/evcc/api Charger,ChargeState,CurrentLimiter,PhaseSwitcher,Identifier,Meter,MeterEnergy,PhaseCurrents,Vehicle,ChargeRater,Battery,Tariff,BatteryController,Circuit
//go:generate mockgen -package api -destination mock.go github.com/evcc-io/evcc/api Charger,ChargeState,CurrentLimiter,CurrentGetter,PhaseSwitcher,PhaseGetter,Identifier,Meter,MeterEnergy,PhaseCurrents,Vehicle,ChargeRater,Battery,Tariff,BatteryController,Circuit

// Meter provides total active power in W
type Meter interface {
Expand Down Expand Up @@ -222,6 +222,7 @@ type Circuit interface {
SetTitle(string)
GetParent() Circuit
RegisterChild(child Circuit)
Wrap(parent Circuit) error
HasMeter() bool
GetMaxPower() float64
GetMaxCurrent() float64
Expand Down
1 change: 1 addition & 0 deletions api/feature.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,5 @@ const (
IntegratedDevice
Heating
Retryable
WelcomeCharge
)
12 changes: 8 additions & 4 deletions api/feature_enumer.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion api/globalconfig/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ import (
"strconv"
"time"

"github.com/evcc-io/evcc/charger/eebus"
"github.com/evcc-io/evcc/provider/mqtt"
"github.com/evcc-io/evcc/push"
"github.com/evcc-io/evcc/server/eebus"
"github.com/evcc-io/evcc/util/config"
"github.com/evcc-io/evcc/util/modbus"
)
Expand Down
94 changes: 92 additions & 2 deletions api/mock.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions assets/css/app.css
Original file line number Diff line number Diff line change
Expand Up @@ -250,6 +250,10 @@ a:hover {
--bs-btn-hover-border-color: var(--bs-gray-medium);
}

.btn-link:hover {
color: var(--bs-primary);
}

.dark .btn-outline-secondary {
--bs-btn-color: var(--bs-gray-bright);
--bs-btn-border-color: var(--bs-gray-bright);
Expand Down
18 changes: 18 additions & 0 deletions assets/js/auth.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import { reactive, watch } from "vue";
import api from "./api";
import store from "./store";
import Modal from "bootstrap/js/dist/modal";
import { isSystemError } from "./utils/fatal";

const auth = reactive({
configured: true,
Expand All @@ -9,6 +11,11 @@ const auth = reactive({
});

export async function updateAuthStatus() {
if (store.state.offline || isSystemError(store.state.fatal)) {
// system not ready, skip auth check
return;
}

try {
const res = await api.get("/auth/status", {
validateStatus: (code) => [200, 501, 500].includes(code),
Expand Down Expand Up @@ -72,4 +79,15 @@ watch(
}
);

let timeoutId = null;
function debounedUpdateAuthStatus() {
clearTimeout(timeoutId);
timeoutId = setTimeout(() => {
updateAuthStatus();
}, 500);
}

watch(() => store.state.offline, debounedUpdateAuthStatus);
watch(() => store.state.fatal, debounedUpdateAuthStatus);

export default auth;
Loading

0 comments on commit 229c391

Please sign in to comment.