Skip to content

Releases: 0jety0/emaux_spv150

v2.1.0

Choose a tag to compare

@0jety0 0jety0 released this 06 Jun 17:53

✨ Features

  • Configurable request timeout — new number entity "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 false timed 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 of ERROR logs (moved to DEBUG).
  • 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_solar and dead_band_lower ≤ dead_band_upper (auto-clamped in the setters).
  • RunningStatus normalized via str() (works whether the pump returns "1" or 1).
  • Options flow: tolerates a None switch/grid entity; grid_power_entity falls back to entry.data.
  • sensor: a failed energy restore is now logged (warning) instead of being silently swallowed.

🔧 Refactor & quality

  • PumpStatus DTO (models.py): a single typed parse of the pump JSON.
  • SolarRegulator + SolarControllerConfig (solar.py): pure, testable proportional controller extracted from the coordinator (SRP).
  • number/sensor migrated to NumberEntityDescription / SensorEntityDescription (DRY).
  • GRID_POWER_STALENESS_SECONDS constant; IP/hostname validation in the config flow.
  • Removed utils.py; coordinator typed DataUpdateCoordinator[PumpStatus].

🛠️ Tooling & project

  • Migrated to uv + ruff: pyproject.toml (PEP 621) replaces Pipfile; ruff (lint + format) replaces black + isort; pytest config in pyproject; uv.lock committed. (Dev/CI tooling only — no impact on the Home Assistant runtime.)
  • GitHub Actions CI: ruff check + ruff format --check + pytest (via uv), in addition to hassfest and 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.
  • Pipfile removed in favor of pyproject.toml.

Full changelog: CHANGELOG.md

v2.0.0

Choose a tag to compare

@0jety0 0jety0 released this 17 Apr 15:32

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
  • ConfigEntryNotReady on boot if pump offline (auto-retry)

Breaking changes

  • injection_threshold / consumption_thresholdsetpoint, 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

Choose a tag to compare

@0jety0 0jety0 released this 14 Apr 12:51

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 to 0. 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.