Repository navigation
Releases
Releases · apadevices/APAPUMP
1.3.3
Fixed
- Max pool now ends a running solar heating run. Before, Max pool only blocked a heating run from
starting: a run already going continued until the collector was less thanstopDeltawarmer than the
pool, so on a sunny afternoon the pool could end above Max pool. Now the run ends once the pool reaches
Max pool, and heating may start again below Max pool −APAPUMP_SOLAR_MAX_POOL_HYST_C(new, 0.5 °C,
#ifndef) so it does not toggle at the limit. Cooling above Max pool is unchanged. Found by the
APA-CONTROLLER manual review.
Footprint
- +0 B RAM, +54 B flash (example 05). Built on AVR only (Mega, Uno; patch to the solar heating rule).
1.3.2
Fixed
- Running overheat protection switches the heater off at once (heater modes). Before, a heat pump that
was already on kept running for the rest of its 10-minute minimum ON time while the collector was above
safetyTempand overheat protection pushed hot water into the pool. Now overheat protection beats the
minimum ON time, like a pump alarm; the 10-minute minimum OFF time follows. Only while the protection
really runs (AUTO, no pump alarm) — inFORCE_OFF/FORCE_ONthe valve is closed and the heater keeps
its normal rules. When normal solar heating takes over, the heater still finishes its minimum ON time
(both heat the pool; the guard protects the compressor). Found on the APA-CONTROLLER bench.
Footprint
- +0 B RAM, +10 B flash (example 05). Built on AVR only (Mega, Uno; patch to the heater rule).
1.3.1
Fixed
FORCE_OFFand a latched pump alarm no longer wait for the AUX after-run (enableAux()'s
stopLeadS). Before, with AUX on, the stop switched AUX off and kept the pump running for the lead —
e.g. 120 s with a heat pump. Manual OFF should stop at once (someone may be working at the pump), and a
sketch that stops the pump on a dry-run / high-pressure / overload alarm (as the README recommends) left it
running dry or overloaded for the whole lead. Now AUX and the pump go off together; an after-run already
counting is cut short. Normal stops (schedule end, solar run end) keep the after-run. UVC still gets its
post-delay. Found on the APA-CONTROLLER bench.
Footprint
- Mega: +0 B RAM, +32 B flash (example 05 and APA-CONTROLLER). Built on the Mega only (patch to the stop sequence).
1.3.0
[1.3.0] — 2026-11-09
Behaviour changes (read before updating)
- Solar overheat protection no longer overrides
FORCE_OFF. It runs only inAUTOand never while a
pump alarm is latched (manual OFF usually means someone works at the pump; after a dry run there is no
water to circulate).isSolarSafetyActive()still reports a hot collector in every mode. - Solar no longer replaces the schedule. Default
SOLAR_WITH_SCHEDULE: the schedule keeps driving the
pump, solar heating and cooling are extra runs.setSolarDrive(SOLAR_WITH_CATCHUP)restores 1.2.0. - The solar valve follows the solar demand during a run (before: set only at pump start, so it stayed
open while the collector cooled, or closed while it warmed). After every valve change the pressure
checks and baseline learning pause for 30 s (APAPUMP_VALVE_SETTLE_SEC). - Invalid temperatures stop solar logic instead of being used: outside −20…100 °C, exactly 85.0
(DS18B20 power-on) or exactly −1.0 (old "not ready"). A pool temperature callback is now required for
solar (before, a missing one counted as 0 °C → heating all day). - Saved settings: solar mode, Max pool, AUX mode, heater target and
setPressureEnabled()are saved.
enableSolar()'suseValve/maxPoolTempandenableAux()are first-boot defaults only. - EEPROM layout version 2 (15 bytes, 520–534). Upgrading resets the block once: the clean-filter
pressure, daily target and counters are learned / set again. - In heater modes the pump stops without the AUX stop lead when AUX was already off.
AUX_FOLLOWER
(the default ofenableAux()) behaves exactly as before. - While a pump alarm is latched, solar asks for no extra runs (heating, cooling, overheat) — the schedule
still runs as before; your sketch decides whether to stop the pump on an alarm.
Added
- Heater (heat pump) on the AUX relay:
AuxMode(AUX_DISABLED,AUX_FOLLOWER,HEATER_SIMPLE,
HEATER_FULL),setAuxMode(),setHeaterTarget()(15–40 °C, default 28),setHeaterPermitCallback()
(e.g. cheap tariff),isHeaterOn(). Solar first; off on a pump alarm; no extra pump runs; minimum
ON/OFF 10 min (APAPUMP_HEATER_MIN_ON_SEC/_MIN_OFF_SEC);HEATER_FULLhysteresisAPAPUMP_HEATER_HYST_C. - Solar:
SolarMode(SOLAR_OFF,SOLAR_PUMP,SOLAR_VALVE),setSolarMode(),setSolarMaxPool()
(0 = no limit),SolarDrive+setSolarDrive(),isSolarRunning(),isSolarValveOpen(),
isSolarSensorOk()(status "Solar sensor fault" / "Solar sensor OK"). setPoolTempCallback()— one pool temperature for solar andHEATER_FULL.hasSavedSettings()— apply your own first-boot defaults without overwriting saved choices.- Constants (
#ifndef):APAPUMP_TEMP_MIN_C,APAPUMP_TEMP_MAX_C,APAPUMP_FREEZE_HYST_C,
APAPUMP_VALVE_SETTLE_SEC,APAPUMP_HEATER_*. - Example
05_solar_heater. README: solar rewrite, "Day/night gate — why it exists", heater section with
the relay rule, "Saved settings".
Fixed
Found on the bench before release (APA board, DS18B20 in hot water / ice, fake pressure):
- Solar extra runs went on during a latched pump alarm (a dry pump kept running for solar heating).
- After an alarm was acknowledged while solar was heating, the heater switched on for its whole minimum
ON time: it is checked before solar re-evaluates, and the alarm had cleared solar's state. "Solar first"
now also holds while solar can heat (valid collector above pool + startDelta, inside the day gate). - A saved
AuxModeswitched the AUX relay on in a sketch that never calledenableAux()this boot. A
saved mode now never activates a relay the sketch did not register.
Found in review:
- Freeze protection was off exactly below 0 °C — readings below 0 were treated as "not ready". They are
valid now; an invalid reading no longer ends an active protection, which ends only at threshold +
APAPUMP_FREEZE_HYST_C(1.0 °C; before, no hysteresis). - Missing collector sensor (−127) made solar cooling run nonstop while the pool was above
maxPoolTemp;
the DS18B20 power-on value 85.0 started a false overheat run. Both are invalid readings now. - Example 02:
rtc.getEpoch()does not exist in the DS3231 library (→RTClib::now().unixtime()); the
time of day was never updated, so the schedule never switched the pump; the hand-written schedule check
missed slots across midnight (→gui.isTimerActive()); the in-sketch#define APA_LCD_USE_DS3231caused
a link error and is removed. The samegetEpoch()call was fixed in README, API.md and example 03. - Docs:
begin()writes all relays OFF as0xFFon the active-low default board (README said0x00);
overridingAPAPUMP_EEPROM_ADDRneedsbuild_flags(a sketch#definedoes not reach the library .cpp).
Footprint
- +13–16 B RAM, about +1.5 KB flash (example 01; all five examples on all five platforms, zero library warnings).
APAPUMP v1.2.0
Added
setPressureEnabled(bool)/isPressureEnabled()— switch pressure monitoring off and on at runtime (afterenablePressure()), e.g. from an installer menu for pools without a pressure sensor. OFF stops the dry-run, high-pressure and filter-status checks and clears the last reading and both learned baselines (a stale reading would otherwise stay in the checks); the stored clean-filter pressure is kept. Before 1.2.0 pressure monitoring could only be enabled, never disabled. 0 bytes RAM.- README section "Pressure sensor optional".
APAPUMP v1.1.1
Fixed
- The sample that raised an alarm was still learned. 1.1.0 stopped learning while an alarm is active, but in
update()the 10 s learning tick ran before the safety checks, so the one pressure sample that triggered the alarm was added to the baseline first;_updateCurrentEma()likewise added the overcurrent sample before comparing it. During the 5-sample start-up average one such sample weighs 20–100 % — found on the APA-CONTROLLER bench, where a 3.1 bar overpressure sample raised the baseline from 0.20 to 0.93 bar (and as the 5th sample it would have become the clean-filter pressure). Now the safety checks run first, the learning tick is skipped once an alarm is raised, and the current is compared before it is learned.
APAPUMP v1.1.0
Added
- Filter status is now real.
getFilterStatus()returnsFILTER_CLEAN/FILTER_FILLING/FILTER_BACKWASH_NEEDEDfrom the rise of the running pressure (solar valve closed) above the clean-filter pressure — previously it always returnedFILTER_UNKNOWN. Status only, no alarm. - Clean pressure learned automatically on the first run after installation (first stable baseline, ~80 s of running, pump running with solar valve closed, at least 0.1 bar) and saved to EEPROM.
- New overridable constants (
build_flags):APAPUMP_FILTER_WARN_DELTA(0.4 bar),APAPUMP_FILTER_BACKWASH_DELTA(0.8 bar),APAPUMP_CURRENT_MIN_A(0.5 A). - README: new sections "Filter status — when to backwash", "Overcurrent protection" (incl. direct drive vs. external contactor) and "Stopping the pump on an alarm".
Changed
learnCleanPressure()no longer copies one raw reading (a spike, or a stopped pump, could be stored). It clears the stored value and restarts the valve-closed baseline; the next ~80 s of running learns the new clean pressure. With the pump off, it waits for the next run.- Default filter thresholds 0.3 / 0.6 bar → 0.4 / 0.8 bar (household pools).
- Current readings below
APAPUMP_CURRENT_MIN_A(0.5 A) are ignored: no motor on the sensor (noise, or only an external contactor's coil). Overcurrent protection stays silent instead of learning noise and raising false alarms. setCleanPressure()clamps negative values to 0 (= not learned).
Fixed
- Safety: learned baselines kept learning during an alarm. The library does not stop the pump on an alarm, so a dry-running pump taught the pressure baseline ~0 bar within ~50 s — after
acknowledgeAlarm()the dry-run check (pressure < baseline × 40 %) could never fire again until reboot. An overcurrent likewise raised its own threshold. Now neither baseline is updated while an alarm is active, and pressure belowAPAPUMP_PRESSURE_ABS_MIN(0.1 bar) is never learned. - Baselines no longer rest on one reading. The start-up EMA was seeded with the first sample and kept ~81 % of it after 5 samples (weight 5 %), so one spike at 30 s could set the dry-run, overcurrent and clean-filter reference. The first 5 samples are now averaged, then the slow EMA takes over.
- Docs: the relative high-pressure alarm (
setPressurePeakAlarm()) was described as dirty-filter detection. Its baseline follows slow changes within minutes, so it only catches sudden rises — filter clogging is reported bygetFilterStatus(). - Docs: overcurrent is checked with each 10 s current sample, not "every update() tick".
- Docs:
getPressureBaseline()needs 5 samples (~80 s of running), not "5 pump runs". - Docs + example 03: post-shock bridge uses an elapsed-time check (the old
millis() < untilform breaks whenmillis()wraps);maxPressureexample 4.0 → 2.5 bar (household filter rating). - EEPROM address map updated: APADOSE 192–291 (25 B × 4), APASENSE 582–587.
APAPUMP v1.0.3
Fixed
- Updated buzzer/alarm output section: shows both direct GPIO and APASENSE v1.1.0 integrated pattern (
alert(BUZZER_ALARM, true)/stopAlert()).\n- Fixed LED index in example:setLed(4, ...)→setLed(0, ...)to match APASENSE LED API (index 0–3 maps to PCF P4–P7).
v1.0.2
What changed
- Added
keywords.txt— Arduino IDE syntax highlighting for all public methods, enums, and constants - Fixed state machine diagram alignment
- Fixed freeze protection description (cyclic, not continuous)
- Fixed SRAM callout to reference Arduino Uno
- Added buzzer/alarm output wiring pattern to README
v1.0.1
What changed
- Freeze protection now cycles (5 min ON / 10 min rest) instead of running continuously — saves energy with no SRAM cost
- Fixed
setActiveLow()example in README (was shown commented-out) - Fixed state machine diagram: alarm annotation was merged onto exit-condition line
- Fixed README logo path
- Diagram formating