Skip to main content

mcintosh-serial

PyPI CI Coverage License: MIT

Async Python library for controlling McIntosh receivers, preamps and amplifiers over their RS232 port. It is the protocol layer behind ha-mcintosh-serial, a Home Assistant integration, but has no Home Assistant dependency.

This project is independent. It is not affiliated with or endorsed by McIntosh Laboratory.

Status: early. Only the zoned command style is implemented, and it has been verified on one unit, a McIntosh MX119. Other models are listed below as planned, not supported.

Usage

import asyncio

from mcintosh_serial import ZonedClient, open_serial


async def main() -> None:
    client = ZonedClient(await open_serial("/dev/ttyUSB0", 9600))
    await client.start()  # enables RS232 control if needed and loads full state
    print(client.state.zone(1))

    await client.set_volume(1, 12)
    await client.select_input(1, 4)
    await client.set_mute(1, muted=True)

    client.add_listener(print)  # changes made on the unit are pushed to you
    await asyncio.sleep(60)
    await client.stop()


asyncio.run(main())

open_serial takes a device path or a URL and opens it with serialx, the serial driver Home Assistant uses. That covers socket://host:port and rfc2217://host:port for network serial servers and, inside Home Assistant, esphome-hass:// URLs for the serial ports of ESPHome devices such as the Home Assistant Connect AUX-2. The baud rate is passed along where the link supports it (device paths and ESPHome serial proxies); a socket:// server has its own fixed baud rate.

Outside Home Assistant you can reach an ESPHome device's serial proxy directly with pip install "mcintosh-serial[esphome]" and a URL such as esphome://192.168.1.42:6053/?port_name=RS-232%20Port%201&key=....

Volume is the unit's own step number; input numbers are the unit's own too (on an MX119, 0 Tuner, 1 PH/AUX, 2 CD 2, 3 SAT, 4 TV, 5 DVD, 6 VCR 1, 7 Tape 1, unless relabeled in its menu).

The client sends one command at a time and waits for the unit to finish talking before the next, because the unit drops commands that arrive while it is still replying. Commands raise McIntoshTimeoutError, McIntoshCommandError (the unit answered (ERR n)) or McIntoshConnectionError.

Testing code that uses the library

mcintosh_serial.testing.FakeMX119 is an in-process emulation of the unit, built from captured traffic. It implements the transport interface, so you can hand it straight to ZonedClient.

Command styles

McIntosh has used three different serial command styles. They are not interchangeable.

Style Looks like Models Status
zoned (PON Z1), (VST Z1 8), (CTL 1) MX119 (verified); C47, C2500, MA5200 per McIntosh's application note implemented, MX119 only
simple (PWR 1), (VOL 65), (STA 1) MA352, MA5300 planned, untested
bang !POWER?, !VOL(n), !SRC(n) MX160, MX170, MX180 planned, untested

What was observed on a real MX119 (wiring, baud rate, timing, quirks) is in docs/protocols/zoned.md. If you have a McIntosh unit and can help test or have protocol documents, please open an issue.

Development

uv sync
uv run ruff check . && uv run ruff format --check .
uv run pyright
uv run pytest            # 100% branch coverage is required

tests/acceptance/ runs against the built wheel in CI. See AGENTS.md for the project rules.

Credits

Protocol knowledge comes from McIntosh's RS-232 application note and from reading node-mcintosh, hass-mcintosh, mcintosh-ma352-hass and esphome-mcintosh-ma5300. No code was copied from them.

Licence

MIT. See LICENSE.

Metadata

Release files for mcintosh-serial 0.2.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 mcintosh-serial 0.2.0
File Size Uploaded Provenance Actions
mcintosh_serial-0.2.0.tar.gz 16.3 kB With provenance Details for mcintosh_serial-0.2.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for mcintosh-serial 0.2.0
File Interpreter ABI Platform Actions
mcintosh_serial-0.2.0-py3-none-any.whl Python 3 none any Details for mcintosh_serial-0.2.0-py3-none-any.whl

Total release size: 30.9 kB

Release files / mcintosh_serial-0.2.0.tar.gz

Download URL mcintosh_serial-0.2.0.tar.gz
Size 16.3 kB
Tags Source
SHA-256 checksum
How to use checksums
7b4242543a178f61a901d2e166295d843a8df1995a22fae8ddf68462f2e41dfa
BLAKE2b-256 checksum
How to use checksums
804eeaec61332b9b295c4b7800a6593a0ca5ec76f762c42233331c878428c965
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 17, 2026.

Transparency log

Release files / mcintosh_serial-0.2.0-py3-none-any.whl

Download URL mcintosh_serial-0.2.0-py3-none-any.whl
Size 14.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
749e796aad59b954a5d97737e096740b72f290f79abce94adef127d6bf53be31
BLAKE2b-256 checksum
How to use checksums
dbf77e91e6bb52b8b92b1988a8e371bcc869c7b824069052c9d21fad47aeedb8
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 17, 2026.

Transparency log

Security for mcintosh-serial 0.2.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 mcintosh_serial-0.2.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 17, 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