Releases: 0jety0/emaux_spv150
Releases · 0jety0/emaux_spv150
Release list
v2.1.0
✨ Features
- Configurable request timeout — new
numberentity "Request timeout" (1–30 s, default 5 s), adjustable at runtime like the polling interval. The pump's embedded CGI server is slow/flaky over the LAN, so the default timeout is raised from 2 s to 5 s to avoid falsetimed out. Both the polling interval and the timeout are now adjustable from the UI so the pump is not overloaded.
🐛 Fixes
- api: catch
json.JSONDecodeError(non-JSON / empty body no longer raises an exception that stops polling); URL-encode the command key; keep the pump IP out ofERRORlogs (moved toDEBUG). - coordinator: adjusting a local
number(setpoint, dead band, steps, RPM, interval, timeout) no longer reloads the whole integration — cumulated energy and uptime are no longer reset. The update listener compares connection settings (host / switch / grid entity) instead of a flag: race-free, and applies options-flow edits live. - Enforced invariants:
rpm_min_solar ≤ rpm_max_solaranddead_band_lower ≤ dead_band_upper(auto-clamped in the setters). RunningStatusnormalized viastr()(works whether the pump returns"1"or1).- Options flow: tolerates a
Noneswitch/grid entity;grid_power_entityfalls back toentry.data. - sensor: a failed energy restore is now logged (
warning) instead of being silently swallowed.
🔧 Refactor & quality
PumpStatusDTO (models.py): a single typed parse of the pump JSON.SolarRegulator+SolarControllerConfig(solar.py): pure, testable proportional controller extracted from the coordinator (SRP).number/sensormigrated toNumberEntityDescription/SensorEntityDescription(DRY).GRID_POWER_STALENESS_SECONDSconstant; IP/hostname validation in the config flow.- Removed
utils.py; coordinator typedDataUpdateCoordinator[PumpStatus].
🛠️ Tooling & project
- Migrated to
uv+ruff:pyproject.toml(PEP 621) replacesPipfile;ruff(lint + format) replacesblack+isort;pytestconfig inpyproject;uv.lockcommitted. (Dev/CI tooling only — no impact on the Home Assistant runtime.) - GitHub Actions CI:
ruff check+ruff format --check+pytest(viauv), in addition tohassfestand HACS validation. - License: PolyForm Noncommercial 1.0.0 (personal / non-commercial use).
✅ Tests
- 43 pytest tests: API errors, solar P-controller, energy/uptime, reconfigure, RPM & dead-band invariants, options apply / connection-change, configurable timeout.
Pipfileremoved in favor ofpyproject.toml.
Full changelog: CHANGELOG.md
v2.0.0
What's new
Solar mode — P-controller with dead band
- Proportional controller centred on a configurable setpoint (target grid power in W)
- Configurable dead band (lower/upper bounds): no action when grid power is within the band
- Step proportional to the error from setpoint, capped at
step_up/step_down - All solar parameters editable live from the UI (number entities, direct input)
Monitoring
- Cumulated energy (
sensor.energy, kWh) — HA Energy dashboard compatible, persisted across restarts - Uptime sensor (
sensor.uptime, hours since last pump start) - Configurable polling interval: 5 / 15 / 30 / 60 s
Control
- Speed throttle between commands (default: 60 s)
- Priming: 120 s delay only on physical power-on (switch OFF→ON), not on HA reloads
- All parameters (mode, setpoint, dead band, steps, RPM limits) persisted across HA restarts
HA quality
- Single device, reconfigure without reinstalling, duplicate protection
- Long-term statistics on power and flow rate
ConfigEntryNotReadyon boot if pump offline (auto-retry)
Breaking changes
injection_threshold/consumption_threshold→setpoint,dead_band_lower,dead_band_upper- RPM min/max now editable as number entities instead of config flow options
Full Changelog: https://github.com/0jety0/emaux_spv150/commits/v2.0.0
V1.0.0
Create New Integration for Emaux SPV150 Pool Pump
This integration allows you to control and monitor the Emaux SPV150 pool pump directly from Home Assistant. With this integration, users can easily adjust the pump speed, ranging from 800 to 3400 RPM, providing precise control based on your pool filtration needs.
Key Features:
- Pump Speed Control: Adjust the pump speed between 800 and 3400 RPM, depending on your filtration needs.
- Pump Monitoring: Real-time monitoring of the pump’s status to ensure optimal performance.
Switch Entity Control: Includes a dedicated switch entity to control whether the integration should actively communicate with the pump. When the switch is turned off, no requests are sent to the device, and all returned values are set to0. This prevents strange or misleading values from being displayed when the pump is disabled (e.g., when another system controls multiple components like an electrolyzer or auto pH system), ensuring clean and consistent sensor data in Home Assistant. - Seamless Integration with Home Assistant: Easily manage the pump via the Home Assistant interface, while automating its operation based on energy consumption or other sensors.
This integration is perfect for pool owners who want to automate and optimize the management of their pool pump for maximum efficiency while avoiding conflicts with other devices such as the electrolyzer or auto pH control system.