Repository navigation
feat(site): say whether FTW controls each device, and why not - #245
Merged
Merged
Conversation
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
frahlg
force-pushed
the
catalog-says-control
branch
3 times, most recently
from
November 21, 2026 17:35
aab52b1 to
3749d3b
Compare
The catalog page took control from the manifest's control field, which had drifted from the code in seven drivers, and showed a faint "Read only" badge with no reason. An owner who added a Zaptec Go through zaptec_cloud had no way to learn FTW would only read the charger. The page now reads control the way the signed channel does, through one function in tools/ftw_repository.py: driver_command present and no read_only = true in the DRIVER table. Each driver says one of three things: - Controls the device: experimental until a field report confirms it, or confirmed when the driver's own record says production or tested. - Reads only: what stops it (no control code yet, or the driver turns control off), then the driver's own reason when its description, manifest notes or header comment gives one. - Telemetry only: meter and PV drivers, where control is not expected. The seven manifests that said control: false for drivers the channel ships with control (alphaess, deye, kstar, pixii, solaredge, solax, varta) now say true, and a test holds every manifest to the code. index.yaml and devices.yaml follow. Signed-off-by: Fredrik Ahlgren <fredrik@sourceful-labs.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Review of this branch: alphaess, kstar, solax and varta have a
driver_command that only logs "not yet implemented" and refuses. The
channel counts any driver_command as control, so it shipped them as
controlling, and flipping their manifests made the catalog say "Controls
the device". That is the false claim this work removes.
- The four keep control: false. Each gains a DRIVER table with
read_only = true and a description that says why: no control code has
been written for it yet. Each is bumped a patch version, with a
CHANGELOG entry. Their channel artifacts change.
- is_inert ignores host.log, so a logging stub counts as a refusal, and a
new check fails when a driver ships as control with such a stub.
- The page's reason drops a lead-in that repeats the note ("FTW can read
it but not control it:", "Read-only:"), starts with a capital, and is
left out when fewer than five words remain, as for sonnen and zap.
Core's readOnlyReason does the same; each points at the other.
- README and spec/manifest-v2.md say control: true means FTW can command
the device, not that driver_command exists.
Signed-off-by: Fredrik Ahlgren <fredrik@sourceful-labs.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
frahlg
force-pushed
the
catalog-says-control
branch
from
November 21, 2026 17:53
3749d3b to
a703e12
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
On 21 November a new owner added a Zaptec Go through
zaptec_cloud, which then declaredread_only = true, so FTW accepted the charger and never controlled it and nothing told the owner why. The catalog page showed a faint "Read only" badge with no reason, and it took control from the manifest'scontrol:field, which had drifted from the code. The channel had the opposite fault too: it counted anydriver_commandas control, so four drivers whose command only refuses shipped as controlling.What changes
tools/ftw_repository.pygainsdriver_controls(source): a driver controls when it hasdriver_commandand itsDRIVERtable does not sayread_only = true. The channel build already used this rule inline; now the channel, the catalog page and the manifest checks all call the same function.driver_commandthat only logs "not yet implemented" and refuses, so the channel shipped them as controlling. Each gains aDRIVERtable withread_only = trueand a description that says why: no control code has been written for it yet. Each is bumped a patch version (1.1.2), with aCHANGELOG.mdentry. Their channel artifacts change: the generated header marks them read-only and drops their write permissions. Reading is unchanged. Their manifests staycontrol: false.control: true, matching code that commands the device: deye, pixii and solaredge.index.yamlanddevices.yamlfollow; no Lua changes for these three.tests/test_control_claims.pyfails when a manifest'scontrol:disagrees withdriver_controls.is_inertnow ignoreshost.log, so a stub that logs and refuses counts as one.tests/test_site.pyholds the page to the channel's answer and checks the three states, the reasons and the rendering. Onmainthe stub check catches all four drivers.verification_statusisproductionortested.zaptec_cloud0.2.1 shows the experimental line.tesla_wall_connectorthe page now reads "Tesla offers no way for another system to set its current. …". FTW Core uses the same rule inreadOnlyReason(fix(web): say when FTW reads a charger but cannot control it ftw#2059); each points at the other.spec/manifest-v2.mdsay thatcontrol: truemeans FTW can command the device:driver_commandwrites to it. Having adriver_commandis not enough, and a stub declaresread_only.Pairs with
srcfl/ftw#2059: Core shows the same fact on the box, in Settings, setup and the EV card, and leaves out Charge now for a charger it cannot control. Neither PR depends on the other to merge.
Overlap with open PRs
index.yamlon the lines right below thecontrol:line this PR changes. That PR has right of way: merge it first, then rerun the generators here (make checkdoes it) and push.tools/, the tests here, or the alphaess, kstar, solax, varta, deye or solaredge files.Tests
mainat 49caac3 (docs: a driver that can command its device ships with control on #239, feat(zaptec_cloud): control the charger's current, pause and resume (0.2.0) #240, fix: read-only EV drivers say why, drop two that read nothing #241, fix(zaptec_cloud): stand down only after FTW wrote a current (0.2.1) #243, feat(chargers): current-limit control for alfen, abb_terra and mennekes (1.1.0) #242). The CHANGELOG keeps feat(chargers): current-limit control for alfen, abb_terra and mennekes (1.1.0) #242's entries and adds this one.make check: 5014 passed, 921 skipped. Manifests, index, devices and support status regenerate clean.make test-driver ID=<id>for alphaess, kstar, solax and varta: pass.make site, reviewed in a browser at 1280 px and 375 px:zaptec_cloudshows "Controls the device · Experimental …".tesla_wall_connectorshows "Reads only", then "In the driver's words: Tesla offers no way for another system to set its current. …".mainthe page scrolls sideways by 18 px at 375 px because of the row caret; that is unchanged here.🤖 Generated with Claude Code