Repository navigation
Description
Problem
The catalog emits pre-v2 names. The data model is now v2 (srcful-data-models 2.3.0), and no catalog driver emits a v2 key yet. Counted over drivers/lua/*.lua on main (224c438), by number of drivers that assign the key:
| Spelling | Examples (drivers) | v2 name |
|---|---|---|
| data-models 1.x | W (42), Hz (23), L1_V (24), total_import_Wh (20), SoC_nom_fract (12) |
W_ac / W_dc, Hz, l1_V_ac, total_import_Wh_ac, soc_nom_fract |
| catalog short names | w (52), l1_v (45), hz (37), import_wh (29), soc (21) |
as above |
| v2 | W_ac, W_dc, soc_nom_fract, l1_V_ac, total_import_Wh_ac: 0 |
DER types emitted: meter 55, battery 33, pv 32, v2x_charger 16, ev 6, inverter 4, vehicle 4. In v2, pv is solar and v2x_charger is ev_charger_port. inverter is the inverter's AC output stage only: its DC side is the solar and battery DERs.
spec/host-api-profile.json already counts the lowercase names as debt against the 1.x spellings. That target has since moved to v2.
What the catalog needs
- One key set: the v2 names, with
_ac/_dcon every W/V/A/VA/Wh field. A battery's own measurement is DC. Use the v2 DER types. The field lists per type are in the data model REFERENCE. - Null, never 0: a value that was not read stays nil (44 drivers emit numbers they never read (null, never 0) #169, ratcheted by
test_no_invented_numbers.py). make: the lowercase brand (^[a-z0-9]+(_[a-z0-9]+)*$, for exampleabb,sma,carlo_gavazzi), set by the driver itself.- Order: FTW Core has to accept the v2 keys first (Publish data model v2 to NovaCore (json/v2) and accept v2 keys from drivers ftw#1527,
telemetry_keys.go). Drivers can then move one at a time, each with a version bump and aBUNDLED_SOURCE.jsonpin move in FTW. - Spec: update
spec/host-api.md/spec/host-api-profile.jsonto v2 as the target. docs(spec): describe srcful-data-models v2 in the migration note #166 already rewrites the migration note.
Related: #169 (invented numbers), #170 (zap.lua and the Zap's v2 local API), srcfl/ftw#1527 (FTW's NovaCore publisher and host aliases).
Out of scope for the current data model rollout: tracked here so FTW does not fall behind.
🤖 Generated with Claude Code
Activity