feat: CircuitMeter subpanel current limiting (#106)#117
Merged
basmeerman merged 4 commits intomasterfrom Mar 25, 2026
Merged
Conversation
…ment 1) (#106) Add CircuitMeterImeasured and MaxCircuitMains to evse_ctx_t. Clamp IsetBalanced by subpanel circuit headroom in evse_calc_balanced_current(). 5 native tests with SbE annotations. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…4, Inc 2-3) (#107, #108) Add third Meter instance for subpanel metering. Poll via Modbus when enabled, sync to evse_ctx_t via bridge, persist settings in NVS. - meter.h: extern Meter CircuitMeter declaration - main.h: CIRCUIT_METER, CIRCUIT_METER_ADDRESS, MAX_CIRCUIT_MAINS defaults - main.cpp: CircuitMeter instantiation, MaxCircuitMains global, Modbus polling states 23 (current) and 24 (energy) in ModbusRequestLoop - modbus.cpp: route CircuitMeter responses in HandleModbusResponse - evse_bridge.cpp: sync CircuitMeter.Irms max and MaxCircuitMains to ctx - esp32.cpp: NVS read/write with settings cache for 3 new keys Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
#109) Publish circuit current/power/energy via MQTT with HA auto-discovery. Add Set/MaxCircuitMains and Set/CircuitMeter topics. REST /settings integration for circuit meter configuration. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…ment 5) (#110) Add circuit_energy_wh to session_record_t. When CircuitMeter is active, session JSON includes circuit_kwh field for ERE compliance verification. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
4caf9a5 to
d701d27
Compare
This was referenced Mar 25, 2026
basmeerman
added a commit
that referenced
this pull request
Mar 25, 2026
- Add Capacity Tariff, CircuitMeter, SoC Injection to Key Features table - Add Plans 13-15 to Roadmap table (PRs #115, #116, #117) - Update test stats: 47 suites, 1,046 native tests, 1,200+ total - Add Plans 13-15 sections to upstream-differences.md - Update quality.md test metrics - Update CLAUDE.md priority table and test infrastructure count Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
3 tasks
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.
Summary
CircuitMeterImeasuredandMaxCircuitMainstoevse_ctx_tIsetBalancedby subpanel circuit headroom inevse_calc_balanced_current()Closes #106
Test plan
🤖 Generated with Claude Code