You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Catalog: move emit keys and DER types to data model v2 #171
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)
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 / _dc on 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.
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/*.luaonmain(224c438), by number of drivers that assign the key: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_fractw(52),l1_v(45),hz(37),import_wh(29),soc(21)W_ac,W_dc,soc_nom_fract,l1_V_ac,total_import_Wh_ac: 0DER types emitted:
meter55,battery33,pv32,v2x_charger16,ev6,inverter4,vehicle4. In v2,pvissolarandv2x_chargerisev_charger_port.inverteris the inverter's AC output stage only: its DC side is thesolarandbatteryDERs.spec/host-api-profile.jsonalready counts the lowercase names as debt against the 1.x spellings. That target has since moved to v2.What the catalog needs
_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.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.telemetry_keys.go). Drivers can then move one at a time, each with a version bump and aBUNDLED_SOURCE.jsonpin move in FTW.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.luaand 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