Repository navigation
fix(zap): read PV and battery under data model v2 (3.1.3) - #209
Merged
Merged
Conversation
Zap firmware 7.x calls the PV DER solar, sends power and energy on one side, _ac or _dc, and moves the ratings to /api/devices. read_pv and read_battery therefore read nothing on 7.x. The driver now reads the 1.x and the v2 names, and a value v2 sends as null stays unknown. An AC-side voltage or current is not reported as the battery's own. The inverter DER is not counted as another resource. Also removes draft comments and a pinned version from the meter schema test. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: David Mozart <dmozartandraws@gmail.com>
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.
Refs #170. Follows #208, which fixed the meter.
Problem
On Zap firmware 7.x,
read_pvandread_batteryread nothing. Data model v2 calls the PV DERsolar, sends power and energy on one side (_acor_dc), and moves the ratings to/api/devices.The table in #170 is out of date on a few names, so this follows
fw_controller/API.mdand the serializer at Zap v7.0.3:ders[].rated_poweron batteryrated_power_W_dcders[].capacitycapacity_Wh_dcders[].installed_powerinstalled_power_W_dcrated_power(the inverter's rating)rated_power_W_acon theinverterDERmppt1_V,mppt1_Amppt[1].V_dc,mppt[1].A_dcheatsink_Cinverter.temperature_Cheatsink_Ctemperature_CChange
nullstays unknown.inverterDER is not counted as another resource, andev_charger_portcounts as a charger.Tested
Zap firmware 7.0.3, through FTW's Lua host (master 22d7e6bf), GET only:
read_pv,read_batteryother_resources2 (PV inverter, battery)make check: 5018 passed, 936 skipped.test_zap_pv_battery_schema: 7 scenarios. Five fail against 3.1.2.v1andv2_nullpass on both, as they should.Limits: the firmware and its payloads are real, but the inverter is a Modbus simulator. Not tested on a real inverter, and no Zap on 1.x firmware was available, so the 1.x path is covered by tests only.
🤖 Generated with Claude Code