Repository navigation
feat(drivers): setup_hint says what to switch on in the device - #283
Merged
Merged
Conversation
A new owner adds an inverter, FTW cannot reach it, and nothing says that Modbus TCP is off in the inverter. A driver may now say what to switch on, in one sentence of the device's own menu words, as setup_hint in its DRIVER table. make check holds the field to what FTW Core reads: one double-quoted string on one line, no double quote or backslash, one sentence ending with a full stop, at most 140 characters. The signed channel copies it into the header Core reads; a driver without a hint keeps its bytes. 23 drivers get a hint, from the vendor's document or the driver's own notes, each with a patch version: sungrow, huawei, fronius, sma, sma_pv, kostal, goodwe, solis, victron, goe, goe_http, keba, alfen, abb_terra, mennekes, etrel, ctek, ctek_v2, ctek_hybrid, nibe_local, zap, remne_p1ib, esphome_dsmr. Refs srcfl/ftw onboarding review, rows 3 and 11. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Fredrik Ahlgren <fredrik@sourceful-labs.com>
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. |
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.
Problem
A new owner adds an inverter in FTW's setup guide. FTW cannot reach it, and nothing says that Modbus TCP is off in the inverter. The FTW onboarding review of 27 November 2026 counts this among the places a novice gives up (rows 3 and 11). Only
huawei.luamentioned the step, in a code comment.Change
DRIVERfieldsetup_hint: one sentence, at most 140 characters, in the device's own menu words, saying what to switch on for local access. FTW can show it on the device card and when a connection test fails.tools/validate_manifest.py(run bymake checkandmake test-driver) reads the hint the way FTW Core does (manifest_parser.setup_hint). It must be one double-quoted string on one line, with no double quote or backslash inside, end with a full stop, and fit in 140 characters. Core'spickStringstops at the first double quote, so anything else would reach the owner cut short.tools/ftw_repository.pycopies the hint into the generated header Core reads, as it doesws_hosts. A driver without a hint keeps its published bytes.index.yaml,devices.yamland support status. No register, reading or command changed.spec/manifest-v2.md(besidesetup) andblueprint/BLUEPRINT.lua. I leftdocs/WRITING-A-DRIVER.mdalone because fix(easee_cloud): report a load-balancer limit while the car charges #172 touches it.Hints and sources
sma'supstream_docs).modbus-en.md(go-eCharger-API-v2) and the driver header.http-en.md: the HTTP API v2 has to be enabled from the app. Also the driver header.Left without a hint
solaredge,solaredge_pv,solaredge_legacy): SolarEdge's PDFs refuse automated fetches. Other sources say SetApp > Site Communication > Modbus TCP > Enable, with port 1502 while these drivers default to 502.sigenergy: the step is in the installer manual, which I could not open.deye,growatt,foxess_h3_smart,solax,alphaess.DRIVERtable yet:fronius_api: the GEN24 Solar API has been off by default since bundle 1.14.1, per Fronius Solar API V1.victron_mqtt: MQTT Access.p1_meter,p1_dsmr,p1_hdlc,p1_encrypted.Does the catalog tell FTW what it controls and what it only reads?
Per driver, yes.
control:is checked against the code bymake check, andindex.yamlrepeats it.read_onlyandcontrol_enabled.read_only = true.control: falseandread_only = true, so FTW already knows it only reads.web/driver-control.js. It labels a read-only charger, car, heat pump, or battery without PV, and skips anything that reads PV.Gaps, not built here:
read_only = truein their ownDRIVERtable, though AGENTS.md asks for it: abb_meter, acrel, carlo_gavazzi, chint, circutor, fronius_api, hello, janitza, opendtu, opendtu_mqtt, p1_dsmr, p1_encrypted, p1_hdlc, p1_meter, schneider_meter, shelly, siemens_pac, socomec, victron_mqtt. FTW reads a bundled copy from source, so for these it sees "not stated" rather than "reads only".controlis one flag per driver. No field says which DERs a controlling driver steers. Today the actions line up: every control driver with a battery handlesbattery, and PV is steered only throughcurtail. The fewpv-curtailtags inDRIVER.capabilitiesdo not reach the signed header, because its capabilities come from the manifest'sders. FTW uses its ownsupports_pv_curtailconfig, so nothing breaks today.descriptionwith a pattern that stops at the first apostrophe. Nine signed copies carry a cut description: etrel, home_assistant_vehicle, nibe_local, openevse, remne_p1ib, schrack_ev, tesla_cloud, teslamate_vehicle, wallbox. For example, tesla_cloud's reads "Reads a Tesla", so FTW loses the read-only reason it shows. Fixing it changes published bytes and needs nine bumps, so it should be its own PR.setup_hintuses its own parser and keeps apostrophes.Smallest metadata I propose:
make checkrequireread_only = truein theDRIVERtable of everycontrol: falsedriver, which means adding a table to the six that lack one.Order with FTW
FTW Core ignores unknown
DRIVERkeys today, so this PR does not wait for the FTW PR.pickStringreads only named fields.driverrepodecodes the channel manifest with plainjson.Unmarshalintodrivers.CatalogEntry, so an unknownmetadata.setup_hintis dropped.bundled_startup_contract_test.go,catalog_signed_artifact_test.go) check id, version, read_only and capabilities, not the set of keys.Order:
onboarding-guide-one-flow) addsSetupHintwithpickString(block, "setup_hint")and the UI. It movesdrivers/BUNDLED_SOURCE.jsonto this PR's merge commit and runsscripts/sync-bundled-drivers.sh, so bundled copies carry the hints too. If the FTW PR merged first, it would show nothing until the pin moves, and nothing would break.Evidence
make check: 91 manifests, 0 errors; 5565 passed, 927 skipped.make test-driver ID=<id>for each of the 23 drivers: all pass. Two harness tests pinned the old version strings (test_nibe_local_ftw.lua,test_esphome_dsmr_aliases.lua); I moved them to the new versions.tests/test_setup_hint.py(112 cases) covers:DRIVERtable and one over 140 characters;catalog.go,catalog_controls.goandcatalog_thermal.go, copied unchanged from srcfl/ftwmaster97c2d346 into a scratch module. I ran it on the 23 files before and after, and on their generated signed copies.versionchanged.Not tested
check-versionscomparison against the published drivers-beta manifest locally. This PR's "signed channel accepts this tree" check runs it.kostal.lua'sconnection_defaultssays 502. The hint names 1502; the default is unchanged here.Refs the FTW onboarding review of 27 November 2026, rows 3 and 11.
🤖 Generated with Claude Code