Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
350 commits
Select commit Hold shift + click to select a range
338745a
chore: playwright speedup, cache install (#21846)
naltatis Jun 14, 2025
e1d1d97
Site: remove cuircuit and maxGridSupplyWhileBatteyCharging (BC) (#21838)
andig Jun 15, 2025
b55a028
chore: simplify
andig Jun 15, 2025
75a2053
chore: simplify
andig Jun 15, 2025
d18083d
chore: Typescript: Rewrite tests (#21723)
Maschga Jun 15, 2025
6a0bb07
fix: on demand plant id generation (#21873)
naltatis Jun 17, 2025
43faef0
Autel: clarify firmware version (#21872)
viper-666 Jun 17, 2025
09ad2d5
chore: fix npm run lint; spaces > tabs for .ts (#21879)
naltatis Jun 17, 2025
c3bb1d1
Daheimladen: fix currents
andig Jun 18, 2025
8c04665
Add Daheimladen Pro (#21893)
andig Jun 18, 2025
b4fd6b1
chore: fix completions by moving version info to root (#21903)
andig Jun 18, 2025
df9b1c9
Revert "Daheimladen: fix currents"
andig Jun 18, 2025
1a0fe7c
wip
andig Jun 18, 2025
7962711
Daheimladen: fix phase values (#21907)
andig Jun 18, 2025
33e84d9
Daheimladen: add mA current control (#21908)
andig Jun 18, 2025
0c49065
chore: align how currents get set (#21909)
andig Jun 18, 2025
926930f
Sax: fix battery control (#21888)
juergen-weber Jun 18, 2025
2282d25
Keba Modbus: fix failsafe mode and enabled detection (#21849)
andig Jun 18, 2025
b1782f8
Phoenix EM-ETH: fix currents (#21913)
andig Jun 18, 2025
991ec6d
Translations update from Hosted Weblate (#21730)
weblate Jun 18, 2025
5fa4726
Varta: add battery control (#21841)
zoomy01 Jun 18, 2025
4b0b3cf
Add min/max physical current to loadpoint (#21187)
naltatis Jun 18, 2025
b97e6fc
chore: less playwright logging (#21914)
naltatis Jun 18, 2025
f8716fd
Revert "Add min/max physical current to loadpoint (#21187)"
andig Jun 19, 2025
32c0d0e
Add explicit demo mode (#21848)
guido4096 Jun 20, 2025
b7a9e6f
chore: Typescript: Rewrite remaining components (#21638)
Maschga Jun 20, 2025
5570d50
chore: Typescript: Rewrite utils (#21660)
Maschga Jun 20, 2025
b02ba90
Config UI: custom charger meter title (#21954)
naltatis Jun 21, 2025
bdb7853
Establish stricter sqlite file permissions (#21947)
naltatis Jun 21, 2025
ef17db2
chore: consistently rename vehicle Title api to GetTitle (#21955)
andig Jun 21, 2025
2d30380
Varta: fix template
andig Jun 21, 2025
9f1e07c
Sofar: Updated documentation with detailed external link for connecti…
cschlipf Jun 21, 2025
60cdd05
Renault Zoe: add note about mincurrent (#21930)
VolkerK62 Jun 21, 2025
e6be4ec
Add SunSpec meters for chargers (#21977)
marcelGoerentz Jun 22, 2025
7a1d36b
Site: fix accumulated pv energy persistence (#21993)
andig Jun 23, 2025
cedd5a7
Config UI: fix user-defined vehicle title/icon not displayed (#21956)
andig Jun 23, 2025
a5079d9
chore: fix deleting from slice
andig Jun 23, 2025
7d6402c
Delta: fix reason disconnect (#21996)
premultiply Jun 23, 2025
99ea49d
Sax: fix battery control(#22000)
juergen-weber Jun 23, 2025
cda3b61
UI: fix en fallback locale (#22003)
naltatis Jun 23, 2025
037e2c1
Translations update from Hosted Weblate (#21953)
weblate Jun 23, 2025
27f76f0
Add Compleo Solo/Duo (#22013)
andig Jun 24, 2025
2eb9edc
SGReady: reset session energy when status off (#22014)
andig Jun 24, 2025
030c7b9
chore: fix MQTT test skip mechanism if remote server is down (#22019)
naltatis Jun 24, 2025
dac4a8b
LG ESS Home 8: fix version check for battery (#22029)
marcelGoerentz Jun 24, 2025
72942d8
Renault Twingo: add to min current hint for 3p (#22031)
savus4 Jun 24, 2025
f2e1fa8
Heatpump: reset session energy when status off (#22032)
andig Jun 24, 2025
59555ee
chore: demo mode deploy
naltatis Jun 25, 2025
b4bf540
chore: playwright stability (#22042)
naltatis Jun 25, 2025
9dffb07
chore: npm dependency upgrades (#22040)
naltatis Jun 25, 2025
d306109
Shelly 3EM: add Gen.1 hint (#22043)
VolkerK62 Jun 25, 2025
c504452
Translations update from Hosted Weblate (#22037)
weblate Jun 26, 2025
59a6e7e
EVSE DIN: add mA control (#22055)
premultiply Jun 26, 2025
e3cc099
Sofar: Template doc: Markdown syntax (#21999)
cschlipf Jun 26, 2025
ee1cc90
chore: test stability "next plan" (#22074)
naltatis Jun 26, 2025
d9c6ce2
Heating: add daily session reset (#22068)
andig Jun 26, 2025
e1bec38
Heating: remove session workarounds (#22069)
andig Jun 26, 2025
8086991
Volvo: fix connected api (#22078)
lehmanju Jun 27, 2025
5ddaac0
Add demo solar forecast template (#21971)
terrorobe Jun 27, 2025
e0bdf04
Add smart feed-in priority (#21813)
andig Jun 27, 2025
49d6688
Battery grid charge non experimental (#22090)
naltatis Jun 27, 2025
07a8fc7
EVSE DIN: fix link to documentation (#22102)
benesolar Jun 28, 2025
44783f9
chore: add a CLAUDE.md (#22107)
andig Jun 28, 2025
46a3808
chore: used context
andig Jun 28, 2025
e7595a2
Easee: use provided context (#22111)
andig Jun 29, 2025
941232f
Loadpoint: reset energy metrics when creating session (#22126)
andig Jun 29, 2025
1a19478
Volvo: add odometer (BC) (#22124)
HerrBri Jun 30, 2025
46473bf
MyPV: fix status mapping (#21983)
docolli Jun 30, 2025
6a5f232
Translations update from Hosted Weblate (#22075)
weblate Jun 30, 2025
464d77d
Teslalogger: add limitsoc, correct default port (#22142)
uwen70 Jul 1, 2025
3ac67af
chore: use claude for issue labeling (#22144)
andig Jul 1, 2025
ed3a617
chore: fix action
andig Jul 1, 2025
69f4481
chore: allow claude to access gh and github mcp server
andig Jul 1, 2025
725f33c
chore: move mcp servers to file
andig Jul 1, 2025
6462e07
chore: omit version
andig Jul 1, 2025
14ae9a1
Daheimladen: clarify models
andig Jul 1, 2025
2c63dd9
chore: disable claude
andig Jul 1, 2025
0afbbb8
Sessions: fix loadpoint selection (#22117)
Maschga Jul 1, 2025
4b83f36
chore: fix EOF
andig Jul 1, 2025
9a1d9ee
chore: improve plan and lp config e2e stability (#22163)
naltatis Jul 2, 2025
14f4223
chore: rename claude-issue-triage.yml
andig Jul 2, 2025
9bd2e14
chore: claude-issue-triage.yml
andig Jul 2, 2025
2064119
chore: fix mcp server
andig Jul 2, 2025
f402ec5
chore: fix label use
andig Jul 2, 2025
2f1fba6
chore: e2e plan stability (#22173)
naltatis Jul 2, 2025
20b0db6
EM2GO: fix charging state, add comments for returned status code (#22…
dniakamal Jul 2, 2025
0f93087
UI: fix telemetry status (#22184)
naltatis Jul 3, 2025
3bdc858
chore: instruct claude to use issue types where applicable
andig Jul 4, 2025
139db51
Fix Carwings: upgrade to latest commit with new API URL (#22207)
andig Jul 4, 2025
e418c7d
cli: add heartbeat option to charger/meter (#22170)
andig Jul 4, 2025
826f4f3
Revert "Easee: remove outdated special handling of SessionEnergy (#20…
GrimmiMeloni Jul 5, 2025
7676ace
Easee: chore - remove dead code and outdated comments (#22214)
GrimmiMeloni Jul 5, 2025
c3c33de
LG ESS: Battery Control: Rework Firmware Check (#22189)
uwen70 Jul 5, 2025
3e95d52
Add AI support via model context protocol api (#22121)
andig Jul 5, 2025
1bb015d
chore: fix docker build
andig Jul 5, 2025
f725abd
Etrel: map charger status 0 (#22227)
premultiply Jul 6, 2025
4332ca2
Open-Meteo: use instant irradiance and UTC timestamps (#22225)
tantive Jul 6, 2025
ade5fe6
Translations update from Hosted Weblate (#22154)
weblate Jul 6, 2025
25e50ec
KEBA: clarify description for variants (#22220)
crazyfx1 Jul 6, 2025
7e1549d
Add TeslaFi vehicle (#22245)
erikarenhill Jul 7, 2025
5015ca4
Config UI: add heating support (#22177)
naltatis Jul 7, 2025
1d2a40e
chore: try depot runners
naltatis Jul 8, 2025
5e0e810
chore: try depot runners
naltatis Jul 8, 2025
c6bef4a
revert: chore: try depot runners
naltatis Jul 8, 2025
01fbdd1
Lambda: support for excess energy specified in negative numbers (#21972)
anbie Jul 8, 2025
c343fc3
chore: depot runners (#22256)
naltatis Jul 8, 2025
4f902b6
Mcp: limit tool names to 64 characters for Claude Code
andig Jul 8, 2025
b564390
chore: upgrade modules
andig Jul 8, 2025
06b17fc
Revert "chore: upgrade modules"
naltatis Jul 9, 2025
e0f1018
docs: Senec: Klarstellung Batteriesteuerung (#22274)
VolkerK62 Jul 9, 2025
c6ce2c0
TeslaFi: use a more reliable way of detecting connected cable (#22270)
erikarenhill Jul 9, 2025
dbd8fa3
Mercedes: fix unexpected status: 418 (I'm a teapot) (#22284)
ReneNulschDE Jul 10, 2025
6c10ffc
Loadpoint: replace empty session energy round trip with meter values …
andig Jul 10, 2025
11f0e2d
Config UI: general settings wrap (#22276)
naltatis Jul 10, 2025
09c2569
Revert "Loadpoint: replace empty session energy round trip with meter…
andig Jul 10, 2025
f5cad24
Loadpoint: reset fake charge rater when interrupting session (#22293)
andig Jul 10, 2025
1b49c9c
chore: remove unnecessary assertions (#22297)
andig Jul 10, 2025
485dbde
chore: e2e stability (#22307)
naltatis Jul 11, 2025
b179861
Loadpoint: fix current decimals (#22335)
naltatis Jul 13, 2025
47cbed4
chore: improve template error message (#22324)
mpollmeier Jul 13, 2025
92362d4
Reapply "chore: upgrade modules"
andig Jul 13, 2025
430fba0
chore: fix viper regression
andig Jul 13, 2025
36bf895
chore: better docs
andig Jul 13, 2025
5b135e5
Viessmann: remove 'target temperature' parameter (#22325)
mpollmeier Jul 13, 2025
fb68963
chore: speedup mbmd setup
andig Jul 13, 2025
e227d2a
chore: align proxy logging
andig Jul 13, 2025
e1b3082
Viessmann: change host to viessmann-climatesolutions.com (#22350)
mpollmeier Jul 13, 2025
2160665
HomeAssistant Smart Switch - support for alternative domains (#22349)
marq24 Jul 13, 2025
9ad580f
Config UI: Add backup & restore (BC) (#22071)
Maschga Jul 14, 2025
82b4b8e
Teslalogger: revert default port change
andig Jul 14, 2025
e38a528
Loadpoint: reset fake charge time when interrupting session (#22396)
andig Jul 16, 2025
66ce7f2
Keba P40: update installation docs (#22386)
crazyfx1 Jul 16, 2025
6411c3b
MyPV charger: skip load state request for ac-elwa-2 (#22374)
docolli Jul 16, 2025
1f6b7ec
Update OpenAPI
andig Jul 16, 2025
7f83579
Update OpenAPI (part 2)
andig Jul 16, 2025
c78eda4
chore: upgrade modules
andig Jul 16, 2025
f851b89
CLI: honor config file as optional (#22398)
naltatis Jul 16, 2025
a403663
Amber: invert feed-in prices to match evcc expectations (#22405)
ross-w Jul 16, 2025
c3dd060
Polestar: fix status detection
andig Jul 16, 2025
fdf23a0
Backup Restore: clarify password (#22411)
naltatis Jul 17, 2025
a69e4fe
chore: improve mcp tool names
andig Jul 17, 2025
5a38ac1
Keba: fix writing failsafe timeout
andig Jul 17, 2025
ac8b923
chore: bump @intlify/core-base and vue-i18n (#22408)
dependabot[bot] Jul 18, 2025
fadc5b5
Translations update from Hosted Weblate (#22253)
weblate Jul 18, 2025
1c4a314
Loadpoint: prevent configuring more phases than physically connected …
andig Jul 18, 2025
c6a4f1a
Loadpoint: honor physical phases on init (#22441)
andig Jul 18, 2025
a715b7c
Fix co2 grid charge (#22440)
naltatis Jul 18, 2025
a14606b
Tariffs: add caching (#22446)
andig Jul 19, 2025
ee8b3b8
chore: more sophisticated caching
andig Jul 20, 2025
602f7c1
chore: fix lint
andig Jul 20, 2025
d6d4008
Config UI: improve residual power input field (#22435)
naltatis Jul 20, 2025
98448fe
Add demo co2 tariff (#22447)
terrorobe Jul 22, 2025
2dbf835
Wattpilot: fix connection handling (#22489)
mabunixda Jul 22, 2025
5753cdf
Solax: fix energy (#22508)
premultiply Jul 23, 2025
fec1ea9
Loadpoint: fix usage of phase switch timer (#22525)
andig Jul 25, 2025
77c915b
Collect household consumption metrics (#22526)
andig Jul 25, 2025
4dc21be
Add Em2Go Duo Power charger support
andig Jul 25, 2025
d811e8a
chore: fix sql
andig Jul 26, 2025
efe6489
chore: fix template
andig Jul 26, 2025
ceab938
chore: simplify
andig Jul 26, 2025
a2f1d3f
chore: consistent name
andig Jul 26, 2025
bd6f7eb
chore: fix slot length
andig Jul 26, 2025
ff55688
ac-elwa-2: add tempsource (#22540)
andig Jul 26, 2025
2957811
chore: fix metrics profile
andig Jul 26, 2025
2500b02
Lambda: make port configurable (#22196)
anbie Jul 26, 2025
05f89d1
Amber: use billing-native resolution, request up to 72 hours ahead (#…
ross-w Jul 27, 2025
b9b8233
Fox-ESS H3: fix meter total (#22553)
fabian1512 Jul 27, 2025
8eea408
daheimladen-mb: fix status verification for B/C states (#22562)
andig Jul 27, 2025
4301b26
Add co2 grid charge tests (#22444)
andig Jul 28, 2025
824503e
chore: upgrade modules
andig Jul 28, 2025
054d1b0
UI: initial password modal can't be dismissed (#22576)
naltatis Jul 28, 2025
07f8745
Add batterX Home (#22476)
gramss Jul 28, 2025
fb20099
chore: fix co2 battery e2e test
naltatis Jul 28, 2025
abadf20
Janitza: add pv usage (#22586)
andig Jul 28, 2025
e9125d7
chore: upgrade modules
andig Jul 29, 2025
9f6201a
chore: mention evcc config in bug template (#22600)
StefanSchoof Jul 29, 2025
7ce0ad3
Translations update from Hosted Weblate (#22458)
weblate Jul 29, 2025
d01cabd
Add Ochsner BWWP Genius (#22585)
andig Jul 30, 2025
33e132a
Revert "Solax: fix energy (#22508)"
andig Jul 30, 2025
f5f9111
Config UI: make network port required (#22631)
naltatis Jul 30, 2025
441e5a6
MyPV charger: fix charger logic error (#22402)
docolli Jul 30, 2025
eb809fe
chore: upgrade modules
andig Jul 30, 2025
48933b8
Migrate telemetry state to publishing (BC) (#22653)
naltatis Aug 1, 2025
cf606bb
OpenAPI: migrate (#22429)
andig Aug 1, 2025
dbe7838
E3dc: fix auth errors (#22659)
andig Aug 1, 2025
3496f43
UI: layout stability status timer (#22662)
naltatis Aug 1, 2025
8aa5689
REST API: simplify json response by removing result wrapper (BC) (#22…
andig Aug 1, 2025
4f81607
Config UI: remove deprecated params for single device (#22669)
andig Aug 1, 2025
88f8f0c
chore: simplify
andig Aug 1, 2025
a7d9002
Add Home Assistant Vehicle (#22594)
thecem Aug 1, 2025
a80eeb0
Add dedicated db cache table (#22650)
naltatis Aug 2, 2025
696a85f
chore: switch to maintained go.yaml.in/yaml/v4 (#22134)
andig Aug 2, 2025
1b6cf65
Config UI: improve sponsor communication (#22683)
naltatis Aug 2, 2025
5421d67
chore: simplify
andig Aug 2, 2025
53f331b
Unwrap multiple errors
andig Aug 2, 2025
494f9da
Revert "Unwrap multiple errors"
andig Aug 2, 2025
d5b09b9
Translations update from Hosted Weblate (#22646)
weblate Aug 2, 2025
7b4b8d4
chore: fix docker
andig Aug 2, 2025
0dd2634
chore: remove dedicated timeseries type (#22692)
andig Aug 2, 2025
97db232
chore: ignore databases
andig Aug 2, 2025
8188810
Daheimladen: add enable/disable delay (#22695)
VolkerK62 Aug 3, 2025
c85d65a
Config UI: allow repairing broken loadpoints and site (#22671)
andig Aug 3, 2025
89ce21d
stationid require for ui
naltatis Aug 3, 2025
ea908b1
Ocpp: fix connector not de-registered (#22113)
andig Aug 3, 2025
5b3300f
Ocpp: clarify stationid as soft required
andig Aug 3, 2025
e6512be
Docs: document watchdog (#22715)
docolli Aug 3, 2025
7d02be1
Kia/Hyundai: fix login api (#22709)
RustyDust Aug 3, 2025
03a94b6
chore: npm upgrades (#22725)
naltatis Aug 3, 2025
c7dd4ca
Home Assistant Vehicle: include common vehicle parameters (#22727)
thecem Aug 4, 2025
9a5ab76
Kia/Hyundai: fix login (#22729)
RustyDust Aug 4, 2025
6616fd0
Homeassistant Switch: make power optional (#22750)
andig Aug 4, 2025
d984889
chore: upgrade deprecated AWS SDK (#22738)
andig Aug 4, 2025
7e53da0
chore: fix typo (#22764)
docolli Aug 4, 2025
b570faf
Home Assistant Vehicle: add charging_completed & fix parse float (#22…
thecem Aug 4, 2025
f155153
Homeassistent Vehicle: support for state sensors already providing a …
marq24 Aug 5, 2025
7829f93
chore: Add AGENTS.md (#22776)
naltatis Aug 5, 2025
da80832
chore: update LICENSE (#22784)
andig Aug 5, 2025
bdcb61c
chore: Typescript: Rewrite views (#21714)
Maschga Aug 5, 2025
dbd85bc
Improve oauth integration (#21266)
lehmanju Aug 5, 2025
d342b9c
fix: providerauth UI not shown (#22801)
lehmanju Aug 6, 2025
f680e8f
chore: upgrade modules (#22804)
andig Aug 6, 2025
e150604
chore: simplify
andig Aug 6, 2025
efbc0dd
MCP: better tool naming (#22812)
andig Aug 6, 2025
1bc3a1c
chore: fix variable names (#22819)
lfloeer Aug 7, 2025
ebcb067
chore: fix storybook
naltatis Aug 7, 2025
9c9f492
Homeassistant Vehicle: add additional states for Porsche (#22832)
ivoks Aug 7, 2025
54bd2ce
Mercedes: add new charging status values (#22826)
ReneNulschDE Aug 7, 2025
d89a89f
Hyundai: revert api change (#22833)
RustyDust Aug 8, 2025
c609047
UI: Loadpoint settings: display kW next to min/max current (#22843)
Maschga Aug 8, 2025
2dcd4b8
chore: e2e stability vehicle settings, fatal (#22848)
naltatis Aug 8, 2025
e022332
daheimladen-pro: add firmware note (#22853)
VolkerK62 Aug 8, 2025
8c9f638
Eastron DS100: fix reg power
premultiply Aug 9, 2025
5ebc1dc
chore: gracefully handle deprecated parameters
andig Aug 9, 2025
e149d91
Lambda Zewotherm: use "E-Eintrag" mode only (BC) (#22811)
fzahn Aug 9, 2025
f42d419
chore: upgrade modules (#22861)
guido4096 Aug 9, 2025
b80fb0b
Amber: normalise rates to 1-hour slots (#22870)
ross-w Aug 10, 2025
d637028
Switch MCP implementation to modelcontextprotocol/go-sdk (#22859)
andig Aug 10, 2025
216b568
MCP: improve tool naming, add docs (#22862)
andig Aug 10, 2025
d784306
Ocpp: warn when unknown chargepoint connects (#22880)
andig Aug 10, 2025
98be60a
Translations update from Hosted Weblate (#22693)
weblate Aug 10, 2025
7038b2e
Lambda: keep "excess-parameter" for backward compatibility (#22883)
fzahn Aug 10, 2025
efc8d31
chore: debug solar production jump (#22888)
andig Aug 10, 2025
fc57ef8
Fiat: fix panic
andig Aug 11, 2025
27c7240
chore: upgrade to go 1.25
andig Aug 11, 2025
020a462
Merge branch 'master' into chore/go-125
andig Aug 11, 2025
45ff36e
wip
andig Aug 11, 2025
f707962
wip
andig Aug 11, 2025
b3aa163
wip
andig Aug 11, 2025
1710b2f
wip
andig Aug 14, 2025
1d86812
Merge branch 'master' into chore/go-125
andig Aug 14, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .golangci.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
version: "2"
run:
go: "1.24"
go: "1.25"
linters:
default: none
enable:
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ RUN make ui


# STEP 2 build executable binary
FROM --platform=$BUILDPLATFORM golang:1.24-alpine AS builder
FROM --platform=$BUILDPLATFORM golang:1.25-alpine AS builder

# Install git + SSL ca certificates.
# Git is required for fetching the dependencies.
Expand Down
21 changes: 8 additions & 13 deletions cmd/detect/work.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,26 +11,21 @@ import (
"github.com/jeremywohl/flatten"
)

func workers(log *util.Logger, num int, tasks <-chan string, hits chan<- []tasks.Result) *sync.WaitGroup {
func workers(log *util.Logger, num int, ips <-chan string, hits chan<- []tasks.Result) *sync.WaitGroup {
var wg sync.WaitGroup

for range num {
wg.Add(1)
go func() {
workunit(log, tasks, hits)
wg.Done()
}()
wg.Go(func() {
for ip := range ips {
res := taskList.Test(log, "", tasks.ResultDetails{IP: ip})
hits <- res
}
})
}

return &wg
}

func workunit(log *util.Logger, ips <-chan string, hits chan<- []tasks.Result) {
for ip := range ips {
res := taskList.Test(log, "", tasks.ResultDetails{IP: ip})
hits <- res
}
}

func Work(log *util.Logger, num int, hosts []string) []tasks.Result {
ip := make(chan string)
hits := make(chan []tasks.Result)
Expand Down
9 changes: 2 additions & 7 deletions cmd/shutdown/shutdown.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,11 @@ func Register(cb func()) {

// Cleanup executes the registered shutdown functions when the stop channel closes
func Cleanup(doneC chan struct{}) {
wg := new(sync.WaitGroup)
var wg sync.WaitGroup

mu.Lock()
for _, cb := range handlers {
wg.Add(1)

go func(cb func()) {
cb()
wg.Done()
}(cb)
wg.Go(cb)
}
mu.Unlock()

Expand Down
8 changes: 3 additions & 5 deletions cmd/token_tronity.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,20 +64,18 @@ func tronityAuthorize(addr string, oc *oauth2.Config) (*oauth2.Token, error) {
mux := &http.ServeMux{}
mux.HandleFunc("/auth/tronity", handler)

wg := new(sync.WaitGroup)
s := &http.Server{
Addr: addr,
Handler: mux,
}

// start server
wg.Add(1)
go func() {
var wg sync.WaitGroup
wg.Go(func() {
if err := s.ListenAndServe(); err != http.ErrServerClosed {
log.FATAL.Fatal(err)
}
wg.Done()
}()
})

// close on exit
defer func() {
Expand Down
17 changes: 7 additions & 10 deletions core/site.go
Original file line number Diff line number Diff line change
Expand Up @@ -483,7 +483,6 @@ func (site *Site) publish(key string, val interface{}) {
}

func (site *Site) collectMeters(key string, meters []config.Device[api.Meter]) []measurement {
var wg sync.WaitGroup
mm := make([]measurement, len(meters))

fun := func(i int, dev config.Device[api.Meter]) {
Expand Down Expand Up @@ -525,13 +524,14 @@ func (site *Site) collectMeters(key string, meters []config.Device[api.Meter]) [
Power: power,
Energy: energy,
}

wg.Done()
}

wg.Add(len(meters))
var wg sync.WaitGroup

for i, meter := range meters {
go fun(i, meter)
wg.Go(func() {
fun(i, meter)
})
}
wg.Wait()

Expand Down Expand Up @@ -885,18 +885,15 @@ func (site *Site) updateLoadpoints(rates api.Rates) float64 {
sum float64
)

wg.Add(len(site.loadpoints))
for _, lp := range site.loadpoints {
go func() {
wg.Go(func() {
power := lp.UpdateChargePowerAndCurrents()
site.prioritizer.UpdateChargePowerFlexibility(lp, rates)

mu.Lock()
sum += power
mu.Unlock()

wg.Done()
}()
})
}
wg.Wait()

Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/evcc-io/evcc

go 1.24.0
go 1.25.0

require (
dario.cat/mergo v1.0.2
Expand Down
10 changes: 3 additions & 7 deletions server/modbus/proxy_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,8 @@ func TestConcurrentRead(t *testing.T) {

var wg sync.WaitGroup

for i := 1; i <= 10; i++ {
wg.Add(1)

go func(id int) {
for id := 1; id <= 10; id++ {
wg.Go(func() {
// client
conn, err := modbus.NewConnection(context.TODO(), l.Addr().String(), "", "", 0, modbus.Tcp, uint8(id))
require.NoError(t, err)
Expand All @@ -53,9 +51,7 @@ func TestConcurrentRead(t *testing.T) {

time.Sleep(time.Duration(rand.Int31n(1000)) * time.Microsecond)
}

wg.Done()
}(i)
})
}

wg.Wait()
Expand Down
Loading