Zero stale optimizer readings when panels stop reporting at night#18
Draft
Copilot wants to merge 3 commits into
Draft
Zero stale optimizer readings when panels stop reporting at night#18Copilot wants to merge 3 commits into
Copilot wants to merge 3 commits into
Conversation
Copilot
AI
changed the title
[WIP] Investigate Tigo data freezing during night hours
Zero stale optimizer readings when panels stop reporting at night
Jun 4, 2026
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.
When optimizers sleep at sunset they stop emitting power reports, so the coordinator's last
PowerReportEventstays indata["nodes"][barcode]and sensors show frozen daytime power/voltage/current all night.Changes
coordinator.py) — added_schedule_stale_check/_perform_stale_check, scheduled and cancelled alongside the existing midnight-reset timer. EverySTALE_CHECK_INTERVAL_SECONDS(30s) it inspects each node'slast_update; nodes silent longer thanSTALE_DATA_TIMEOUT_SECONDS(120s, aligned withENERGY_GAP_THRESHOLD_SECONDS) get their instantaneous values zeroed and a coordinator update pushed.const.pySTALE_ZERO_KEYS) —power,performance,voltage_in/out,current_in/out,dc_dc_duty_cycle.daily_energy_wh,total_energy_wh,readings_today) and diagnostics (temperature,rssi); zeroing 0 °C / 0 dBm would be misleading rather than helpful.Nonelast_updateskip, reschedule, and stop-cancel.Updates are idempotent: nodes already at zero, recently reporting, or lacking a
last_updateproduce no coordinator update.Notes for review
planning/future_considerations.mditem 8).