aioaquarite
Async Python client for the Hayward Aquarite pool API.
This library provides a standalone API client for interacting with Hayward Aquarite pool equipment via the Hayward cloud service. It is designed to be used as the backend for the Home Assistant Aquarite integration.
Installation
pip install aioaquarite
Usage
import aiohttp
from aioaquarite import AquariteAuth, AquariteClient
async with aiohttp.ClientSession() as session:
auth = AquariteAuth(session, "user@example.com", "password")
await auth.authenticate()
# Stable Firebase UID (`sub` claim of the id token); useful as a
# config-entry unique_id. Returns None before authenticate() succeeds.
print("Firebase UID:", auth.user_id)
client = AquariteClient(auth)
pools = await client.get_pools()
for pool_id, pool_name in pools.items():
data = await client.fetch_pool_data(pool_id)
temperature = AquariteClient.get_value(data, "main.temperature")
print(f"{pool_name}: {temperature}°C")
# Subscribe with built-in token refresh + reconnect (recommended).
# The callback is invoked from the Firestore background thread;
# asyncio consumers should wrap it with loop.call_soon_threadsafe.
def on_update(data):
print("Pool updated:", data.get("main", {}).get("temperature"))
subscription = await client.subscribe_pool_resilient(pool_id, on_update)
await client.set_value(pool_id, "filtration.mode", 1)
# Pull the stored sample series for a metric (~30 days, ~10-minute
# granularity). Each point is {"field": <value>, "seconds": <utc_unix>}.
# Recognised types: ph, rx, temp, cl, cd, filtration, aux1..aux4.
series = await client.get_pool_stats(pool_id, "ph", period=30)
print("pH samples:", len(series[0]))
# Cleanup
await subscription.aclose()
Low-level subscription (0.3-style)
If you want to own the connection lifecycle yourself, the raw watch handle is still available:
watch = await client.subscribe_pool(pool_id, on_update)
# ... maintain token freshness, resubscribe on errors, etc. ...
watch.unsubscribe()
License
MIT
Release files for aioaquarite 0.8.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| aioaquarite-0.8.0.tar.gz | 25.3 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| aioaquarite-0.8.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 43.0 kB
Release files / aioaquarite-0.8.0.tar.gz
| Download URL | aioaquarite-0.8.0.tar.gz |
|---|---|
| Size | 25.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e9f33020800628f085e5e86245116c69ae3b26893f71d2fe81a01ca054d151b4
|
|
BLAKE2b-256 checksum How to use checksums |
7f01b89ddd7cb44f597899db1a9a292b33013ec88fbe29aa200ab087c3e629d0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 24, 2026.
Transparency logRelease files / aioaquarite-0.8.0-py3-none-any.whl
| Download URL | aioaquarite-0.8.0-py3-none-any.whl |
|---|---|
| Size | 17.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
7a8629ec73950636d65f5dad6e82d9317d41ad3a32081087a346f3892d9cd58d
|
|
BLAKE2b-256 checksum How to use checksums |
40ad1d8e93b8aee6a46919c190ef1135fc34c29175698e548ec40f8bd12472af
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 24, 2026.
Transparency log