Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
86 commits
Select commit Hold shift + click to select a range
c56fccf
feat(auth): connect an assistant without a terminal (#1832)
frahlg Oct 25, 2026
b0ce810
fix(mpc): the plan keeps each clock hour under the import ceiling (#1…
frahlg Oct 25, 2026
e5edf34
chore(optimizer): bundle Energyplan 0.6.0 (#1858)
frahlg Oct 25, 2026
792ef29
fix(loadpoint): the deadline reserve holds to the plan's limits, not …
frahlg Oct 25, 2026
2e45772
chore(release): version packages (#1855)
frahlg Oct 25, 2026
34f425e
fix(control): ship SOC ceilings and Charge restart recovery (#1870)
frahlg Oct 27, 2026
19db633
chore(release): version packages (#1871)
frahlg Oct 27, 2026
e293e2a
fix(control): car charging takes priority over home battery charging …
frahlg Oct 27, 2026
83c2b24
chore(release): version packages (#1873)
frahlg Oct 27, 2026
8c66c4a
fix(config): a zero control interval or watchdog means unset (#1903)
frahlg Oct 27, 2026
2be6210
fix(state): heal state.db before reading settings (#1902)
frahlg Oct 27, 2026
fd928c6
fix(state): heal a damaged or missing history.db instead of exiting (…
frahlg Oct 27, 2026
3448637
fix(state): one unreadable Parquet file never stops boot (#1901)
frahlg Oct 27, 2026
d35748e
fix(nativeupdate): fall back to the previous release when current is …
frahlg Oct 27, 2026
47b54d4
fix(drivers): retry a driver that fails to start (#1890)
frahlg Oct 27, 2026
61a0804
fix(drivers): a slow success is a success (#1889)
frahlg Oct 27, 2026
53bf2a0
test(native): run the whole update chain with real builds (#1884)
frahlg Oct 27, 2026
4e22b10
fix(selfupdate): save the update channel on first boot (#1899)
frahlg Oct 27, 2026
676085a
fix(release): a newer beta no longer blocks promoting a tested beta (…
frahlg Oct 27, 2026
10de589
fix(control): no SQL in the control tick for curtailment identity (#1…
frahlg Oct 27, 2026
60303cc
fix(forecast): save the forecast identity outside the lock (#1883)
frahlg Oct 27, 2026
e874c43
fix(feedback): distinguish confirmed EV pilot limits from current set…
segran2 Oct 27, 2026
3ef88a3
fix(control): no missing-plan retry while a replan is pending (#1882)
frahlg Oct 27, 2026
c51f64b
fix(control): supervise the control tick and commit a trial after the…
frahlg Oct 27, 2026
c33e87d
fix(cars): keep a one-off goal's deadline when a profile target appli…
frahlg Oct 27, 2026
1fd653e
fix(loadpoint): mark a one-phase car only from an order rise (#1894)
frahlg Oct 27, 2026
c0d1447
fix(loadpoint): one unplug reading does not end Charge now (#1898)
frahlg Oct 27, 2026
930a102
fix(mpc): deadline reserve waits for the latest start (#1718) (#1896)
frahlg Oct 27, 2026
0d54327
fix(ocpp): run charger callbacks after the slot lock is released (#1892)
frahlg Oct 27, 2026
edaf041
fix(control): stop the dispatch holdoff from skipping every other tic…
frahlg Oct 27, 2026
a217d77
fix(control): act only on new site-meter samples in battery dispatch …
frahlg Oct 27, 2026
ed66473
fix(control): one log of FTW's own EV offers (#1881)
frahlg Oct 27, 2026
09ebd42
fix(loadpoint): Charge now on a solar-only charger gets a fuse share …
frahlg Oct 27, 2026
58c6a6c
test(site): run siterig/short for every PR on the control path (#1906)
frahlg Oct 27, 2026
7840c33
fix(control): slew no longer reopens discharge on a blocked battery (…
frahlg Oct 27, 2026
f427f21
fix(ocpp): take up a running 1.6 transaction after a Core restart (#1…
frahlg Oct 28, 2026
6ab2f94
test(site): rig runs Energyplan in passive arbitrage on pinned prices…
frahlg Oct 28, 2026
573d24f
fix(drivers): bound driver_init and apply fuse settings before reload…
frahlg Oct 28, 2026
77b15c2
fix(drivers): retry the default on the first good poll after an outag…
frahlg Oct 28, 2026
7747b9a
fix(control): one SoC floor for the stale-plan fallback, fuse relief …
frahlg Oct 28, 2026
e42a923
test(site): the runner plans again before each job, recent PRs first …
frahlg Oct 28, 2026
168b78c
fix(modbus): reach a returning device within 10 s (#1930)
frahlg Oct 28, 2026
7f10c78
fix(control): resend the default when an excluded driver returns from…
frahlg Oct 28, 2026
7a60827
fix(ocpp): a managed charger starts at 0 A on boot (#1911)
frahlg Oct 28, 2026
bc30ceb
test(control): port #1816's battery relief reproductions to master (#…
frahlg Oct 28, 2026
e948e36
fix(control): a site meter that repeats one reading counts as stale (…
frahlg Oct 28, 2026
cf6a07d
fix(loadpoint): an idle 1p or auto pool starts on room for 6 A (C6) (…
frahlg Oct 28, 2026
90581c1
test(site): s15bat plans in Self so PV still charges the battery (#1942)
frahlg Oct 28, 2026
1cb59ba
fix(control): car and battery work to the fuse rating (#1910, #1891, …
frahlg Oct 28, 2026
22d0bd3
fix(control): a restart seeds the fuse heat at most at the working li…
frahlg Oct 28, 2026
8a7138d
fix(control): no discharge at or under the SoC floor (#1916)
frahlg Oct 28, 2026
c352465
fix(drivers): bundle sungrow 1.6.1, an outage keeps the release (#1912)
frahlg Oct 28, 2026
c63568b
test(site): rig scenarios R1-R5 and judges at the fuse rating (rig st…
frahlg Oct 28, 2026
575152e
chore(release): version packages (#1904)
frahlg Oct 28, 2026
1c2ffbc
test(site): judge s18 own commands by the fuse heat model (#1944)
frahlg Oct 28, 2026
c6f757b
fix(localzone): name the zone by the rules the clock runs on (#1945)
frahlg Nov 1, 2026
b322f55
feat(site): the home's time zone is a stored fact of the site (#1946)
frahlg Nov 1, 2026
f3b48e4
docs(readme): list the related FTW repositories (#1803)
HuggeK Nov 2, 2026
fdc2741
fix(drivers): bundle tesla_wall_connector 0.1.2, no power through an …
frahlg Nov 2, 2026
875240e
feat(history): the figure for Skatteverket's energy tax refund after …
frahlg Nov 2, 2026
cd1ce6e
feat(state): the energy ledger keeps hourly totals for four years (#1…
frahlg Nov 2, 2026
9724190
feat(history): one account per battery for the battery-storage tax fi…
frahlg Nov 2, 2026
a75b76b
chore(release): version packages (#1947)
frahlg Nov 2, 2026
be11e36
fix(history): count the battery-storage tax figure in proportion (#1958)
frahlg Nov 3, 2026
7210076
fix(drivers): bundle zap 3.1.2, a Zap on firmware 7.x reads as the si…
davmoz Nov 4, 2026
644ec15
test(site): drop r3 and r4 known lines fixed on master, give r4 room …
frahlg Nov 4, 2026
22d7e6b
chore(release): version packages (#1959)
frahlg Nov 4, 2026
e6e389c
fix(drivers): bundle zap 3.1.3, read_pv and read_battery work on firm…
davmoz Nov 4, 2026
7c4b980
chore(release): version packages (#1963)
frahlg Nov 4, 2026
fc4895a
fix(config): a battery soc_max of 0 no longer blocks charging (#1964)
frahlg Nov 5, 2026
a8b696a
chore(release): version packages (#1965)
frahlg Nov 5, 2026
a71fb80
fix(control): a battery that may not export holds the grid above 0 W …
frahlg Nov 5, 2026
30a5710
chore(release): version packages (#1970)
frahlg Nov 5, 2026
957c8c5
docs(contract): state Core's current Energyplan call budgets (#1967)
frahlg Nov 5, 2026
7c8430c
fix(mpc): price the clock hour in progress for planners that announce…
frahlg Nov 5, 2026
3e0a9cb
fix(mpc): fit each worker call's time limit to its own deadline (#1968)
frahlg Nov 5, 2026
2e9c780
fix(drivers): bundle growatt 2.1.3, a PV-only Growatt shows no batter…
frahlg Nov 5, 2026
af40667
chore(release): version packages (#1971)
frahlg Nov 5, 2026
f0a7202
feat(notifications): tell the owner when a device does not follow FTW…
frahlg Nov 5, 2026
7594234
chore(release): version packages (#1974)
frahlg Nov 5, 2026
ec8ce36
fix(native): verify a bundle that has no worker for this host (#1977)
frahlg Nov 6, 2026
fd3349a
chore(optimizer): bundle Energyplan 0.7.0 (#1979)
frahlg Nov 6, 2026
6288c01
chore(release): version packages (#1978)
frahlg Nov 8, 2026
500d83f
Merge remote-tracking branch 'origin/master' into fix/pr-1905-review
frahlg Nov 8, 2026
77d15b3
fix(feedback): pilot names the cause only when it is the limit
frahlg Nov 8, 2026
6cb20ab
ci: run the checks on the review commits
frahlg Nov 8, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
5 changes: 0 additions & 5 deletions .changeset/app-history-measured-power.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/ios-palette-web.md

This file was deleted.

5 changes: 5 additions & 0 deletions .changeset/pilot-evidence.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"ftw": patch
---

Expose fresh effective EV pilot current separately from the dynamic current setting. A confirmed lower pilot that explains measured delivery is an informational charger limitation even when its internal cause is unknown. Stale or future pilot evidence cannot explain an EV shortfall. A pilot that is only past its 90 s window reads as unknown, and the driver's reported limit, such as Easee's load balancing, still stands.
10 changes: 9 additions & 1 deletion AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -200,13 +200,21 @@ Native 0.x path:
week, with no open `release-blocker`.
4. Dispatch the same workflow for `v0.X.Y` stable, naming the tested beta.
The workflow checks the source commit and release assets, and keeps GitHub
`releases/latest` on the old 2.x line.
`releases/latest` on the old 2.x line. Newer betas may ship while the
sites test the candidate; the workflow refuses a stable only when a newer
stable exists. Beta boxes still take the highest release, so a late stable
does not hide a newer beta.
5. Promote the signed driver channel for installs that read `drivers-stable`:
`gh workflow run ftw-drivers-release.yml -R srcfl/device-drivers --ref main -f channel=stable`.
It promotes the driver commit already published as `drivers-beta`. If it
refuses because `main` has moved past `drivers-beta`, publish beta first
(`-f channel=beta`), then promote.

The workflow runs only from `master`, and a beta tag must match
`package.json` there. So there is no patch branch for an older line: fix a
stable on `master`, publish the next beta and promote it by the steps above.
The site check starts again with that beta.

The old lines are retired: no further 2.x or 3.x releases, including safety
hotfixes or betas. All new Core releases use the new 0.x path. Do not recommend
3.x beta as an install or intermediate upgrade. Old clients and aliases may
Expand Down
346 changes: 280 additions & 66 deletions CHANGELOG.md

Large diffs are not rendered by default.

13 changes: 13 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ help:
@echo " sim-ocpp dial Evify OCPP chargers at a running FTW"
@echo " dev start sims + main app against config.local.yaml"
@echo " e2e run the full-stack e2e test"
@echo " update-chain install, update, crash and roll back real builds"
@echo " verify fast pre-commit: test + compose + vet + build"
@echo " verify-all pre-push: verify + Linux builds"
@echo " install-hooks install git pre-commit + pre-push hooks (opt-in)"
Expand Down Expand Up @@ -121,6 +122,18 @@ release-workflow-test:
e2e: drivers-present
cd go && FTW_E2E=1 go test ./test/e2e -v -timeout 180s

# The native update chain with real builds: install, update through a release
# mirror, three kills in probation, then a binary rollback. Run it before
# every stable. UPDATE_CHAIN_FROM (or FTW_UPDATE_CHAIN_FROM) lists the
# releases to update from; by default the last three betas before HEAD. With
# no beta tags the test fails; UPDATE_CHAIN_FROM=tree builds the previous
# release from this tree instead.
UPDATE_CHAIN_FROM ?= $(or $(FTW_UPDATE_CHAIN_FROM),$(shell git tag --list 'v0.*-beta.*' --merged HEAD --no-contains HEAD --sort=-v:refname 2>/dev/null | head -3))
.PHONY: update-chain
update-chain:
cd go && FTW_UPDATE_CHAIN=1 FTW_UPDATE_CHAIN_FROM="$(UPDATE_CHAIN_FROM)" \
go test -count=1 -timeout 60m -run 'TestUpdateChain$$' -v ./cmd/ftw-launcher/

# FTW against device-simulator's house with a real fuse
# (go/test/site/README.md). SITERIG_SET is short, full or scenario names;
# SITERIG_LANES runs that many at once on ports 100 apart.
Expand Down
18 changes: 18 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -246,6 +246,24 @@ metadata are the detailed reference.
Other files under [`docs/`](docs/) are focused installation or
external-integration guides.

## Related repositories

FTW spans several repositories. This one is Core; the others are:

| Repository | Role |
|---|---|
| [`srcfl/device-drivers`](https://github.com/srcfl/device-drivers) | Lua driver source, contracts, tests and the signed driver bundle Core pins. Change drivers there. |
| [`srcfl/device-simulator`](https://github.com/srcfl/device-simulator) | Simulated house: inverters, batteries, chargers and meters over Modbus TCP, MQTT and OCPP. |
| [`srcfl/ftw-webapp`](https://github.com/srcfl/ftw-webapp) | Installable everyday client. |
| [`srcfl/ftw-app`](https://github.com/srcfl/ftw-app) | Native iOS and Android app. |
| [`srcfl/ftw-cloud`](https://github.com/srcfl/ftw-cloud) | Opt-in, box-signed, read-only copy of each home's state for the apps. |
| [`srcfl/home-assistant-addons`](https://github.com/srcfl/home-assistant-addons) | Home Assistant app packaging of each FTW release. |
| [`srcfl/ftw-web`](https://github.com/srcfl/ftw-web) | The project website. |
| [`srcfl/energyplan-demo`](https://github.com/srcfl/energyplan-demo) | Browser demo running the Energyplan worker in WebAssembly against a simulated home. |

The Energyplan solver source is private; Core receives only its compiled
worker and public integration metadata.

## Contributing

Read [CONTRIBUTING.md](CONTRIBUTING.md). User-visible changes need a Changeset.
Expand Down
11 changes: 10 additions & 1 deletion config.example.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,15 @@

site:
name: "Home"
# time_zone: Europe/Stockholm # the home's clock; empty uses the host's zone (UTC in Docker)
control_interval_s: 2 # 2 s matches Ferroamp ehub ~1 Hz; drop to 1 for snappier response
grid_target_w: 0 # 0 = self-consumption
grid_tolerance_w: 42 # deadband (The Answer)
watchdog_timeout_s: 60
smoothing_alpha: 0.3
slew_rate_w: 3000 # W per cycle. Both Ferroamp and Sungrow ramp internally — this is a soft ceiling, not the primary protection
# slew_enabled: false # disable the external slew limiter entirely and trust the inverter's internal ramp control (experimental)
min_dispatch_interval_s: 2 # debounce; keep == control_interval_s
min_dispatch_interval_s: 2 # least time between battery commands; at or below control_interval_s it never skips a tick

fuse:
max_amps: 16
Expand Down Expand Up @@ -284,3 +285,11 @@ fleet_ping:
# price:
# demand_price_per_kw: 7000
# demand_top_n: 3

# Tests and development only: read elprisetjustnu-format prices from another
# server, with no Nord Pool fallback. The site rig serves pinned prices this
# way (go/test/site/prices_test.go). Leave it unset on a real site.
# Only the elprisetjustnu provider reads base_url; other providers ignore it.
# price:
# provider: elprisetjustnu
# base_url: http://127.0.0.1:8099
7 changes: 7 additions & 0 deletions contract/push-catalogue.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,13 @@ events:
# kettle must not page anyone.
title: The house is drawing too much
body: "{phase} is over the fuse rating."
- kind: control.not_following
# After the box's own threshold: ten minutes in which the box's answer
# to "Are we in control?" said a device does not do what FTW asked, as
# a battery that charges when told to discharge. A slow battery must not
# page anyone. Once until the device follows again.
title: A device is not following FTW
body: "{name} does not do what FTW asks. Open FTW to see why."
- kind: box.unreachable
# The one sentence the box cannot send about itself. The relay holds
# this pre-encrypted and posts it only when the box has missed its
Expand Down
1 change: 1 addition & 0 deletions contract/registry.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,7 @@ cloud_purposes: [serve, stats]
ops:
- { name: site.mode.set, scope: ftw.mode.write, agent: ftw.goals.request, desc: Change the site operating mode }
- { name: planner.prefs.set, scope: ftw.mode.write, agent: ftw.goals.request, desc: Set household planner preferences }
- { name: site.time_zone.propose, scope: ftw.setup.write, desc: Offer the phone's time zone to a box that keeps none }
- { name: battery.hold, scope: ftw.dispatch.write, desc: Hold the battery at a fixed setpoint }
- { name: loadpoint.hold, scope: ftw.dispatch.write, agent: ftw.dispatch.hold, desc: Charge the car now at a fixed current }
- { name: loadpoint.boost, scope: ftw.dispatch.write, desc: Boost the car from the house battery }
Expand Down
8 changes: 4 additions & 4 deletions docker-compose.macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@
# In config.yaml set the MQTT host to `mosquitto` (port 1883), NOT
# `localhost` / `127.0.0.1`. There is no host networking to make
# localhost mean "the broker".
# - First enable of the house password (api.lan_auth) is loopback-only
# inside the container. A Mac curl to http://127.0.0.1:8080 arrives as
# the bridge gateway. Use `docker compose -f docker-compose.macos.yml
# exec ftw` and then curl http://127.0.0.1:8080 from there.
# - A Mac browser on http://127.0.0.1:8080 arrives as the bridge
# gateway, not loopback. Set the house password in the page as usual.
# To reset a forgotten one: `docker compose -f docker-compose.macos.yml
# exec ftw /app/ftw password reset`.
# - mDNS (`zap.local`) and UDP broadcast device discovery do NOT cross
# the Docker Desktop VM boundary. Configure every driver with an
# EXPLICIT IP address. Outbound unicast TCP (Modbus TCP to a known
Expand Down
50 changes: 30 additions & 20 deletions docs/agents.md
Original file line number Diff line number Diff line change
Expand Up @@ -628,7 +628,7 @@ above and its approval key, and an agent can never reach them.
| `GET /api/agents` | A client on the LAN. Rows, requests and keys, the box's facts and the registry's agent ops |
| `GET /api/agents/audit?before=&n=` | A client on the LAN |
| `POST /api/agents/offer {offer}` | A client on the LAN. The offer as the box reads it; grants nothing |
| `POST /api/agents {offer, scopes, ops, caps, ttlS}` | A LAN client signed in with the house password |
| `POST /api/agents {offer, scopes, ops, caps, ttlS}` | A browser signed in with the house password, on the LAN or on the box |
| `POST /api/agents/{id}/widen {epoch, scopes, ops, caps, ttlS}` | The same |
| `POST /api/agent-requests/{reqId} {approve: true}` | The same |
| `POST /api/agents/approval-key {deviceId, pub}` | The same: a phone that lost its key |
Expand Down Expand Up @@ -672,13 +672,14 @@ above and its approval key, and an agent can never reach them.
replace the offer's when given. Without `ttlS` the grant lasts 30 days, or
the offer's length if shorter. A `ttlS` past the role's longest grant is
`E_CAP_EXCEEDED {cap: "expiresAtMs", max}`.
- **Every route that widens access needs another device on the home
network, signed in with the house password.** The box never reads the
sign-in from loopback, so a browser on the box, or one through an SSH
tunnel to it, cannot widen access with or without the password: a
driver's Lua and the session passthrough can both reach the box from
inside it. `box.widen` in `GET /api/agents` says whether this request
would pass, so the page stops before a code is spent.
- **Every route that widens access needs a browser signed in with the
house password,** on another device or on the box itself. The password,
not the address, proves the owner. Loopback stays an owner for settings
without it, so it could replace the password and then sign in: it is not
a wall against programs on the box. A driver cannot reach the API
(below), and the session passthrough is refused. `box.widen` in
`GET /api/agents` says whether this request would pass, so the page stops
before a code is spent.
- **Drivers never reach the box's API.** A driver's HTTP, TCP or WebSocket
connection to a port the API listens on is refused, whether it goes to a
loopback address or to an address of the box. The check runs on the
Expand All @@ -691,16 +692,25 @@ above and its approval key, and an agent can never reach them.

What the sign-in is worth today:

- **Off by default.** With `api.lan_auth` off, which is the default, every
client on the home network is an owner with no sign-in. Granting a remote
agent from there would let any device on the Wi-Fi give the outside world
a way in, so those routes refuse with 403 until the house password is on.
- **With the house password on.** The password has at least 10 characters
and is stored as argon2id (64 MiB, 3 passes). Five wrong guesses lock every
sign-in for 30 seconds, box-wide. A sign-in sets a random 32-byte cookie,
`HttpOnly` and `SameSite=Strict`, that lasts 12 hours and dies with a
restart. Browser requests from other sites are refused by Origin and
`Sec-Fetch-Site` checks.
- **Off until someone chooses it.** A new box asks for it during setup; an
older box may still have it off. With `api.lan_auth` off every client on
the home network is an owner with no sign-in. Granting a remote agent
from there would let any device on the Wi-Fi give the outside world a way
in, so those routes refuse with 403 until the house password is on. The
Access page asks for it right above the code: any browser that reaches
the box may choose the first one, which signs that browser in. While the
lock is off that browser is already an owner, so choosing it grants
nothing new (Fredrik, 25 October 2026). An owner locked out by someone
else's password, or who forgot it, runs `ftw password reset` on the box;
see [operations.md](operations.md#house-password).
- **With the house password on.** Its length is the owner's choice: the
page warns below 8 characters but takes any password that is not empty
(Fredrik, 25 October 2026). It is stored as argon2id (64 MiB, 3
passes). Five wrong guesses lock every sign-in for 30 seconds, box-wide.
A sign-in sets a random 32-byte cookie,
`HttpOnly` and `SameSite=Strict`, that lasts 30 days, survives a restart
and ends when the password changes. Browser requests from other sites are
refused by Origin and `Sec-Fetch-Site` checks.
- **What it lacks.** The page is plain HTTP, so anyone who can read the home
network's traffic can read the password and the cookie. There is one
shared password and no person behind it, so the audit row names the
Expand Down Expand Up @@ -756,8 +766,8 @@ receipts for current agents, plus 32 old receipts, with a 128-row storage
bound. No expired or cancelled record can reopen a valid code after pruning.

The local routes are `GET/POST /api/agent-invites` and
`DELETE /api/agent-invites/{id}`. POST uses the same house-password and
non-loopback LAN gate as an ordinary grant. Signed app messages allow an
`DELETE /api/agent-invites/{id}`. POST uses the same house-password gate
as an ordinary grant. Signed app messages allow an
owner to share access away from home. The recipient connects FTW from its
own assistant, selects **I have an invitation code** on the consent page and
pastes the code there. Core must be online. The normal signed-roster,
Expand Down
9 changes: 7 additions & 2 deletions docs/architecture.md
Original file line number Diff line number Diff line change
Expand Up @@ -205,8 +205,13 @@ have no DuckDB dependency. The [FTWDB experiment is retired](ftwdb-shadow.md).
State schema 5 added aggregate history and binds state.db to a specific
history.db generation. Portable backups export a SQLite read snapshot with row
counts and hashes checked, plus any Parquet files still on the box. A
config-only snapshot cannot recover missing history. To return to an older
Core across a state-schema change, stop Core and restore a verified full backup
config-only snapshot cannot recover missing history. If history.db is damaged,
empty or missing at startup, Core moves it aside as `history.db.corrupt-<ms>`,
starts an empty history bound to a new generation and reports the loss on
`/api/health`. On a site that converted beta history this also clears the beta
generation key; the beta originals stay on disk. A readable history.db from
another generation is still refused.
To return to an older Core across a state-schema change, stop Core and restore a verified full backup
with its matching version; rolling back the program alone across that boundary
is refused.

Expand Down
7 changes: 6 additions & 1 deletion docs/cars.md
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,12 @@ charger's phase mode. A change of car or goal rolls the charger's deadline
before the replan, so that plan has the car's goal in it.

- **One goal per car**, used wherever the car is plugged in. `readyByMin` is
in the box's time zone.
in the box's time zone: the site's `site.time_zone`, or the host's when the
site stores none. A Docker host runs on UTC, so the app, the web client
and the on-box setup offer their own zone (`site.time_zone.propose`). The
box takes an offer only while it keeps no zone, and restarts to run on it.
A recurring goal keeps its clock time in the new zone. A one-off goal that
finishes at the car's limit keeps the instant it was saved for.
- **Surplus-only is the car's choice.** The site's battery rule
(`surplus_unlock_bat_soc`) is the charger's: it rides
`PUT /api/loadpoints/{id}/schedule` as before, and no car op carries it.
Expand Down
Loading
Loading