Skip to content

Fix dashboard refresh and use Ecowitt 24-hour rainfall - #24

Merged
mot-yelraf merged 1 commit into
trunkfrom
dashboard-refresh
Sep 14, 2026
Merged

mot-yelraf merged 1 commit into
trunkfrom
dashboard-refresh

Conversation

@mot-yelraf

@mot-yelraf mot-yelraf commented Sep 14, 2026 •

Copy link
Copy Markdown
Owner

Summary

Dashboard polling could exceed its 12-second deadline and leave old metrics displayed. Preserve Ecowitt's supplied 0x7C value as Rain Last 24h, bypass Ecowitt rainfall derivation, and make the remaining rainfall window query use existing indexes while retaining WeeWX semantics and legacy timestamp compatibility.

Keep gauge initialization synchronized with live values, show failed-update notices with automatic recovery, and bound JSON-body reads. Correct the profiler to verify completed refreshes, enforce navigation timeouts, and report progress and failures. Update the sensor/operations documentation, include the supplied studio-icon refresh, and bump the version to v0.26.257.1.

Verification

  • macOS, Python 3.13.9: 98 focused Python tests passed across Ecowitt parser/ingest, persistence, profiler, dashboard HTML, and WeeWX ingest/settings.
  • Follow-up persistence/profiler/HTML and Python compile checks: 59 passed after final adjustments.
  • npm run validate:pr: all 30 local Chromium tests passed, including stalled JSON recovery, stale gauge prevention, and profiler failure detection. Fixture tests use no production MQTT or GPIO.
  • git diff --check: passed.
  • User deployed v0.26.257.1 to two Raspberry Pis. Three samples per profiler scenario completed with no load, refresh, or scenario failures on either host. Hub 2 retained its pywebview dashboard; hub 3 had only the profiler browser. Median dashboard load: hub 2 5.43 s; hub 3 8.68 s (previously 106.84 s). Median refresh: 5.28 s and 8.97 s respectively; slowest hub 3 refresh 9.13 s.

Contributor checklist

  • This pull request addresses dashboard refresh reliability and rainfall query cost, with the supplied studio-icon refresh included.
  • I added or updated tests for behavior changes.
  • I updated the canonical documentation when behavior or configuration changed.
  • I did not commit credentials, private runtime configuration, databases, or logs.
  • I preserved compatibility-sensitive MQTT, settings, switch identity, and persistence behavior, or documented an intentional break.

Maintainer verification

  • Required remote checks pass: Python 3.11/3.13 compile and the regression suite with coverage floor.
  • npm run validate:pr passes on a trusted host when the change can affect rendered UI behavior.
  • Hardware-, broker-, onboarding-, and platform-specific behavior not covered remotely is recorded below.

Residual risk or unverified areas

Ecowitt packets without a usable 0x7C clear the current 24-hour total to unavailable rather than derive a substitute; historical readings remain intact. Hub 3 now has roughly three seconds of polling deadline headroom, but these short profiles do not establish long-term behavior under heavier load. The before/after background load differed, so timing improvement cannot be attributed entirely to code changes. Windows and physical GPIO/onboarding behavior were not separately exercised.

@mot-yelraf
mot-yelraf merged commit 321bd6c into trunk Sep 14, 2026
3 checks passed
@mot-yelraf
mot-yelraf deleted the dashboard-refresh branch September 14, 2026 17:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant