Metadata-Version: 2.5
Name: blauberg-vento
Version: 1.0.4
Summary: Python API for Blauberg Vento Expert Wi-Fi fans
Project-URL: Homepage, https://github.com/BirgerKo/blauberg_vento_api
Project-URL: Repository, https://github.com/BirgerKo/blauberg_vento_api.git
Project-URL: Issues, https://github.com/BirgerKo/blauberg_vento_api/issues
Author-email: Birger Kollstrand <birger@kollstrand.no>
License: MIT
License-File: LICENSE
Keywords: blauberg,fan,home-automation,hvac,vento
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Topic :: Home Automation
Requires-Python: >=3.11
Provides-Extra: dev
Requires-Dist: httpx>=0.27; extra == 'dev'
Requires-Dist: mypy>=1.10; extra == 'dev'
Requires-Dist: pytest-asyncio>=0.23; extra == 'dev'
Requires-Dist: pytest-cov>=5.0; extra == 'dev'
Requires-Dist: pytest-playwright>=0.5; extra == 'dev'
Requires-Dist: pytest>=8.0; extra == 'dev'
Requires-Dist: ruff>=0.6; extra == 'dev'
Description-Content-Type: text/markdown

# Blauberg Vento API

A Python library for controlling Blauberg Vento Expert Wi-Fi ventilation units.

## Protocol documentation

The UDP protocol implemented by this library is based on Blauberg's openly available document **B133-4-1EN-02**, *"Connection to a 'Smart Home' system"*, for the Vento Expert (Duo) A30/50/85/100 W V.2 series.

## Features

- Control Blauberg Vento fans via UDP protocol
- Support for both synchronous and asynchronous operations
- Device discovery on local network
- Comprehensive parameter control (speed, timers, sensors, Wi-Fi, etc.)
- Full device state retrieval

## Installation

```bash
pip install blauberg-vento
```

# Usage

## Synchronous Client
from blauberg_vento import VentoClient

# Create client
```python
client = VentoClient(
    host="192.168.1.100",
    device_id="YOUR_DEVICE_ID",
    password="1111"
)

# Get device state
state = client.get_state()
print(f"Power: {'ON' if state.power else 'OFF'}")
print(f"Speed: {state.speed_name}")
print(f"Mode: {state.operation_mode_name}")

# Control device
client.turn_on()
client.set_speed(2)  # Speed 2
client.set_ventilation()  # Ventilation mode
```

## Asynchronous Client
```python
import asyncio
from blauberg_vento import AsyncVentoClient

async def main():
    async with AsyncVentoClient(
        host="192.168.1.100",
        device_id="YOUR_DEVICE_ID",
        password="1111"
    ) as client:
        state = await client.get_state()
        print(f"Power: {'ON' if state.power else 'OFF'}")
        await client.turn_on()

asyncio.run(main())
```

## Device discovery
```python
from blauberg_vento import VentoClient

# Discover devices on network
devices = VentoClient.discover()
for device in devices:
    print(f"Found device: {device.device_id} at {device.ip}")
```

# Releasing

Releases are published to [PyPI](https://pypi.org/project/blauberg-vento/) automatically via GitHub Actions (trusted publishing, no tokens stored).

## Release a new version

1. Bump `version` in `pyproject.toml`
2. Commit and push to `main`
3. Create a [GitHub Release](https://github.com/BirgerKo/blauberg_vento_api/releases) with a tag matching the version (e.g. `v1.0.1`)
4. The `Publish` workflow builds the sdist and wheel and uploads them to PyPI

To dry-run the pipeline, run the `Publish` workflow manually (Actions → Publish → Run workflow); it will upload to [TestPyPI](https://test.pypi.org/) instead.

# Documentation
See ARCHITECTURE.md for detailed architecture overview.

# License
MIT License - see LICENSE for details.
