Repository navigation
Description
Problem
Zap firmware main (d9cefe5, srcfl/srcful-zap-x-firmware#294) serves its local API in data model v2 (srcful-data-models 2.3.0). drivers/lua/zap.lua still reads the 1.x names, so a Zap running that firmware gives FTW no readings:
emit_meterreadsraw.W. That field no longer exists, so the driver emits no meter. FTW loses its P1/HAN site meter.- PV is no longer found:
/api/deviceslists the DER assolar, and/data/jsonkeys it assolar, notpv. - Battery W, SoC, energy, V and A all read nil.
No Zap release carries this yet; the latest release is v2.3.15, still 1.x. The firmware will not be released before NovaCore runs v2 on the target environment. This has to land before a v2 Zap release reaches FTW users.
What changed in the Zap local API
GET /api/devices: ders[].type is solar (was pv) and ev_charger_port (was v2x_charger). rated_power, installed_power and capacity are unchanged.
GET /api/devices/{sn}/data/json: the envelope keys are the v2 DER types, version is "v2", every field of the type is present, and an unread value is null. Names zap.lua reads today:
| zap.lua reads (1.x) | v2 name |
|---|---|
data.pv |
data.solar |
meter W |
W_ac |
meter total_import_Wh / total_export_Wh |
total_import_Wh_ac / total_export_Wh_ac |
meter L1_V / L1_A / L1_W (L2, L3 alike) |
l1_V_ac / l1_A_ac / l1_W_ac |
pv W |
W_ac (inverter output) or W_dc (DC side) |
pv rated_power_W |
rated_power_W_ac / rated_power_W_dc |
pv total_generation_Wh |
total_generation_Wh_ac / total_generation_Wh_dc |
pv mppt1_V / mppt1_A (and 2) |
mppt1_V_dc / mppt1_A_dc |
battery W |
W_dc (a battery's own measurement is DC), W_ac for AC-coupled |
battery SoC_nom_fract |
soc_nom_fract |
battery V / A |
V_dc / A_dc |
battery total_charge_Wh / total_discharge_Wh |
total_charge_Wh_dc / total_discharge_Wh_dc (or _ac) |
battery rated_power_W, capacity_Wh |
not in telemetry any more: use /api/devices ders[].rated_power / capacity |
heatsink_C |
unchanged |
Signs are unchanged: + import/charge, − export/generation/discharge. The full field list for each type is in the data model REFERENCE, and the Zap's own copy is fw_controller/API.md on Zap main.
What zap.lua needs
- Read the v2 names. Take
pv→solarin both discovery and the data envelope. - Accept 1.x as well, because FTW users have Zaps on both firmware lines during the rollout.
version == "v2"in/data/jsontells them apart. - A
nullstays nil, never 0 (44 drivers emit numbers they never read (null, never 0) #169). - Bump the version, then move FTW's
drivers/BUNDLED_SOURCE.jsonpin. The pin isc9de251today.
Out of scope for the current data model rollout: tracked here so FTW does not fall behind.
🤖 Generated with Claude Code
Activity
fix(zap): read the meter DER under data model v2 (#208)
davmoz commentedon Nov 4, 2026
Done on Zap firmware 7.x: the meter in #208 (zap 3.1.2), PV and battery in #209 (zap 3.1.3). The driver reads the 1.x and the v2 names, and a value sent as
nullstays unknown. FTW's pin is on 3.1.3 in srcfl/ftw#1962.The name table above went out of date with data model 2.7.0. #209 lists the current names.