Skip to main content

Async Python library for Tonewinner AV processors over RS232 serial

Project description

tonewinner-rs232

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())

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
  • 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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

tonewinner_rs232-1.0.1.tar.gz (10.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

tonewinner_rs232-1.0.1-py3-none-any.whl (10.4 kB view details)

Uploaded Python 3

File details

Details for the file tonewinner_rs232-1.0.1.tar.gz.

File metadata

  • Download URL: tonewinner_rs232-1.0.1.tar.gz
  • Upload date:
  • Size: 10.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for tonewinner_rs232-1.0.1.tar.gz
Algorithm Hash digest
SHA256 821b1d0d424aff027bf2451b3a51f60b50fa34c85492c17f6bbdf02aaa7aaddd
MD5 2ce0430553e17f267686d064a286ae4d
BLAKE2b-256 c21528dc828a09661fa491c82ef6ff922cf5d591ac20a1cedf54bf033846bdf4

See more details on using hashes here.

Provenance

The following attestation bundles were made for tonewinner_rs232-1.0.1.tar.gz:

Publisher: publish.yaml on emma-sg/tonewinner-rs232

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file tonewinner_rs232-1.0.1-py3-none-any.whl.

File metadata

File hashes

Hashes for tonewinner_rs232-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 8209c4de333079c5ac9a7e880007cb750d870e95b82df706b8eca4785d8aaf82
MD5 ae1ed01d22644fd8cb2351e1ffe49372
BLAKE2b-256 5ee1a76045590d60152d963205436e2836b2ff6a4702f5b560bea53d4c1fec9b

See more details on using hashes here.

Provenance

The following attestation bundles were made for tonewinner_rs232-1.0.1-py3-none-any.whl:

Publisher: publish.yaml on emma-sg/tonewinner-rs232

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page