Skip to main content

pyheos

CI Status codecov image image image

An asynchronous Python library for controlling Denon and Marantz products with HEOS® Built-in through the HEOS CLI Protocol (version 1.21 for HEOS firmware 3.40 or newer).

Installation

pip install pyheos

Getting Started

Heos class

The Heos class is the implementation providing control to all HEOS compatible devices on the local network through a single network connection. It is suggested to connect to a device that is hard-wired.

pyheos.Heos.create_and_connect(host: str, **kwargs) -> Heos

Coroutine that accepts the host and options arguments (as defined in the pyheos.HeosOptions below), creates an instance of Heos and connects, returning the instance.

pyheos.Heos(options: HeosOptions)

  • options: HeosOptions: An instance of HeosOptions that encapsulates options and configuration (see below)

pyheos.Heos.connect() -> None

Connect to the specified host. This method is a coroutine.

pyheos.Heos.disconnect() -> None

Disconnect from the specified host. This method is a coroutine.

pyheos.Heos.get_players(*, refresh)

Retrieve the available players as a dict[int, pyheos.Heos.HeosPlayer] where the key represents the player_id and the value the HeosPlayer instance. This method is a coroutine. This method will populate the players property and will begin tracking changes to the players.

  • refresh: Set to True to retrieve the latest available players from the CLI. The default is False and will return the previous loaded players.

HeosOptions class

This class encapsulates the options and configuration for connecting to a HEOS system.

pyheos.HeosOptions(host, *, timeout, heart_beat, heart_beat_interval, dispatcher, auto_reconnect, auto_reconnect_delay, auto_reconnect_max_attempts, credentials)

  • host: str: A host name or IP address of a HEOS-capable device. This parameter is required.
  • timeout: float: The timeout in seconds for opening a connection and issuing commands to the device. Default is pyheos.const.DEFAULT_TIMEOUT = 15.0. This parameter is required.
  • heart_beat: bool: Set to True to enable heart beat messages, False to disable. Used in conjunction with heart_beat_delay. The default is True.
  • heart_beat_interval: float: The interval in seconds between heart beat messages. Used in conjunction with heart_beat. Default is pyheos.const.DEFAULT_HEART_BEAT = 10.0
  • events: bool: Set to True to enable event updates, False to disable. The default is True.
  • all_progress_events: bool: Set to True to receive media progress events, False to only receive media changed events. The default is True.
  • dispatcher: pyheos.Dispatcher | None: The dispatcher instance to use for event callbacks. If not provided, an internally created instance will be used.
  • auto_failover: bool: Set to True to automatically failover to other hosts if the connection is lost. The default is False. Used in conjunction with auto_failover_hosts.
  • auto_failover_hosts: Sequence[str]: A sequence of host names or IP addresses of other hosts in the HEOS system. The default is an empty list, which will be populated automatically from the system information.
  • auto_reconnect: bool: Set to True to automatically reconnect if the connection is lost. The default is False. Used in conjunction with auto_reconnect_delay.
  • auto_reconnect_delay: float: The number of seconds to wait before attempting to reconnect upon a connection failure. The default is DEFAULT_RECONNECT_DELAY = 1.0. Used in conjunction with auto_reconnect.
  • auto_reconnect_max_attempts: float: The maximum number of reconnection attempts before giving up. Set to 0 for unlimited attempts. The default is 0 (unlimited).
  • credentials: credentials to use to automatically sign-in to the HEOS account upon successful connection. If not provided, the account will not be signed in.
Example:
import pyheos

heos = await Heos.create_and_connect('172.16.0.1', auto_reconnect=True)

players = await heos.get_players()
...
await heos.disconnect()

Release files for pyheos 1.0.6

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

Source distribution (sdist)

Source distribution for pyheos 1.0.6
File Size Uploaded
pyheos-1.0.6.tar.gz 66.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for pyheos 1.0.6
File Interpreter ABI Platform
pyheos-1.0.6-py3-none-any.whl Python 3 none any Details

Total release size:120.8 kB

Release files / pyheos-1.0.6.tar.gz

Download URL pyheos-1.0.6.tar.gz
Size 66.4 kB
Tags Source
SHA-256 checksum
How to use checksums
925d6451ffb484cb766dc3cde56f9d2b42115ecc2ce86db2f67f302b9bc9abc4
BLAKE2b-256 checksum
How to use checksums
13401acfb53f57c6c15653e3a0ceef946b8bfd7b0899ad9888dfbe6a522ac338
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

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 Oct 12, 2025.

Transparency log

Release files / pyheos-1.0.6-py3-none-any.whl

Download URL pyheos-1.0.6-py3-none-any.whl
Size 54.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
8ffc8bc426da9fc8da00731f271ca2c037d791e6157778d0a0b16447b1fedf6a
BLAKE2b-256 checksum
How to use checksums
ab1ed7da5db3b742fd98c780309921169add8c4302fff0654ab5368c37d5f2fc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

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 Oct 12, 2025.

Transparency log

Release history Release notifications | RSS feed

This release

1.0.6 This release

2 release files

1.0.5

2 release files

1.0.4

2 release files

1.0.3

2 release files

1.0.2

2 release files

1.0.1

2 release files

1.0.0

2 release files

0.9.0

2 release files

0.8.0

2 release files

0.7.4

2 release files

0.7.3

2 release files

0.7.2

2 release files

0.6.0

2 release files

0.5.2

2 release files

0.5.1

2 release files

0.5.0

2 release files

0.4.1

2 release files

0.4.0

2 release files

0.3.1

2 release files

0.3.0

2 release files

0.2.1

2 release files

0.2.0

2 release files

0.1.0

2 release files

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