feat: per-phase energy via MQTT (Plan-08 #62)#82
Merged
basmeerman merged 1 commit intomasterfrom Mar 19, 2026
Merged
Conversation
Add per-phase energy (Wh) data via MQTT for meters that support it. - New EnergyPhase[3] field in Meter class - Per-phase energy register read for Eastron SDM630/SDM630-INV (registers 0x015A-0x015F, total active energy per phase) - 6 new MQTT topics: MainsEnergyL1/L2/L3, EVEnergyL1/L2/L3 - HA discovery with device_class=energy, state_class=total_increasing - Zero-value guard prevents publishing before first valid read - 6 new mqtt_slot_t entries, MQTT_CACHE_MAX_SLOTS bumped to 84 - New ModbusRequestLoop case 22 for per-phase energy reads (~60s interval) Other meters can be added incrementally by extending requestPhaseEnergyMeasurement() with their per-phase energy registers. Closes #62 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.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.
Summary
EnergyPhase[3]field in Meter class for per-phase energy (Wh)MainsEnergyL1/L2/L3,EVEnergyL1/L2/L3device_class: energy,state_class: total_increasing,unit: WhModbusRequestLoopcase 22, ~60s polling intervalOther meter types can be added incrementally by extending
requestPhaseEnergyMeasurement().Test plan
Closes #62
🤖 Generated with Claude Code