Metadata-Version: 2.4
Name: alulapy
Version: 0.2.0
Summary: Python client library for the Alula security platform API (Cove Smart, Alula Connect+)
Author: Joshua Seidel
License: MIT
Project-URL: Homepage, https://github.com/joshuaseidel/alulapy
Project-URL: Repository, https://github.com/joshuaseidel/alulapy
Project-URL: Issues, https://github.com/joshuaseidel/alulapy/issues
Keywords: alula,cove,security,alarm,home-assistant,smart-home
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Home Automation
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: >=3.11
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: aiohttp>=3.9.0
Provides-Extra: dev
Requires-Dist: pytest>=7.0; extra == "dev"
Requires-Dist: pytest-asyncio>=0.23; extra == "dev"
Requires-Dist: pytest-aiohttp>=1.0; extra == "dev"
Requires-Dist: aioresponses>=0.7; extra == "dev"
Requires-Dist: ruff>=0.4; extra == "dev"
Requires-Dist: mypy>=1.10; extra == "dev"
Dynamic: license-file

# alulapy

Python client library for the Alula security platform API. Works with **Cove Smart**, **Alula Connect+**, and other Alula-powered alarm systems.

## Features

- **OAuth2 authentication** with automatic token refresh
- **Device info** — panel name, serial number, online status, firmware
- **Arming state** — real-time armed/disarmed/armed-stay/armed-away status
- **Zone sensors** — door, window, motion, smoke, water sensor open/closed states
- **Trouble flags** — AC failure, low battery, comm failure, tamper, and more
- **Event log** — recent arm/disarm/alarm events with filtering
- **Arm/Disarm** — via `helix.command` RPC (requires dealer to enable interactive services)

## Installation

```bash
pip install -e /path/to/alulapy
```

## Quick Start

```python
import asyncio
import aiohttp
from alulapy import AlulaClient

async def main():
    async with aiohttp.ClientSession() as session:
        client = AlulaClient(session)
        await client.async_login("your_username", "your_pin")

        devices = await client.async_get_devices()
        for device in devices:
            if device.is_panel:
                print(f"{device.name}: {device.arming_state}")
                print(f"  Online: {device.online}, Trouble: {device.any_trouble}")

        zones = await client.async_get_zones()
        for zone in zones:
            status = "OPEN" if zone.is_open else "closed"
            print(f"  Zone {zone.zone_index}: {zone.zone_name} — {status}")

asyncio.run(main())
```

## Arm/Disarm

Arm/disarm uses the `helix.command` RPC method. This requires `interactiveEnabled: true` on the device, which must be enabled by the alarm dealer (e.g., Cove support).

```python
await client.async_arm_stay(device.id)
await client.async_arm_away(device.id)
await client.async_disarm(device.id)
```

If you get "Permission Denied" (error code 6), contact your alarm provider and ask them to enable interactive services on your device.

## License

MIT
