Skip to content

AutoSwg % — v0.1.0 (Testing Release)

Pre-release
Pre-release

Choose a tag to compare

@bigeric32 bigeric32 released this 01 Oct 15:11
· 2 commits to master since this release

AutoSwg % — v0.1.0 (Testing Release)

This is the first testable build of AutoSwg %, a PoolMath-driven automation
for Pentair-style salt cells that recommends (and optionally applies) a SWG
duty-cycle percentage based on your pool's actual chlorine consumption,
instead of a fixed, manually-tuned setting.

This is a pre-release for testing, built on top of a standard
nodejs-poolController / dashPanel / relayEquipmentManager (REM) setup. It
requires all three components below to be at the matching versions.

What you need

Component Version to use
nodejs-poolController (njsPC) tag autoswg-v0.1.0
nodejs-poolController-dashPanel tag autoswg-v0.1.0
relayEquipmentManager (REM) branch fix/relay-shutdown

See the separate Testing Instructions document for setup steps.


Highlights

AutoSwg % reads your PoolMath chlorine log, calculates your pool's actual
FC consumption rate, and recommends a salt cell % that will both replace that
ongoing consumption and correct toward a target FC level within a chosen
number of days. Nothing is ever applied automatically without an explicit,
reviewed confirmation.

  • Check Now / Apply / Cancel workflow — review a recommendation (current
    estimate, recommended vs. steady-state "maintenance" %, consumption rate,
    projected FC, and the reasoning behind it) before anything is sent to the
    chlorinator.
  • Schedule-aware run window — automatically uses a linked SWG schedule's
    real start/end times (including sunrise/sunset), or manually configured
    hours if no schedule is linked.
  • Bidirectional automatic stepping — after applying a recommendation that
    differs from steady-state maintenance, automatically schedules a step back
    to maintenance (up or down) once the target period elapses. Survives a
    server restart.
  • Manual-override awareness — changing the SWG % by hand (from the
    dashboard or the chlorinator settings page) now prompts for confirmation if
    it will cancel a pending automatic step, and correctly updates "what's
    actually running now" to reflect the override.
  • Dashboard status at a glance — a compact summary and popup showing the
    last applied change and any pending step, without needing to run a fresh
    calculation. The dashboard never shows an unapplied, in-progress
    calculation — that stays on the dedicated calculation screen.
  • Local audit history — every applied change (automatic or manual) and
    relevant PoolMath entries are logged locally and exportable as CSV/JSON.

Also included in this build

These are not required for AutoSwg % to function, but were fixed or added
along the way and are included in this combined test build:

nodejs-poolController

  • Fixed a sunrise-to-sunset schedule failing to re-trigger its relay after a
    mid-day restart.
  • Fixed a duplicate-branch bug in the sunset run-window calculation.
  • Fixed a heater setpoint being clobbered by schedule re-trigger logic after
    a restart.
  • Fixed the Cool Point (nocturnal solar cooling) option not appearing in the
    UI.
  • Fixed solar heat failing to resume after a restart (a stale "reheat guard"
    temperature blocked it until the setpoint was touched by hand).
  • Solar on/off decisions now use the truncated water temperature, so solar
    runs closer to the true setpoint.
  • Added a chlorinator "recent messages" diagnostic view (RS485 traffic in
    both directions, including commands sent by njsPC itself).
  • Fixed pm2 orphaned-process buildup (process manager now points directly at
    the compiled entry point).

dashPanel

  • Added today's sunrise/sunset display next to the Schedules panel title.
  • Added a Nocturnal Cooling checkbox to the pool body's heat settings popup.
  • Added the chlorinator "Details" popup for the RS485 diagnostic view above.

relayEquipmentManager

  • Fixed relays not actually de-energizing on a clean shutdown.

Changelog

v0.1.1 (njsPC only — dashPanel and REM unchanged, keep using v0.1.0/fix/relay-shutdown)

  • Fixed projectedCurrentFc's "generated since last reading" calculation to correctly credit each SWG % change since your last FC reading for only the run-window hours it was actually in effect, instead of applying whatever % is current now across the entire elapsed period. This matters if you change the SWG % by hand more than once between PoolMath FC readings — previously the projected FC (and therefore the recommendation) could be skewed by assuming your latest % had been running the whole time.

v0.1.0 — initial testing release.

Known limitations

  • AutoSwg % currently targets Nixie/virtual-controller setups with a
    directly-controlled chlorinator; it has not been tested against a physical
    OCP (IntelliCenter/EasyTouch)-managed chlorinator.
  • Requires a PoolMath account with a public share page/code.

Documentation

Full writeup of how AutoSwg % works lives on the
nodejs-poolController wiki.

Reporting Issues

Found a bug, or something not behaving as described? Please open an issue in
the repo where the problem actually shows up:

Not sure which? Open it on the njsPC repo and I'll move it if needed.

When filing an issue, please include:

  • What you did and what you expected vs. what actually happened
  • Whether you're running Nixie or a physical OCP, and your chlorinator model
  • The relevant section of the njsPC log around the time of the issue
  • For anything protocol/timing-related, a screenshot of the chlorinator's
    "Details" popup (RS485 messages) is often more useful than a description