Install
openclaw skills install @voronindenis5/pool-chemistry-pilotUse when a pool/spa owner reports test results (chlorine, pH, CYA, salt, borates, temp) and asks what to add, or asks why water is cloudy/green/irritating, or wants a chemical dosing plan with exact amounts. Computes chemical-by-chemical dosing from your actual test numbers, warns on unsafe water (high CYA, low FC/CYA ratio, pH drift), models the chlorine/CYA relationship, and prints a treatment sequence — never a sales pitch.
openclaw skills install @voronindenis5/pool-chemistry-pilotPool chemistry advice on the internet is an octopus of conflicts of interest: pool-store free water tests that always find something to sell, forum elders who worship one system and damn all others, and apps with subscriptions. Meanwhile the actual chemistry is well understood: chlorine disinfects, CYA buffers it, pH controls everything, and 90% of "my pool is green" is a FC/CYA ratio problem, not a product problem.
This skill is a dosing calculator and diagnostician that works from your test numbers:
State is a plain JSON log; the skill never phones home.
Don't use for: commercial/public pool code compliance (health-department regulations differ; this is residential guidance), pool building/plumbing/hydraulics, or swallowing-the-chemicals emergencies → poison control (US 1-800-222-1222) / emergency services.
status — parameter-by-parameter verdict with trouble lights and the FC/CYA ratio check.plan — the dosing sequence: what to add, how much, in what order, with 30–60 min re-test circulation pauses between steps.slam when fighting algae (see Slam Protocol in references) — it computes the slam FC level from CYA and tracks it daily.history to see trends; persistent drift tells you if your TA is too low to hold pH or your fill water is alkali.| Parameter | Target | Plaster | Vinyl/Fiberglass |
|---|---|---|---|
| FC (with CYA 30–50) | 3–7 ppm | same | same |
| CC | < 0.5 ppm | same | same |
| pH | 7.2–7.8 (aim 7.4–7.6) | same | same |
| TA | 60–120 ppm | 70–90 | 50–70 (fiberglass) |
| CH | 200–400 ppm | 250–450 | 150–250 (essentially cosmetic) |
| CYA | 30–50 ppm | 30–50 | 10–30 (SWG pools lower) |
| Salt (SWG) | 3000–4000 ppm | same | same |
| Borates (optional) | 30–50 ppm | same | same |
The FC/CYA rule: maintain FC ≥ 7.5% of CYA (min 3 ppm). At CYA 40 → FC 3 minimum. At CYA 90 → FC 7 minimum and your chlorine is still weaker than tap-water chlorine. High CYA doesn't "lock" chlorine; it hides it in reserve — but the active fraction is what kills algae, and it's tiny. That's the physics pool stores monetize.
python3 scripts/pool_pilot.py setup --liters 45000 --surface plaster --sanitizer swg
# (or --gallons 12000; or --shape rect --length 9 --width 4.5 --avg-depth 1.3 --unit metric)
python3 scripts/pool_pilot.py log --fc 1.5 --cc 0.5 --ph 7.8 --ta 90 --ch 350 --cya 80 --temp 27
python3 scripts/pool_pilot.py status
python3 scripts/pool_pilot.py plan --ph-target 7.4 # full dosing sequence
python3 scripts/pool_pilot.py slam # algae kill protocol
python3 scripts/pool_pilot.py history # trend table
State: pool_state.json beside the script. Pure stdlib. No network.
| Goal | Chemical | Notes |
|---|---|---|
| Raise FC | Liquid chlorine / bleach (sodium hypochlorite) | ~10–12% available chlorine; raises pH slightly |
| Lower pH | Muriatic acid (31.45% HCl) or dry acid (sodium bisulfate) | acid lowers TA a little too |
| Raise pH | Aeration (no TA change); borax / soda ash (also raise TA) | see references for which to pick |
| Raise TA | Baking soda (sodium bicarbonate) | soda ash raises pH much more per unit TA |
| Raise CYA | Stabilizer (cyanuric acid); trichlor/dichlor add it as a side effect | each ppm FC from dichlor adds ~0.9 ppm CYA |
| Raise salt | Pool salt (pure NaCl) | follow cell manufacturer range |
Full table, TA/CH/CYA interactions, and the slam-level table: references/pool-chemistry.md.
setup --shape computes it from dimensions; when in doubt, do the salt-rise method (add known kg salt, measure ppm rise).plan command sequences automatically.setup wrote pool_state.json with volume/surface/sanitizerlog of a full test panel then status prints a verdict per parameter + FC/CYA ratioplan prints grams/mL per chemical with a sequence and re-test pausesslam computes slam FC from CYA and prints the daily checklisthistory shows the logged trend"Green pool after a storm":
python3 scripts/pool_pilot.py log --fc 0 --cc 1.0 --ph 7.2 --cya 45
python3 scripts/pool_pilot.py slam # → slam level 18 ppm, brush 2x/day, filter 24/7, re-test FC nightly, keep FC at slam until FC holds overnight + water clear
"Eyes burn — too much chlorine?"
python3 scripts/pool_pilot.py log --fc 3 --ph 8.2 --ta 130 --cya 40
python3 scripts/pool_pilot.py plan # → pH 8.2 is the culprit; acid dose to 7.4, then aeration, then drop TA
"CYA is 90 — drain?"
python3 scripts/pool_pilot.py log --cya 90
python3 scripts/pool_pilot.py plan --cya-target 40 # → 55% dilution or drain to 40% and refill (dilution math printed)
Chemicals are hazardous. Always add acid to water (never water to acid), wear eye protection, never mix chlorine with acid (chlorine gas), store locked away from children. Pool chemistry is safe when respected. If swallowed: US Poison Control 1-800-222-1222, EU 112.
MIT. Residential guidance from standard pool chemistry; not a substitute for public-pool regulatory compliance or professional service. Generic chemical names only — no brand affiliations.