Changelog¶
All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
Unreleased¶
Docs¶
- Extension registers from an evening read-only run (2026-11-06), a week of the Modbus bridge's point history and the Direct Connect bridge's metrics (#132). 15013 is confirmed as battery power both ways: positive = discharging, negative = charging. 15035 = SoC × 10 is confirmed over 0–100 %. 15016 status values: 2 normal, 6 dispatch, 3 likely off-grid, 1 likely start-up. 15040 is inferred to be PV power (int16) as Direct Connect reports it, reading −9 W after dark. 15006–15007, 15014–15015 and 15022 are still unknown.
- Extension registers confirmed by a read-only correlation run on V12R02B60D00 (2026-11-03, charging, 54 samples, one site). 15003 is PV power (= M502
OutPw). 15011 is home load (= 16000). 15013 is battery power (int16, negative = charging; tracks M714DCWat ~1 W whereDCWmoves in 100 W steps). 15025 is grid voltage × 10 (= M701LNV). 15029–15030 and 15033–15034 are M701TotWhInjandTotWhAbs. 15035 is SoC × 10, in 0.1 % steps. 15506 has ~1 W resolution on V12, not ~100 W as on V10.firmware_quirks.jsonmarks thesemapped: true(#132). - Extension Registers has an Extension → SunSpec mapping. It lists every register in 15000–15043, 15500–15513 and 16000–16002 with its type, scale, units, sign and SunSpec equivalent (or none). Each row has a status (confirmed, inferred or unknown) with evidence, and says whether a client should prefer the extension value. All 150xx rows stay inferred until a correlation run (#132).
0.13.0 - 2026-11-02¶
⚠️ Breaking changes¶
read_battery_status():battery_temp_c,battery_current_aand thepower_w/voltage_v/current_a/temp_cvalues inindividual_batteriesare nowNonewhen the aGate doesn't report them, instead of 0. On V12R02B60D00 they are alwaysNone, because the aGate returns 0 for the whole M714 port block (#129). Code that does arithmetic or formatting on them must handleNone.individual_batteries[i].power_wis now the port's ownDCW; before, it was the model total.battery_power_wandbattery_stateare unchanged (#130).
Fixed¶
read_battery_status()never read the M714 port block. It looked for ablocksattribute that pysunspec2 models don't have, so temperature, voltage and current were always 0 on any firmware. Ports are now read from thePrtrepeating group (#130).SunSpecSequencer.get_point('714.DCW_2'): the_Nsuffix now resolves the Nth instance of a repeating group. Before, it raised "Point not found" on real pysunspec2 models (#130).- The CLI monitor shows "—" for battery current when it isn't reported (#130).
disconnect()now closes the TCP socket. It called pysunspec2'sclose(), which does nothing for TCP, so after a raw-socket read (read_solar_status(),read_native_mode(), the extension helpers) the socket stayed open and held the aGate's single Modbus session until garbage collection (#138).read_alarms():vendor_infois now empty when M701MnAlrmInfoholds the fixed placeholder "Manufacturer custom error info", which is all it has read on V10R01B04D00 and V12R02B60D00. The CLI no longer prints it as vendor alarm info. The string as read is in the newvendor_info_raw(#136).
Docs¶
- New Alarms, Errors and Exceptions: each alarm and status point, Modbus exception and silently discarded write, per firmware (V10R01B04D00, V12R02B60D00), with sources and library handling.
firmware_quirks.jsonaddsm701_mnalrminfo,m701_throttle_pointsandalarm_points_quiet. The QUIRKS ThrotPct row is corrected: not implemented on both firmwares (#136). - New SunSpec Point Reference: every point in the 17 models the aGate reports on V12R02B60D00, with its SunSpec label, description, type, units, scale factor, access, mandatory/optional flag, PDU address and 40000-mirror address, plus the extension register table. Generated by
tools/gen_point_reference.pyfrom the pysunspec2 model JSON and the 2026-10-20 snapshot. The Extensions Manifest's correlation table is marked superseded (#127). - Extension registers 15000–15043 are recorded one by one (#132):
firmware_quirks.jsonhas an entry for each register, with raw values on V10R01B04D00 and V12R02B60D00 and amappedflag on every extension entry. Extension Registers has a per-register table with candidate meanings marked as inferred. 15029–15030 and 15033–15034 equal M701TotWhInj/TotWhAbsexactly in one capture. - Model 714 corrected per firmware (#129). On V10 and V12, model
DCAreads 0 whileDCWis non-zero. On V12 the whole port 1 block reads 0 (PrtTyp= PV,DCSta= OFF,DCV,Tmpand portDCWall 0). FranklinWH's PICS declares all of these supported, and plain 0 is not SunSpec's not-implemented value. Earlier docs listedDCV/Tmpas working on V10 without any raw read, and called the DCA workaround robust; both are corrected.firmware_quirks.jsonaddsm714_dcaandm714_port_blockand correctsm714_dcv_tmp. The PICS cross-reference gains an M714 table. The library defect behind the 0 °C / 0 A readings is #130.
0.12.0 - 2026-10-30¶
Added¶
- Opt-in write trace:
FranklinWHController(..., write_trace=callback)gets oneWriteRecordfor every Modbus write the library sends. Each record has the register, function code, raw values, the aGate's reply (OK, the exception code, or an error), the point name, the firmware and a caller-setwrite_source. It covers model writes, the extension setters,clear_alarmsandSunSpecSequencerraw writes. The same records go to thefranklinwh_modbus.writeslogger at DEBUG (#124).
Fixed¶
set_native_mode,set_self_consumption_reserveandset_tou_reservenow log at WARNING when the aGate refuses the write, when the read-back differs from the value written, or when the read-back fails. For example:Extension write not applied: register 15508 wrote 20, read back 8, firmware V12R02B60D00. Before, they only returned the message. No claim is made that these registers can be written (#114 A5).
Docs¶
- QUIRKS: M714
DCWsign corrected to positive = discharging;WSetEnaRvrtread-back no longer called "works"; the V10 reversion section names its firmware (#114 C2, C3).
0.11.0 - 2026-10-29¶
⚠️ Breaking changes¶
- Enum descriptions change (
get_pics_enum_desc/get_enum_desc): 17PICS_ENUMSentries were one higher than SunSpec. For example,WSetEna1 returned DISABLED, andInvSt3 returned STARTING instead of RUNNING. They now follow the SunSpec 2 model JSON (0 DISABLED, 1 ENABLED;InvSt0 OFF … 7 STANDBY). This affects 701ACType,St,InvSt,ConnSt,DERMode; 703ES; and the 704*Ena/*EnaRvrtpoints (#114 A1). ControlModehas the two SunSpecWSetModvalues:W_MAX_PCT(0) andWATTS(1).LIMIT_ABS,LIMIT_PCT,SET_EXPORTandSET_IMPORTare removed; useControlMode.WATTSwhere code usedLIMIT_ABS.BatteryCommand.modedefaults toWATTS.send_commandused to ignore the mode; it now sendsWATTSthroughWSetandW_MAX_PCTthroughWSetPct(#114 A2, A6, B1).check_state():actual_powerwas the setpoint, not measured power. Readsetpoint_w(the Modbus setpoint) ormeasured_dc_w(M714DCW). Both use the hardware sign: positive = discharge.actual_powerremains as a deprecated alias that raises aDeprecationWarningwhen read. Under Modbus control,battery_activitynow comes from measured DC power and shows the setpoint alongside, for exampleDischarging (400W, setpoint 1000W)(#114 A3).- Percent is sent as percent (#114 B1).
dispatch(..., '40%')used to convert the percentage to watts of the rating, without logging it. It now sendsWSetPctwithWSetMod=0.BatteryCommand(mode=ControlMode.W_MAX_PCT, power_pct=N)is the new percent command, andsend_commandsends it throughWSetPct. Watts still go throughWSet; neither is converted to the other. On V12R02B60D00, percent commands above 10 % or below 0 are refused (exception 3, #92), and the refusal is logged. If theWSetPctwrite is refused afterWSetModwas changed,WSetModis written back to its previous value and that is logged (tested live, 3 runs).
Added¶
firmware_quirks.json, shipped as package data: a per-firmware record of aGate Modbus behaviour (WSet/WSetPct sign and accepted range, charge refusal, reversion, heartbeat, 40000 mirror, reserve registers), withquirks_for(firmware)to read it (behaviour id → list of observations for that firmware). Public facts only; the controller does not act on it yet (#91).
Fixed¶
tools/franklinwh_control_standalone.pyconverted watts toWSetPct. It now sends watts throughWSetwithWSetMod=1and verifies the read-back (#114 B2).- The four workarounds the owner approved to keep are documented in
docs/APPROVED_WORKAROUNDS.md, and every run is logged with the tag[approved workaround #114 …]. They are the standby handshake, the software timeout, the power clamps and the 5000 W rating fallback (B3), plus the home load read from 16000 instead of 15506 (B4). The rating fallback used to be silent (#114 B3, B4). tools/franklinwh_min_demo.pywroteWSetMod=2, which SunSpec doesn't define. It now writes 1 (WATTS). Its labels now use the aGate's sign (WSet positive = discharge), so the "+1000 W" step is labelled discharge (#114 A2).- A Modbus exception response from the aGate is now logged at WARNING. The log line gives the refused register, the raw values and the firmware, for example
Refused by the aGate: write to register 40324 [0xFFCE] -> Modbus exception: 3, firmware V12R02B60D00. It covers operations run through the controller's retry path (#114 A4).
Docs¶
- Model 704 conformance results on V12R02B60D00 (#104), and V12 heartbeat, inverted reversion, 40000-mirror write echo and extension-write re-test (#107).
0.10.1 - 2026-10-24¶
Force Discharge works on V12R02B60D00. 0.10.0 sent power as a percentage, which V12 refuses above 10 % (500 W). 0.10.1 sends watts. Tested live: 5000 W.
⚠️ Breaking changes¶
These change behaviour callers may rely on. Under the release policy they warranted a minor version (0.11.0), not a patch.
- Different registers: send_command writes WSetMod=1 + WSet (watts), not WSetPct. It no longer writes WSetEna=0 first, and returns (False, "Command not applied: …") if the read-back differs. Code that reads WSetPct to find the active command will now see 0: read read_control_status()['wset_mode'] / ['wset_watts'], not WSetPct.
- Different failure behaviour: a refused write fails at once with "Rejected by the aGate (…)", with no reconnect or resend (#96).
Known issue (unchanged)¶
- V12 refuses charge by either route (negative
WSetorWSetPct, exception 3). A charge command returns that rejection.
Fixed¶
- Force Discharge above 500 W refused on V12 (exception 3): now sent as watts.
- Refused writes treated as connection errors and resent (#96).
- Sequencer raw-address reads/writes did nothing after the scan (#99).
- Sequencer: a rejected write skipped the restore steps (#101). Steps now take
on_error, and acleanupblock always runs.
Docs¶
- V12R02B60D00: firmware snapshot, 40000 mirror, reserve/mode readings (16001, 15509).
- New pages: Extension Registers, API Cookbook, Modbus vs Cloud, Modbus Client Libraries, HA Modbus YAML monitoring.
- Modbus addressing uses PDU terms; unsourced "SPAN unlock" claims removed.
0.10.0 - 2026-10-17¶
Alarms are reported, not decided. The library now names every active alarm from the SunSpec models and leaves the decision to the caller.
check_blocking_alarms()is deprecated, andhealthcheck()no longer turns unhealthy on alarms. A failed alarm read is never reported as "no alarms". Read the upgrade notes if you usehealthcheck(),--check-alarmsorcheck_blocking_alarms().
Upgrade notes¶
- The library no longer decides what an alarm means; the client does. (#40, #46)
check_blocking_alarms()is deprecated (it warns, and will be removed). Useread_alarms()or the newactive_alarms()and apply your own rule.healthcheck()lists active alarms indetails['alarms']and in its recommendations, but they no longer affecthealthyormessage.details['blocking_alarms']anddetails['can_operate']are gone.- The conflict check's
result['alarms']is now{'active', 'system_alrm', 'decoded'};can_operateandblockingare gone. VirtualModeController.run_continuous(enable_safety_checks=True)no longer stops after two alarm checks. Its SoC-limit and dispatch-verification checks are unchanged.- A failed alarm read is never "no alarms":
active_alarms()returns["Alarm read failed: …"], so--check-alarmsexits 1, and the deprecatedcheck_blocking_alarms()returns(False, ["ALARM_READ_FAILED: …"]). ItsCRITICAL_BITSare still the set that is one bit off from model 701 (#46); it's kept unchanged until the function is removed. --check-alarmsexits 1 if any alarm is active (before: only the fixed "critical" set).--healthcheckand--statusprint "ACTIVE ALARMS".read_alarms()now reads models 701, 713, 714 and 502 itself (passrefresh=Falseif you read them in the same poll), and it fillsdecoded. DC ports indecoded['dc_port']are numbered from 1, the same asread_battery_status()['individual_batteries']. (#39)- If
read_alarms()fails, the result has anerrorkey and the failure is logged at warning level. It used to return zeros at debug level, which looked like "no alarms". Checkerrorbefore trusting an empty alarm list. (#39)
Added¶
FranklinWHController.active_alarms(alarms=None): every active alarm by name (system, DC port, solar, and the battery when not OK), fromread_alarms(). Reports only. (#46)
Fixed¶
--status --detaillabels AC Type(derived from M701.LNV). It said(M701.ACType), a point the library doesn't read; the value comes from the voltage band. (#42)read_alarms()reads the device and names every active alarm. It returned whatever another call had last loaded into the models (it never read them itself) and leftdecodedempty, so--check-alarmsprintedBattery Status: UNKNOWNand empty lists. It now reads models 701, 713, 714 and 502 first (passrefresh=Falseif you read them moments ago) and lists every set bit, named from the SunSpec model definitions in pysunspec2: M701Alrm, M502Evt(new:solar_evt,decoded['solar']), M713Sta(OK / WARNING / ERROR), M701MnAlrmInfo(new:vendor_info), and per DC port theDCAlrmbits plus a WARNING/ERRORDCSta. M714PrtAlrmsonly flags which ports have an alarm; it is not an alarm-type field. The standalone tool's name tables were not ported: its system-alarm names are shifted by one bit from model 701, and its DC-port names are not in model 714. (#39)
0.9.6 - 2026-10-17¶
Upgrade advisory: all 0.9.5 users should upgrade. 0.9.5 has two S1 defects that act on the battery.
connect()writes the operating mode and reserves (15507–15509) on every connection (#24), and a charge or discharge above the device rating is clamped to full power in the opposite direction (#28). 0.9.6 also fixes the battery ERROR status, which was never recognised (#38). Read the upgrade notes below before upgrading: several behaviours changed.
Upgrade notes¶
Behaviour changes that can affect code built on the library:
- connect() no longer runs the extension writability test, so _extension_writable stays None after connecting. Call test_extension_writability() explicitly if you need it. That call writes 15507–15509. (#24)
- VirtualModeController calculators (_calc_*) return the opposite sign from before: positive = charge, negative = discharge, matching BatteryCommand. Subclasses or direct callers must follow. (#20)
- Self-consumption grid-charges only below self_reserve_pct (default 20%), not below target_soc, and no longer refuses to start with a full battery. (#20)
- verify_command_execution() returns ok=False when the readback fails. It used to assume success. (#21)
- Failed status reads log at warning level (first failure, then at most once a minute, then on recovery) instead of debug. (#22)
- When one model fails inside read_battery_status() or read_solar_status(), the result now carries partial (e.g. ['714']) and leaves that model's keys out. read_solar_status() used to report them as 0. Use .get() on ac_power_w, dc_power_w and battery_dc_power_w, and treat a present partial as an incomplete sample. (#52)
Fixed¶
- Partial read failures are no longer silent. A model 714 (or 502) read that failed inside an otherwise successful
read_battery_status()orread_solar_status()was logged at debug level only. Battery power, state, current and temperature disappeared without trace, andread_solar_status()reported0W, which looks the same as an idle battery or no solar. It now logs a warning (first failure, then at most once a minute per model, then on recovery), updateslast_error, and lists the model inpartial. A failed M502 still falls back to the extension solar total when one is available.consecutive_failureskeeps counting whole-read failures only. (#52) - Battery status is read with the SunSpec values. Model 713 defines
Staas 0 OK, 1 WARNING, 2 ERROR (pysunspec2 1.3.3model_713.json); the library tested for 6, which SunSpec does not define, so a battery ERROR was never recognised.--statusnow prints ERROR or WARNING, andcheck_blocking_alarms()reportsBATTERY_FAULTon 2 instead of 6. A WARNING, or a value SunSpec does not define, is logged. OnlySta = 0has been observed on the aGate. (#38) connect()no longer writes to the device. It ran the extension writability test on every connection: it wrote 15507 (operating mode), 15508 and 15509 (reserves) with test values and restored them only if the readback matched. On a unit where those registers are writable, every connect (including every bridge reconnect) briefly changed the mode and reserves, and a dropped link could leave them changed (a 100% reserve was tested as 0%). The test is now the explicittest_extension_writability(), still run by--test-extension-write. (#24)- The rating clamp no longer reverses the direction of over-limit commands.
send_command()clamped a charge above the device rating to a full-rate discharge, and a discharge above it to a full-rate charge (e.g.--power 6000on a 5 kW unit discharged at 5 kW). It now clamps to the rating in the requested direction. The same fix is intools/franklinwh_control_standalone.py. (#28) - Virtual-mode calculators now return the
BatteryCommandconvention (positive = charge, negative = discharge) that the SoC limiter andsend_command()expect. Self-consumption, peak-shave and the TOUdischargestrategy returned the opposite sign, so the limiter ramped and blocked the wrong direction (a charge near the discharge floor was cut back or blocked without any log), and the inverted setpoint went out as a positiveWSetPct, which the device ignores. Reported by @balloobbot in #12. (#20) - Self-consumption grid-charges at full power only below
self_reserve_pct(--reserve, previously accepted but unused). Between the reserve andtarget_socit covers home load from the battery and charges from excess solar. Before, it charged whenever SoC was belowtarget_soc, which defaults to 100. Starting self-consumption with a full battery is no longer refused. (#20) --power/--durationhonours--min-discharge-soc 0instead of coercing it to 20. The 20% default on that path is unchanged. (#20)VirtualModeController.verify_command_execution()compared the never-writtenM704.WSetwith battery power, so it always passed. It now reads the setpoint back fromWSetPctand reports a failed readback instead of assuming success. (#21)
Added¶
FranklinWHController.verify_dispatch(expected_w, tolerance_pct=20, timeout_s=0)reads backWSetEna/WSetPctandM714.DCW, compares them in theBatteryCommandconvention, and returnsok,dispatched,commanded_w,actual_wandreason. It detects a dispatch the device accepted but did not act on. Withtimeout_sit polls while the battery ramps. Tolerance has a 100 W floor (M714.DCW reads in 100 W steps), and commands under 150 W are verified on the setpoint only. (#21)- Controller I/O health:
last_success_ts,last_error,last_error_ts,consecutive_failuresanddata_age_s, so callers can tell a dead link from an empty read. (#22) - The SoC limiter logs when it ramps a command (once per distinct value), not only when it blocks one. (#20)
Changed¶
send_command(duration_s=…)documents that its timeout runsreset_control_state()on a timer thread without the caller's lock. Callers that share the controller across threads should release from their own watchdog instead. A lock fix is tracked in #54.- Failed status reads (
read_battery_status,read_grid_status,read_solar_status,read_control_status) log at warning level on the first failure and then at most once a minute, plus once on recovery. They were logged at debug level only. Return values are unchanged ({}on failure). (#22)
0.9.5 - 2026-10-07¶
Added¶
franklinwh_modbus.discovery— read-only discovery of SunSpec Modbus devices, for finding an aGate on a host or subnet without re-implementing Modbus I/O.probe(host, …)checks theSunSmarker at bases 0, 40000, 50000 and 30000 and reads the Common model nameplate in one request;scan(subnet, …)TCP-checks port 502 in parallel and probes only the open hosts (private ranges and at most 254 hosts unless told otherwise). Only SunSpec devices returning the Common model (1) count assunspec; anything else listening isunknown(reason inerror), and nothing listening isclosed.is_franklinwhflags a SunSpec device whose manufacturer names FranklinWH;summarygives a one-line description. Works with both pymodbus unit-id keywords (slave=/device_id=). Documented indocs/DISCOVERY.md.
Changed¶
tools/network_scanner.py:ModbusSunspecProbernow delegates todiscovery.probe()(same output, same 3-attempt behaviour), so the tool and the library share one SunSpec probe.
0.9.4 - 2026-10-04¶
Fixed¶
--dry-runno longer writes to the device.set_mode()applies a mode immediately viaexecute_once()but took nodry_runparameter, sofranklinwh_cli.py --vmode ... --dry-runengaged control (WSetEna=1,WSetPct=100.0) and then reported "no commands sent". Confirmed on an aGate X (V10R01B04D00); the orphaned dispatch pins the battery until released. Both CLI entry points were affected (--vmodeand--power/--duration).set_mode()andexecute_once()now takedry_run, matchingset_native_mode()and its siblings. (#13)
Changed¶
- Removed the unverified "SPAN Modbus unlock" attribution from all messages, logs, help text and the capability manifest. The library stated that extension register writes (15507-15509) fail because an installer option needs unlocking; that was inference, never confirmed by FranklinWH, and reached end users as actionable advice. Messages now report only what is observed: writes are accepted at the protocol level but not applied on the firmware tested.
--check-spanno longer infers writability from panel presence._span_writablerenamed to_extension_writable. (#14) - Package metadata and LICENSE now use the GitHub handle rather than a real name.
Added¶
- Legal disclaimer (
DISCLAIMERinconstants.py), logged once per process atFranklinWHControllerconstruction and reproduced inreadme.mdanddocs/index.md. States that this library is unofficial and unaffiliated, that it writes to energy hardware and can charge, discharge and stop a battery, and that FranklinWH support should not be contacted about defects or feature requests for this software. (#14) - Documentation of FranklinWH's SunSpec Alliance contributing membership on the docs front page and in
SUNSPEC_COMPLIANCE_BASIS.md. (#14) - Regression tests asserting a dry run never reaches
send_commandwithoutdry_runset (tests/unit/test_dry_run_no_writes.py). (#13)
0.9.3 - 2026-06-15¶
Added¶
- Multi-battery parallel stack support in SunSpec Model 714 (
DER Storage DC Measurement), including summing power/energy, voltage averaging, and peak temperature tracking across parallel battery stacks. - Per-battery telemetry array (
individual_batteries) inread_battery_status()for granular battery stack diagnostics. - Repeating block suffix tag notation (e.g.,
714.DCW_1,714.DCW_2) inSunSpecSequencerto target specific repeating block registers. - Support for scanning and displaying repeating blocks with cache-aware scale factor resolution and suffix formatting in the diagnostic reader tool (
modbus_sunspec2_reader.py). - Certified PICS-compliant enum resolution utility (
get_pics_enum_desc) andFranklinWHController.get_enum_descfor client applications (FEAT-PICS-ENUM-RESOLVER) - Prominent TUI Control status header (
Control: Remote (r=release)orControl: Local) and active VPP setpoint warning alerts (WSetEnaandWSetPct) on the interactive dashboard (FEAT-MONITOR-VPP-WARNINGS) - SunSpec InfoPoint Sequencer for automated register control sequences
- Diagnostic conformance suite for hardware register verification
- Comprehensive SunSpec Model Reference documentation (
SUNSPEC_MODEL_REFERENCE.md) - MIT License, CONTRIBUTING.md, GitHub issue/PR templates
- Branch protection rulesets for
developandmaster - Repository topics for discoverability
- Grid lifetime energy metrics (
M701.TotWhInj,M701.TotWhAbs) inread_grid_status(), monitor TUI, and--status --detail(FEAT-MONITOR-GRID-LIFETIME) - Standby Handshake during release of remote control (
reset_control_state) to force0Wpower output and wait for the inverter to ramp down/stabilize before settingWSetEna=0. Prevents abrupt transients on physical hardware. - Unit test coverage for Standby Handshake (
tests/unit/test_standby_handshake.py) testing active VPP delays, inactive control bypasses, and 0-second overrides. - Automated
uint32data width support, scale factor resolution, and enum symbol mapping in theSunSpecSequencerfor proprietary extension registers. - Step-level inline overrides for sequencing reads and writes, allowing custom type/scaling configurations dynamically, supporting
"addr","point", and"address"configuration keys.
Fixed¶
- CRITICAL: Fixed bug in
verify_command_execution()where scale factor lookup failed due to usingselfinstead ofself.ctrl. - Synchronized Grid and Battery telemetry signs with confirmed hardware behavior (Negative = Charge/Import). Resolves directional labeling conflict in CLI and Monitor (Batch 4 / Issue #6).
- Corrected
battery_statederivation incontroller.pyto match physical power flow. - CRITICAL: Added missing
Unionto thetypingimport incontroller.py; method parameter annotations usingUnion[...]raisedNameError: name 'Union' is not definedat import on Python ≤ 3.13 (the eager-annotation versions, incl. CI's 3.12). Python 3.14's deferred annotation evaluation (PEP 649) had masked it in local dev runs.
Changed¶
- Replaced hardcoded IP addresses with
YOUR_AGATE_IPplaceholder - Replaced device serial numbers with
XXXXXXXXXXXXXXXXXXXXplaceholder - Updated
setup.pyemail to GitHub noreply address - Cleaned docs/ and tools/ indexes for public visibility
- Updated
reset_control_statemethod signature to accept a configurablehandshake_wait_sparameter (default1.0seconds) to control the standby handshake duration.
Removed¶
- Internal test results, archive directory, agent configs from tracked files
- 53 one-off tool scripts (9 curated tools remain)
- Internal design docs and proprietary references
0.9.0 - 2026-03-16¶
Fixed¶
- CRITICAL: WSetPct charge rate calculation used wrong denominator (
WMaxRtg=1000Winstead ofWChaRteMaxRtg=5000W). Requesting 1200W charge now correctly produces WSetPct=-24% instead of -120%. (DEF-001) actual_powerread-back inread_full_status()now uses direction-aware charge/discharge rates- Success messages display correct rated capacity (5000W) instead of WMaxRtg (1000W)
- "ORPHANED VPP DETECTED" warning downgraded to INFO — WSetEna=1 is normal persistent state (DEF-002)
- Removed EXTENSION REGISTERS section from
--statusoutput; retained in--healthcheck(DEF-003)
Added¶
- High-resolution home load from Register 16000 (~1W precision vs 10W from extensions)
- Propagated high-res home load to CLI, standalone tool, and demo
- Base-1 addressing reference in QUIRKS.md
- PICS-driven safety improvements: orphan VPP check, input validation, alarm definitions
- M801/M802 battery model scan — confirmed non-existence on aGate
- Register 15000-15043 correlation analysis
Changed¶
- Conflict detection now uses energy context (solar, load, grid) to reduce false positives
- PICS conformance cross-reference updated with vendor submission findings
0.8.0 - 2026-03-10¶
Added¶
- Package namespace renamed from
franklinwhtofranklinwh_modbus(avoids conflict with Cloud API) - SunSpec DER sequencing reference documentation
- Comprehensive hardware test guide
- VPP Mode visual reference with mobile app screenshots
Changed¶
- CLI restructured to use library imports (
from franklinwh_modbus import ...)
0.7.0 - 2026-03-08¶
Added¶
- Extension register write probing (15507-15509 writability detection)
- Virtual mode specifications (Self-Consumption, Emergency Backup, TOU, Peak Shave, Manual)
- Orchestration and control documentation with sequence diagrams
- Safety controls documentation (10 safety rules)
- Software timeout (watchdog) implementation for VPP commands
- Battery state derivation from DC power (replacing unreliable M713.Sta)
Fixed¶
- SoC proximity ramping for charge/discharge near target
- Control conflict detection with aGate native modes
0.6.0 - 2026-02-24¶
Added¶
- MQTT publisher with Home Assistant discovery
- TUI monitor (
--monitor) using Rich library - TOU schedule support with JSON definitions
- Modbus throttling analysis and rate limiting
- Network scanner for aGate discovery
Fixed¶
- Connection stability with threaded status fetching and timeout guards
- MQTT keepalive tuning for persistent sessions
0.5.0 - 2026-02-18¶
Added¶
- Initial
FranklinWHControllerwith pysunspec2 integration - SunSpec model scanning (Models 1, 701-715)
- Battery charge/discharge via M704 WSetPct/WSetEna
- Extension register reading (15500-15509)
- CLI tool with
--status,--charge,--discharge,--stop - Basic alarm monitoring