Skip to main content

tonewinner-rs232

PyPI Version GitHub Actions Workflow Status

Async Python library to control Tonewinner AV processors over RS232 serial, built on serialx.

Supports the AT-500 specifically, other models should work but haven't been tested. Please open an issue if you encounter problems with other models.

Installation

pip install tonewinner-rs232

Requires Python 3.12+.

Quick start

import asyncio
from tonewinner_rs232 import TonewinnerReceiver


async def main():
    receiver = TonewinnerReceiver("/dev/ttyUSB0")

    # Establish a connection
    await receiver.connect()

    # Query the receiver's current state
    await receiver.query_state()

    print(f"Power: {receiver.state.power}")
    print(f"Volume: {receiver.state.volume}")
    print(f"Source: {receiver.state.source_name}")

    await receiver.power_off()
    await receiver.disconnect()


asyncio.run(main())

Probing a receiver

probe() checks that a receiver answers and reads its identity. The Home Assistant Tonewinner integration calls it during setup.

info = await receiver.probe()
print(info.model if info else "model unknown")

A receiver in standby answers power polls and ignores every other query, so probe() polls power first. If the receiver reports standby, probe() powers it on to read the model and powers it off again when it is done. A receiver that already reports power as on is read directly and never woken.

probe() raises ConnectionError when the power poll goes unanswered, since that means the connection is unusable. It returns None when the receiver answers but reports no readable identity, such as when it is still booting after the wake.

query_state() uses the same behavior. It skips the queries a standby receiver would ignore instead of waiting on the timeouts, so querying a device in standby returns its power state rather than failing.

Features

  • Async API built on serialx
  • Full state query and real-time state updates
  • Event subscription for state changes
  • Power, volume, mute, input source, and sound mode control
  • probe() for reading a receiver's identity, waking it from standby if needed
  • Automatic framing of the ##...* Tonewinner RS232 protocol
  • Built-in CLI for testing

CLI

Just prints current state at the moment.

python -m tonewinner_rs232 /dev/ttyUSB0

Metadata

Release files for tonewinner-rs232 1.3.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 tonewinner-rs232 1.3.0
File Size Uploaded Provenance Actions
tonewinner_rs232-1.3.0.tar.gz 14.6 kB With provenance Details for tonewinner_rs232-1.3.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for tonewinner-rs232 1.3.0
File Interpreter ABI Platform Actions
tonewinner_rs232-1.3.0-py3-none-any.whl Python 3 none any Details for tonewinner_rs232-1.3.0-py3-none-any.whl

Total release size: 28.7 kB

Release files / tonewinner_rs232-1.3.0.tar.gz

Download URL tonewinner_rs232-1.3.0.tar.gz
Size 14.6 kB
Tags Source
SHA-256 checksum
How to use checksums
de2920a04f47ef5c0d16b0267b78d372ab5607d67bbdd3011e7b4d275ed360e9
BLAKE2b-256 checksum
How to use checksums
148deecbde90ba1a6988db176b7dcca86a91d4c33d683d3d9976eacdfc32cfd0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Oct 18, 2026.

Transparency log

Release files / tonewinner_rs232-1.3.0-py3-none-any.whl

Download URL tonewinner_rs232-1.3.0-py3-none-any.whl
Size 14.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
0727da64f997053669121208ed430d341389806e928ec8b99bac8581ab6f94ae
BLAKE2b-256 checksum
How to use checksums
2cc48455f66d0e51b122123d297eb2519d0d2b49da0c6ded30f02aeef8c34b03
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Oct 18, 2026.

Transparency log

Security for tonewinner-rs232 1.3.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 tonewinner_rs232-1.3.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 Oct 18, 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