Skip to main content
aiomusiccast

Asyncio library for Yamaha MusicCast devices

PyPI Version CI Python Versions License


aiomusiccast-co is a maintained fork of aiomusiccast, the library behind Home Assistant's Yamaha MusicCast integration. Upstream is no longer actively maintained, so this fork continues from its last release (0.15.0) under a new name.

What's new compared to aiomusiccast 0.15.0

  • Actual volume: read and set the zone volume in dB, matching the receiver's display.
  • Zone scenes: list a zone's scenes and recall them.
  • Surround AI: on/off control for receivers that support it.
  • Speaker pattern and device category support.
  • Fixes for devices that omit the zone, input or sound program lists.
  • A longer HTTP timeout (8s), and the package now ships py.typed.

See the changelog for details.

Setup

Requirements

  • Python 3.11+

Installation

$ pip install aiomusiccast-co

or add it to your uv project:

$ uv add aiomusiccast-co

The distribution is aiomusiccast-co; the import name is aiomusiccast_co. It installs alongside upstream aiomusiccast without conflict.

Usage

import asyncio

from aiohttp import ClientSession

from aiomusiccast_co import MusicCastDevice


async def main() -> None:
    async with ClientSession() as session:
        device = MusicCastDevice("192.168.1.50", session)
        await device.fetch()

        print(device.data.model_name, device.data.network_name)
        for zone_id, zone in device.data.zones.items():
            print(zone_id, zone.power, zone.current_volume)

        await device.set_volume_level("main", 0.3)


asyncio.run(main())

To get push updates instead of polling, register a callback with device.register_callback(...) and call await device.device.enable_polling(), which starts the UDP event listener.

Migrating from aiomusiccast

Install aiomusiccast-co in place of aiomusiccast and change the imports:

# before
from aiomusiccast import MusicCastDevice
# after
from aiomusiccast_co import MusicCastDevice

The API is otherwise the same as upstream 0.15.0, with the additions above.

Contributing

See CONTRIBUTING.md.

Credits

Originally written by Tom Schneider (@vigonotion) and contributors; pyamaha.py is based on rsc-dev/pyamaha. Released under the MIT License.

Metadata

Release files for aiomusiccast-co 0.17.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for aiomusiccast-co 0.17.1
File Size Uploaded Provenance Actions
aiomusiccast_co-0.17.1.tar.gz 153.4 kB With provenance Details for aiomusiccast_co-0.17.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for aiomusiccast-co 0.17.1
File Interpreter ABI Platform Actions
aiomusiccast_co-0.17.1-py3-none-any.whl Python 3 none any Details for aiomusiccast_co-0.17.1-py3-none-any.whl

Total release size: 198.6 kB

Release files / aiomusiccast_co-0.17.1.tar.gz

Download URL aiomusiccast_co-0.17.1.tar.gz
Size 153.4 kB
Tags Source
SHA-256 checksum
How to use checksums
99eca5978f3aff96e7099fcb840cf471ebbbe43fe5638b644713b38c6b613dc7
BLAKE2b-256 checksum
How to use checksums
35cc550519cd2f66421db0bd96585f32c6170d866d02da06ace051359b990ab4
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 12, 2026.

Transparency log

Release files / aiomusiccast_co-0.17.1-py3-none-any.whl

Download URL aiomusiccast_co-0.17.1-py3-none-any.whl
Size 45.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
dbceab89575d6908b7221e864c1255e5311a63f23a4ca8515d2156f090255d7d
BLAKE2b-256 checksum
How to use checksums
5316f1be11747fd0966a9d780c405d384220567c4a0934102ae781d0bcb50955
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 12, 2026.

Transparency log

Security for aiomusiccast-co 0.17.1

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 aiomusiccast_co-0.17.1.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 12, 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