Skip to content

chore(config): faster control loop defaults — 2 s / 2 s / 500 W - #293

Merged
frahlg merged 1 commit into
masterfrom
chore/faster-default-control-loop
May 24, 2026
Merged

frahlg merged 1 commit into
masterfrom
chore/faster-default-control-loop

Conversation

@frahlg

@frahlg frahlg commented May 24, 2026

Copy link
Copy Markdown
Member

Summary

The 5 s default control_interval_s + 5 s min_dispatch_interval_s were inherited from the Rust port and predate the ~1 Hz site-meter cadences in production today. Drop both to 2 s — what most live installs (homelab-rpi, dev) have been running for weeks.

slew_rate_w stays at 500 → ~250 W/s ramp at 2 s ticks; gentle enough that inverters tolerate it.

For a snappier site, an operator can drop control_interval_s to 1 s (matches the Ferroamp ehub MQTT cadence). Documented in the example config.

Scope

Defaults-only. Any operator with an explicit control_interval_s / min_dispatch_interval_s in their config keeps exactly what they had.

Test plan

  • go test ./...
  • applyDefaults test updated to assert 2 s

🤖 Generated with Claude Code

The 5 s default control_interval_s + 5 s min_dispatch_interval_s
were inherited from the original Rust port and predate the
1 Hz site-meter cadences in production today. 2 s matches Ferroamp
ehub MQTT (~1 Hz) without dispatching twice on the same telemetry
sample, halves the perceived response lag, and is what the
operator's live config has been running for weeks.

slew_rate_w stays at 500 — at 2 s ticks that's ~250 W/s ramp,
gentle enough that inverters tolerate it without protest. Drop
control_interval to 1 s for a snappier site (see the example
comment).

This is a defaults-only change: any operator with an explicit
control_interval_s / min_dispatch_interval_s in their config keeps
exactly what they had.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
@frahlg
frahlg merged commit 627e7ec into master May 24, 2026
1 check passed
@frahlg
frahlg deleted the chore/faster-default-control-loop branch May 24, 2026 17:56
frahlg added a commit that referenced this pull request Dec 2, 2026
The setup guide wrote control_interval_s 5, slew_rate_w 500 and
min_dispatch_interval_s 5. It copied the defaults when it was added in
April (#66); the defaults moved to 2 s / 3000 W / 2 s in May (#293,
#298) and the guide did not follow. Settings → Control showed the same
old values as its fallbacks.

The guide now sends 2 / 3000 / 2, and Settings → Control shows them.
It cannot leave the fields out: with a house password the box stores
the guide's settings as sent and fills no defaults, so a missing
slew_rate_w would turn the ramp limit off.

wizardOrDefaultSeed still knows a guide seed only by 5 / 500 / 5. An
older Core saves 2 / 3000 / 2 for an untuned home, and that save must
import after a rollback.

Tests: a guard that the guide and the Control tab match applyDefaults,
the seed check for the old and new values, and an older Core's save
with default timings importing over live Settings.

Co-authored-by: Claude Opus 5.5 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant