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 pyserial URL such as socket://host:port for a network serial server. 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.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 mcintosh-serial 0.1.0
File Size Uploaded Provenance Actions
mcintosh_serial-0.1.0.tar.gz 15.8 kB With provenance Details for mcintosh_serial-0.1.0.tar.gz

Built distribution (wheel)

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

Total release size: 30.1 kB

Release files / mcintosh_serial-0.1.0.tar.gz

Download URL mcintosh_serial-0.1.0.tar.gz
Size 15.8 kB
Tags Source
SHA-256 checksum
How to use checksums
08169c442c7f2f474205404e969a26e8ae709a02060058b5642340a08c8531bb
BLAKE2b-256 checksum
How to use checksums
40aaa6db3c46071fd4ce98c6985c6536cb024392e0f9983cddc222a914d60b8c
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.1.0-py3-none-any.whl

Download URL mcintosh_serial-0.1.0-py3-none-any.whl
Size 14.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c3fab389b6458b78e647f73594eaece21bb31e38bab0bdf584bcdd229369cbd4
BLAKE2b-256 checksum
How to use checksums
32db0337400308ffff8203c15012f4c2e3fe214bfe566ccbb8738c858f02ccf4
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.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 mcintosh_serial-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 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