mcintosh-serial
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. McIntosh has used three different serial command styles, and the library speaks all three. Only the MX119 is verified on real hardware. Other models are built from documents and other projects' reports, and are labeled
reportedoruntestedin docs/devices.md. Help turning those intoverifiedis the most useful contribution: see adding a device.
Usage
import asyncio
from mcintosh_serial import connect
async def main() -> None:
client = await connect(
"/dev/ttyUSB0", "mx119"
) # opens the port at the model's baud rate and starts
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())
connect takes a model id (mcintosh-serial models lists them) and works the same for every command style. A
model's settings (baud rate, zones, input names) are in mcintosh_serial.get_profile("mx119").
Volume is the unit's own step number, and input numbers are the unit's own too. Input names are in the model's profile, but owners can relabel inputs in a unit's menu, so treat them as defaults.
The client sends one command at a time and waits for the unit to finish talking before the next, because some units
drop commands that arrive while they are still replying. Commands raise McIntoshTimeoutError,
McIntoshCommandError (the unit rejected it) or McIntoshConnectionError.
Serial links
open_serial (used by connect) opens a device path or a URL 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=....
You can also give a Client any object with read, write and close (the Transport protocol), for example
streams from another serial library.
Testing code that uses the library
mcintosh_serial.testing has in-process emulations of units (FakeMX119, FakeMA352, FakeMX160) that implement
the transport interface, and ReplayTransport, which plays a recorded capture back. Hand any of them to a Client.
Supported models
| Command style | Looks like | Models |
|---|---|---|
| zoned | (PON Z1), (VST Z1 8), (CTL 1) |
MX119 (verified); C2500; MX120, MX132, MA5200 (untested) |
| simple | (PWR 1), (VOL 65), (STA 1) |
MA352, MA5300 (reported) |
| bang | !POWER?, !VOL(25), !SRC(3) |
MX160 (reported); MX170, MX180 (untested) |
The full table with status, baud rate and zones is docs/devices.md; it is checked against the model files by the tests. What was observed on real hardware is in docs/protocols/.
Is your model missing, or does it not work?
Two commands, no code:
mcintosh-serial detect /dev/ttyUSB0 # which command style does it speak?
mcintosh-serial capture /dev/ttyUSB0 --model mx119 # record a safe session to paste into an issue
Neither changes volume, input, mute or power, and the report hides your serial number. Then open a new device issue. Adding a model that speaks a known style is a small data file; docs/adding-a-device.md walks through it.
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 CONTRIBUTING.md and
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.3.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| mcintosh_serial-0.3.0.tar.gz | 44.8 kB | With provenance | Details for mcintosh_serial-0.3.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| mcintosh_serial-0.3.0-py3-none-any.whl | Python 3 | none | any | Details for mcintosh_serial-0.3.0-py3-none-any.whl |
Total release size: 91.0 kB
Release files / mcintosh_serial-0.3.0.tar.gz
| Download URL | mcintosh_serial-0.3.0.tar.gz |
|---|---|
| Size | 44.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
1094213f56a7408672b56ddd5a447d7151f6b77f4a605a89a4b7f24526a98cdd
|
|
BLAKE2b-256 checksum How to use checksums |
f609e8256e854bcd641467b80e3bdea6837f6ab7bba320bacdaddeeea98a8b9c
|
| 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 logRelease files / mcintosh_serial-0.3.0-py3-none-any.whl
| Download URL | mcintosh_serial-0.3.0-py3-none-any.whl |
|---|---|
| Size | 46.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
3ebd1787c919d69ac26db6a272d53f89cf776f8b62394ab54eb2ea952bed8f85
|
|
BLAKE2b-256 checksum How to use checksums |
f31eb6ccf12772e48621663533dedac9f0f026653a4acdc5a030eeec6e3174c4
|
| 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 logSecurity for mcintosh-serial 0.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.
Attestation for mcintosh_serial-0.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 Nov 17, 2026.
Transparency logA 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.