Skip logger event-marker lines when loading stats records #6

Manually merged
marvin8 merged 2 commits from fix/issue-5-analyze-event-lines into main 2026-09-09 03:24:37 +00:00
Collaborator

Two related changes on one branch:

Skip logger event-marker lines — the logger (PR #4) interleaves connect/disconnect event lines into the stats stream. load_records() loaded them as data records: counts were inflated, and a marker arriving at night (irradiance None, not 0) terminated a contiguous night block — splitting overnight discharge episodes and corrupting that section of the report. Fix: skip any parsed line carrying an event key. Closes #5.

Document desired sensor data — new "Desired sensor data (not yet logged)" section in mqtt-topic-logger.md: signed battery power (closes the power ledger exactly instead of inferring drain as a residual), battery temperature / BMS charge limit (SoC 95–99 taper modelling), array-plane irradiance (collapses the seasonal slope split, R² 0.69), inverter temperature/derate state — plus what is already covered. Closes #7.

TDD: new EventLineFilterTests in test_analyze.py — all 7 analyze tests green.

Closes #5
Closes #7

Two related changes on one branch: **Skip logger event-marker lines** — the logger (PR #4) interleaves `connect`/`disconnect` event lines into the stats stream. `load_records()` loaded them as data records: counts were inflated, and a marker arriving at night (irradiance `None`, not `0`) terminated a contiguous night block — splitting overnight discharge episodes and corrupting that section of the report. Fix: skip any parsed line carrying an `event` key. Closes #5. **Document desired sensor data** — new "Desired sensor data (not yet logged)" section in `mqtt-topic-logger.md`: signed battery power (closes the power ledger exactly instead of inferring drain as a residual), battery temperature / BMS charge limit (SoC 95–99 taper modelling), array-plane irradiance (collapses the seasonal slope split, R² 0.69), inverter temperature/derate state — plus what is already covered. Closes #7. TDD: new `EventLineFilterTests` in `test_analyze.py` — all 7 analyze tests green. Closes #5 Closes #7
The logger interleaves connect/disconnect event lines into the stats
stream. load_records() loaded them as records, inflating record counts
and - when a marker lands at night - splitting a contiguous
irradiance==0 block, corrupting the overnight discharge-rate analysis.
Lines carrying an event key are now skipped at load time.

Closes #5
New section in mqtt-topic-logger.md listing the sensor fields we want
but do not currently collect, with the analysis each unlocks: signed
battery power (closes the power ledger exactly instead of inferring
drain as a residual), battery temperature / BMS charge limit (turns the
excluded SoC 95-99 taper band into a modellable curve), array-plane
irradiance (collapses the seasonal irradiance-to-power slope split),
and inverter temperature / derate state. Also records what is already
covered so the list stays honest.

Closes #7
marvin8 approved these changes 2026-09-09 03:23:54 +00:00
marvin8 manually merged commit 44a9e93c9e into main 2026-09-09 03:24:37 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
marvin8/IrradiationToPowerProduction!6
No description provided.