Metadata-Version: 2.4
Name: pydbxdriverack
Version: 0.1.0
Summary: Python library for connecting and managing DBX DriveRack devices
Project-URL: Homepage, https://github.com/matteogheza/pydbxdriverack
Project-URL: Documentation, https://github.com/matteogheza/pydbxdriverack?tab=readme-ov-file#usage
Project-URL: Repository, https://github.com/matteogheza/pydbxdriverack.git
Project-URL: Issues, https://github.com/matteogheza/pydbxdriverack/issues
Author-email: Matteo Gheza <me@matteogheza.it>
License-Expression: GPL-3.0-only
Keywords: audio,connection,dbx,device,driverack,dsp
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Other Audience
Classifier: Intended Audience :: System Administrators
Classifier: Natural Language :: English
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
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: Programming Language :: Python :: 3.15
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Topic :: System :: Hardware :: Hardware Drivers
Requires-Python: >=3.9
Description-Content-Type: text/markdown

# pydbxdriverack

Python library for discovering, connecting to, and controlling dbx DriveRack PA2 devices.

## Features

- Discover PA2 devices on the local network (UDP broadcast)
- Connect and authenticate over TCP
- Read device info (name, class, firmware)
- Recall presets and list preset names
- Control output mutes
- Read meter and limiter data
- Monitor AFS (Advanced Feedback Suppression) state

## 🤖 AI Assistance Disclosure

Parts of this project were developed with the assistance of Artificial Intelligence. AI tools were utilized as an accelerator to:
* Co-author and refine segments of the core library code.
* Help parse and structure raw data payloads during the reverse-engineering of the original hardware protocol.
* Transform early functional prototypes into a structured, production-ready package architecture.
* Generate test suites (`pytest`) and draft structural documentation.

While AI assisted in speeding up the development workflow, all architectural decisions, hardware testing, protocol verification, and final code reviews were executed entirely by the author to ensure reliability and accuracy.

---

## Installation

Install from source:

```bash
pip install .
```

For development dependencies:

```bash
pip install -e .
pip install pytest pytest-cov pytest-asyncio black ruff mypy pre-commit
```

## Quick Start

```python
import asyncio

from pydbxdriverack.connection import PA2Connection
from pydbxdriverack.device import PA2Device
from pydbxdriverack.discovery import async_discover_devices


async def main() -> None:
	devices = await async_discover_devices(timeout=3)
	if not devices:
		print("No DriveRack PA2 found")
		return

	host = devices[0]
	conn = PA2Connection(host, password="administrator")
	await conn.connect()

	try:
		pa2 = PA2Device(conn)
		await pa2.async_update_info()

		print("Connected to:", pa2.device_name)
		print("Firmware:", pa2.software_version)

		# Example: unmute all outputs
		await pa2.async_unmute_all()
	finally:
		await conn.disconnect()


if __name__ == "__main__":
	asyncio.run(main())
```

## Running Tests

```bash
pytest
```

## Project Layout

- `src/pydbxdriverack/connection.py`: TCP connection and protocol request handling
- `src/pydbxdriverack/device.py`: High-level device API
- `src/pydbxdriverack/discovery.py`: UDP discovery
- `src/pydbxdriverack/const.py`: Protocol constants and paths

## License

GPL-3.0-only
