Metadata-Version: 2.4
Name: aiopoolside
Version: 0.1.0
Summary: Asynchronous Python client for Poolside pool controllers
Project-URL: Homepage, https://github.com/PoolsideStan/aiopoolside
Project-URL: Source Code, https://github.com/PoolsideStan/aiopoolside
Project-URL: Bug Reports, https://github.com/PoolsideStan/aiopoolside/issues
Author: Stan Reznik
License-Expression: MIT
License-File: LICENSE
Keywords: aiohttp,asyncio,home-automation,pool,poolside
Classifier: Development Status :: 4 - Beta
Classifier: Framework :: AsyncIO
Classifier: Intended Audience :: Developers
Classifier: Programming Language :: Python :: 3.14
Classifier: Topic :: Home Automation
Requires-Python: >=3.14
Requires-Dist: aiohttp>=3.12.0
Requires-Dist: cryptography>=43.0.0
Requires-Dist: noiseprotocol>=0.3.1
Description-Content-Type: text/markdown

# aiopoolside

Asynchronous Python client for Poolside pool controllers.

Speaks the controller's local protocol: an encrypted JSON-RPC transport over
websockets using the Noise Protocol Framework
(`Noise_XX_25519_ChaChaPoly_SHA256`), plus the plaintext pre-auth pairing
handshake used to enroll a new client.

## Installation

```bash
pip install aiopoolside
```

## Usage

```python
import aiohttp

from aiopoolside import (
    PoolsideClient,
    async_await_pairing_result,
    async_request_pairing,
    generate_keypair,
)


async def main() -> None:
    async with aiohttp.ClientSession() as session:
        # One-time pairing: the user approves the request on the controller.
        private_key, public_key = generate_keypair()
        ws, result = await async_request_pairing(
            session, "192.168.1.50", 8126, "My Client", public_key
        )
        approved = await async_await_pairing_result(ws)

        client = PoolsideClient(
            session=session,
            host="192.168.1.50",
            port=8126,
            client_private_key=private_key,
            controller_public_key=approved.controller_public_key,
            controller_uuid=approved.controller_uuid,
        )
        await client.async_connect()
        site, controls = await client.async_get_control_layout()
        try:
            for control in controls:
                print(control.name, control.control_type)
        finally:
            await client.async_disconnect()
```

## Development

```bash
uv sync
uv run pytest
```

## License

MIT
