Learn the overrun in °C and pre-start before a schedule step #16

Merged
pti merged 18 commits from overrun-pre-start into main 2026-11-02 20:30:23 +01:00
Owner

Measured on blub, 2026-10-29 to 11-02 on the buros sensor, the overrun after switch-off is 0.63–0.82 °C whatever the rise rate, so the anticipator now learns the overrun as a temperature with EWMA 0.3 instead of a time, and before a schedule step up the thermostat pre-starts the warm-up so the room is halfway to the new target at the step: lead = learned dead time + half step / learned warm-up rate, latched until the step, controller untouched. Design: docs/superpowers/specs/2026-11-02-overrun-and-pre-start-design.md — plan: docs/superpowers/plans/2026-11-02-overrun-and-pre-start.md. Config: heating.anticipation.overrun / max_overrun replace overrun_time / max_overrun_time with no alias, and the new block heating.pre_start has enabled, warm_up_rate, dead_time, max_lead. Migrations: 007 converts coast_records and anticipation_samples to °C and drops the four *_time_seconds columns, values converted not lost — 008 adds warm_up_records and anticipation_samples.pre_start. API /api/history/anticipation gains warm_up_records and pre_start, the dashboard shows "pre-start for 09:00", heating history reads "Pre-start for 09:00" and freeze protection keeps its own reason. Deploy notes for blub: back up thermostat.db first, then update /etc/thermostat/config.yaml with overrun: 0.7, max_overrun: 2.0 and the pre_start block from configs/config.yaml.blub — old keys load silently as zero, and make deploy ships the example config with pre-start disabled. Verified: make fmt-check, make test, go vet, go test -race on application, domain and sqlite all green. 🤖 Generated with Claude Code, https://claude.com/claude-code

Measured on blub, 2026-10-29 to 11-02 on the buros sensor, the overrun after switch-off is 0.63–0.82 °C whatever the rise rate, so the anticipator now learns the overrun as a temperature with EWMA 0.3 instead of a time, and before a schedule step up the thermostat pre-starts the warm-up so the room is halfway to the new target at the step: lead = learned dead time + half step / learned warm-up rate, latched until the step, controller untouched. Design: docs/superpowers/specs/2026-11-02-overrun-and-pre-start-design.md — plan: docs/superpowers/plans/2026-11-02-overrun-and-pre-start.md. Config: heating.anticipation.overrun / max_overrun replace overrun_time / max_overrun_time with no alias, and the new block heating.pre_start has enabled, warm_up_rate, dead_time, max_lead. Migrations: 007 converts coast_records and anticipation_samples to °C and drops the four *_time_seconds columns, values converted not lost — 008 adds warm_up_records and anticipation_samples.pre_start. API /api/history/anticipation gains warm_up_records and pre_start, the dashboard shows "pre-start for 09:00", heating history reads "Pre-start for 09:00" and freeze protection keeps its own reason. Deploy notes for blub: back up thermostat.db first, then update /etc/thermostat/config.yaml with overrun: 0.7, max_overrun: 2.0 and the pre_start block from configs/config.yaml.blub — old keys load silently as zero, and make deploy ships the example config with pre-start disabled. Verified: make fmt-check, make test, go vet, go test -race on application, domain and sqlite all green. 🤖 Generated with Claude Code, https://claude.com/claude-code
pti added 17 commits 2026-11-02 15:27:47 +01:00
Measured on blub 2026-10-29 to 2026-11-02: the overrun after switch-off is
about 0.7 °C whatever the rise rate, so the time-based model chases.
Pre-start begins the warm-up early so the room is halfway at the step.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
The pre-start reason replaced only the band's switch-on reason, so a
freeze-protection switch-on is restored after a restart. A heating cycle
whose fit has no positive slope no longer teaches a 0.1 C/h warm-up rate.
Spec and CLAUDE.md amended.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
make deploy copied configs/config.yaml.example over /etc/thermostat/config.yaml,
which would have wiped blub's sensors, relay pin and MQTT settings. The config
is a manual step now. build-arm no longer fails where file(1) is missing.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
pti merged commit 26fa76ab6e into main 2026-11-02 20:30:23 +01:00
pti deleted branch overrun-pre-start 2026-11-02 20:30:32 +01:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
pti/blubgo!16
No description provided.