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.

Home Assistant

Home Assistant's core Yamaha MusicCast integration still uses upstream aiomusiccast, so it doesn't get these added features. Where a feature applies to Home Assistant, support for it has been added to yamaha-musiccast-co, a custom component version of the integration that can be installed through HACS.

AI transparency

Within the last year I've more heavily used AI to work on this library. I'm a code-savvy, python-literate amateur who knows enough to spot when Claude is being a complete idiot, writing some convoluted insanity, or just making bad judgment calls. I review the code committed, excluding tests, where I only guide it to keep them practical instead of exhaustive; often run against responses captured from my own receiver. I let AI write some of the more tedious fixes and the ports of upstream pull requests and other forks' changes, making sure appropriate credit is added. AI is not where I started, but I wouldn't have had the time to keep this project up without it.

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.18.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 aiomusiccast-co 0.18.0
File Size Uploaded Provenance Actions
aiomusiccast_co-0.18.0.tar.gz 198.3 kB With provenance Details for aiomusiccast_co-0.18.0.tar.gz

Built distribution (wheel)

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

Total release size: 251.7 kB

Release files / aiomusiccast_co-0.18.0.tar.gz

Download URL aiomusiccast_co-0.18.0.tar.gz
Size 198.3 kB
Tags Source
SHA-256 checksum
How to use checksums
3c52e6ba54072f709ed5b7951e835362e94e032b1fb84173370596fd38b874a8
BLAKE2b-256 checksum
How to use checksums
2f5f9e68eb256c942312a2d075264feaa98df5b49b304f1f0a49caa5b89edc26
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 14, 2026.

Transparency log

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

Download URL aiomusiccast_co-0.18.0-py3-none-any.whl
Size 53.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
53385083b4d77bfcea4ac20960775e784c2366a30f17e1753cc5edf5beed4bc9
BLAKE2b-256 checksum
How to use checksums
9af51dad74baa74446be6e8d24783939095671c6136003d70ee262cb22e47bf2
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 14, 2026.

Transparency log

Security for aiomusiccast-co 0.18.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 aiomusiccast_co-0.18.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 14, 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