Fix dashboard refresh and use Ecowitt 24-hour rainfall - #24
Merged
Merged
Conversation
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
Dashboard polling could exceed its 12-second deadline and leave old metrics displayed. Preserve Ecowitt's supplied
0x7Cvalue asRain 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
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.v0.26.257.1to 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
Maintainer verification
npm run validate:prpasses on a trusted host when the change can affect rendered UI behavior.Residual risk or unverified areas
Ecowitt packets without a usable
0x7Cclear 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.