Skip to main content

ADA RS-232

An asyncio library for the Audio Design Associates PTM-1645 PAC amplifier controller. The protocol implementation is independent of Home Assistant and uses serialx for local serial ports, ESPHome serial proxies, and network serial connections.

The PTM-1645 protocol and hardware connection were tested by the maintainer using an ESPHome RS-232 proxy. The standalone packaging and typed exceptions are being prepared for Home Assistant Core.

Usage

import asyncio

from ada_rs232 import AdaClient


async def main() -> None:
    client = AdaClient("/dev/serial/by-id/your-adapter", address=1)
    try:
        print(await client.async_get_state())
        print(await client.async_set_zone(1, True))
    finally:
        await client.async_close()


asyncio.run(main())

Addresses are 1–9; zone numbers are 1–8. The returned tuple contains eight booleans in zone order. Serial settings are fixed at 19200 baud, 8N1, with no flow control. Use the amplifier's default one-to-one trigger mapping.

subscribe(callback) registers a synchronous listener and returns an unsubscribe function. The listener receives the actual zone tuple, or None when the connection fails. A failed transaction raises AdaConnectionError; the next request reconnects and reads state before any write. Invalid arguments raise ValueError. Connection URLs are never included in library error messages.

All read/modify/write/readback operations share one lock. A set command can be silent, so it is followed by an explicit query. A voltage trigger or bypass can override data control; returned hardware state is authoritative. The protocol does not report the origin of a trigger and has no transaction IDs. External changes between read and write cannot be made atomic. One amplifier is supported per client connection; do not create multiple clients for the same port.

Development

uv sync
uv run ruff check .
uv run ruff format --check .
uv run mypy
uv run pytest --cov=ada_rs232 --cov-report=term-missing
uv build

Source and wheel distributions are built from the release tag in GitHub Actions. Publishing uses PyPI Trusted Publishing, without a stored API token.

Metadata

Release files for ada-rs232 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for ada-rs232 0.1.0
File Size Uploaded Provenance Actions
ada_rs232-0.1.0.tar.gz 46.5 kB With provenance Details for ada_rs232-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for ada-rs232 0.1.0
File Interpreter ABI Platform Actions
ada_rs232-0.1.0-py3-none-any.whl Python 3 none any Details for ada_rs232-0.1.0-py3-none-any.whl

Total release size: 53.4 kB

Release files / ada_rs232-0.1.0.tar.gz

Download URL ada_rs232-0.1.0.tar.gz
Size 46.5 kB
Tags Source
SHA-256 checksum
How to use checksums
d6af2d13bc6ed1055ba95f33c3a78457161d5f03d0c52743f5f8437333641dfb
BLAKE2b-256 checksum
How to use checksums
d491cce1bd5879ee998ff88684f35587b283cca5a962ec7c0c58209308aee03f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 13, 2026.

Transparency log

Release files / ada_rs232-0.1.0-py3-none-any.whl

Download URL ada_rs232-0.1.0-py3-none-any.whl
Size 6.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
545efcc49acfb4b2aae0be28fa86c8ca18b51bb02bbb087b9d21870c5fbb97ef
BLAKE2b-256 checksum
How to use checksums
6f0927040c081197f8d07e57746cf661343ac815026016e2ee8b987cb529d4ae
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 13, 2026.

Transparency log

Security for ada-rs232 0.1.0

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.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for ada_rs232-0.1.0.tar.gz

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 Nov 13, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page