Improve Hayward HWVS pump reliability with comm failure tracking and …#1175
Open
camaro4life18 wants to merge 26 commits into
Open
Improve Hayward HWVS pump reliability with comm failure tracking and …#1175camaro4life18 wants to merge 26 commits into
camaro4life18 wants to merge 26 commits into
Conversation
…exponential backoff - Implement requestPumpStatusAsync() to actively poll Hayward pump status instead of no-op - Add consecutive communication failure tracking with exponential backoff in polling (2s to max 30s after 5 failures) - Add pollEquipmentAsync() override to include status polling after each state update - Add updateCommStatus() to set pump status to warning/error based on failure count - Preserve last known pump state on comm failure instead of zeroing rpm/watts - Fix silent error swallow in setPumpToRemoteControlAsync (was missing logger.error) - Increase retries from 1 to 3 and add 2500ms timeout on outbound messages - Update package-lock.json license identifier to AGPL-3.0-only
- Add singleMixPeriod property to ChemController and ChemDoser classes - Default is false to maintain backward compatibility - When enabled, prevents simultaneous chemical dosing during mixing periods - ChemController: pH checks ORP mixing state and vice versa - ChemDoser: checks all other dosers for active mixing - Fixes issue with hot tub chemical balance from simultaneous mixing
Owner
|
Thanks for this. There are a couple of changes in here that I'd accept, including:
However, there's a few that give me pause.
|
Implements the Wojtowicz 1994 empirical formula to calculate a proportional chlorine dose from ORP and pH readings, replacing the hardcoded demand=0 in the peristaltic ORP dosing path. New config fields on ChemicalORP (off by default): orpFormula - enables the chemistry-based demand calculation chlorineType - selects the chlorine product (10%, 12.5%, 6% NaOCl) Formula: FC_ppm = 10^((ORP - 683 + 59.2*(pH-7.0)) / 48.9) Dose: mL = deltaFC * gallons * 3.785411784 * dosingFactor Changes: - controller/boards/SystemBoard.ts: add chlorineTypes byteValueMap - controller/Equipment.ts: add chlorineType + orpFormula to ChemicalORP - controller/State.ts: add calcDemand() override to ChemicalORPState - controller/nixie/chemistry/ChemController.ts: wire calcDemand into peristaltic ORP dosing path; handle new fields in setORPAsync() A CYA warning is logged each cycle when orpFormula is enabled and cyanuricAcid is outside the accurate range of 25-50 ppm.
Implements a hydraulics-based pump scheduling service that generates a
daily three-block speed schedule targeting 1.0-1.5 pool turnovers while
maximising Affinity Law energy savings.
New files:
- controller/services/HydraulicsCalc.ts -- pure affinity-law math
(gpmForRPM, rpmForGPM, affinityPower, calcScheduleBlocks)
- controller/services/PumpSchedulerService.ts -- lifecycle service
(initAsync/closeAsync, midnight re-arm timer, Feature circuit
creation, schedule writing via sys.board.schedules.setScheduleAsync)
- scripts/testPumpScheduler.js -- standalone CLI validation tool
Modified files:
- controller/nixie/Nixie.ts -- wired pumpScheduler into initAsync/closeAsync
- web/services/config/Config.ts -- added 4 REST routes:
GET /config/services/pumpScheduler
POST /config/services/pumpScheduler/generate
PUT /config/services/pumpScheduler/config
GET /config/services/pumpScheduler/circuits
- defaultConfig.json -- added pumpScheduler defaults (20k gal, 1.2x
turnovers, feature IDs 14/15/16, schedule IDs 10/11/12)
Hardware target: Hayward Super Pump VS 700 on Raspberry Pi via RS-485.
…ell, pump.maxSpeed integration
…s from circuits endpoint
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.
…exponential backoff