Skip to main content

Async Python client for madVR Envy IP Control.

Project description

madVR Envy Python Library

Spec-first async Python client for madVR Envy IP Control.

This project intentionally does not inherit implementation patterns from existing community libraries. It is being built from the official Envy IP Control specification and protocol captures.

Current API Shape

  • Typed command helpers in madvr_envy.commands
  • High-level async client in madvr_envy.client.MadvrEnvyClient
  • Typed protocol parser in madvr_envy.protocol

Example:

import asyncio

from madvr_envy.client import MadvrEnvyClient


async def main() -> None:
    client = MadvrEnvyClient(host="192.168.1.100")
    await client.start()
    await client.wait_synced(timeout=10)

    await client.get_mac_address(wait_for_ack=True)
    await client.display_message(3, "Hello from py-madvr-envy")
    await client.change_option("temporary\\hdrNits", 120)

    groups = await client.enum_profile_groups_collect()
    for group in groups:
        print(group.group_id, group.name)

    await client.stop()


asyncio.run(main())

Protocol Basis

  • Source: https://madvrenvy.com/wp-content/uploads/EnvyIpControl.pdf
  • Document title: madVR Envy IP Control revision 1.1.3
  • Retrieved: 2026-02-27
  • HTTP metadata observed during retrieval: Last-Modified: Mon, 20 May 2024 02:40:13 GMT

Development

uv sync --group dev
uv run ruff check .
uv run ruff format --check .
uv run ty check madvr_envy
uv run pytest -v

Protocol Coverage

See docs/PROTOCOL_COVERAGE.md for implemented command and notification coverage.

Enumeration Collectors

For stream enumerations, use typed collectors:

  • enum_profile_groups_collect()
  • enum_profiles_collect(profile_group)
  • enum_setting_pages_collect()
  • enum_config_pages_collect()
  • enum_options_collect(page_or_path)

These helpers wait for protocol end markers and raise EnumerationTimeoutError if an end marker is not observed in time.

HA Adapter

Use madvr_envy.adapter.EnvyStateAdapter to convert mutable runtime state into immutable snapshots plus typed deltas/events:

  • snapshot: stable full-state view for coordinator data
  • deltas: field-level changes since previous snapshot
  • events: integration-friendly event stream (temporary resets, display changes, settings store/restore, etc.)

You can wire this directly through the client:

from madvr_envy.adapter import EnvyStateAdapter

adapter = EnvyStateAdapter()

def on_update(snapshot, deltas, events):
    ...

handle = client.register_adapter_callback(adapter, on_update)
# later: client.deregister_adapter_callback(handle)

For Home Assistant coordinator/event-bus integration, use madvr_envy.ha_bridge:

  • coordinator_payload(snapshot)
  • to_ha_events(events)
  • build_bridge_update(snapshot, deltas, events)

Reference coordinator wiring: docs/ha_coordinator_example.py.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

madvr_envy-0.2.0.tar.gz (37.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

madvr_envy-0.2.0-py3-none-any.whl (22.6 kB view details)

Uploaded Python 3

File details

Details for the file madvr_envy-0.2.0.tar.gz.

File metadata

  • Download URL: madvr_envy-0.2.0.tar.gz
  • Upload date:
  • Size: 37.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for madvr_envy-0.2.0.tar.gz
Algorithm Hash digest
SHA256 7b4321cc4f02cfe55002e9ebfb7287d79d9205439a7b93d52ed3da228cf61f19
MD5 09a6ce1407c06d3bc6bec2f918726804
BLAKE2b-256 c5ef5397efb34bc4f80bdceb07725e697a1ec93cfb0dbe335af5477c1df213d0

See more details on using hashes here.

Provenance

The following attestation bundles were made for madvr_envy-0.2.0.tar.gz:

Publisher: publish.yml on binarylogic/py-madvr-envy

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file madvr_envy-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: madvr_envy-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 22.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for madvr_envy-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 7aec77a347e712a4ec66073bb7eac5ba55d0b13a89cdb124d47b3ddb3349cc95
MD5 67b43e0a027663de8ee04c458a13d2be
BLAKE2b-256 bb3249740ac8ce483af0fca76e6ea7046000074ff1f4560328ef52eb60ff6835

See more details on using hashes here.

Provenance

The following attestation bundles were made for madvr_envy-0.2.0-py3-none-any.whl:

Publisher: publish.yml on binarylogic/py-madvr-envy

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page