Skip to main content

Lyngdorf Audio Control Library

Python library to control Lyngdorf A/V processors and integrated amplifiers over TCP/IP (port 84).

Tests Python 3.11+ Code style: black

Supported Models

MP Series (Multichannel Processors)

  • MP-40 - Entry-level processor (3 HDMI inputs, 12-channel decoding)
  • MP-50 - Mid-level processor (8 HDMI inputs, 11.1 + 4 aux)
  • MP-60 - Flagship processor (8 HDMI inputs, 16-channel decoding)

TDAI Series (Integrated Amplifiers)

  • TDAI-1120 - Entry-level integrated amplifier
  • TDAI-2170 - Older integrated amplifier model
  • TDAI-3400 - Top-of-line networked integrated amplifier

All models support:

  • Power control
  • Volume/mute control
  • Source selection
  • RoomPerfect™ room correction
  • Voicing selection
  • Trim controls (bass, treble, center, height, LFE, surround)
  • Zone B control (MP series)

Installation

From PyPI

pip install lyngdorf

From Source

git clone https://github.com/fishloa/lyngdorf.git
cd lyngdorf
poetry install

Quick Start

import asyncio
from lyngdorf import async_create_receiver, LyngdorfModel

async def main():
    # Auto-detect model (recommended)
    receiver = await async_create_receiver("192.168.1.100")

    # Or specify model explicitly
    receiver = await async_create_receiver("192.168.1.100", LyngdorfModel.MP_60)

    # Connect to the receiver
    await receiver.async_connect()

    # Control the receiver
    receiver.power_on(True)
    print(f"Volume: {receiver.volume} dB")
    receiver.volume = -22.5
    receiver.mute_enabled = False

    # Change source
    receiver.source = "HDMI 1"

    # RoomPerfect control
    receiver.room_perfect_position = "Focus 1"

    # Disconnect when done
    await receiver.async_disconnect()

asyncio.run(main())

Usage Examples

Power Control

receiver.power_on(True)   # Turn on
receiver.power_on(False)  # Turn off
print(receiver.power_on)  # Check power state

Volume Control

receiver.volume = -25.0   # Set volume in dB
receiver.volume_up()      # Increase volume
receiver.volume_down()    # Decrease volume
receiver.mute_enabled = True  # Mute

Source Selection

# List available sources
print(receiver.sources)

# Select source by name
receiver.source = "HDMI 1"

# Or by index
receiver.change_source(1)

RoomPerfect™ & Voicing

# List available positions
print(receiver.room_perfect_positions)

# Select position
receiver.room_perfect_position = "Focus 1"
receiver.room_perfect_position = "Global"
receiver.room_perfect_position = "Bypass"

# List available voicings
print(receiver.voicings)

# Select voicing
receiver.voicing = "Neutral"

Trim Controls (MP Series)

# Adjust trim levels (in dB)
receiver.trim_bass(1.5)      # +1.5 dB
receiver.trim_treble(-0.5)   # -0.5 dB
receiver.trim_centre(0.0)    # Reset to 0 dB
receiver.trim_height(2.0)
receiver.trim_lfe(-1.0)
receiver.trim_surround(0.5)

# Or use increment/decrement
receiver.trim_bass_up()
receiver.trim_bass_down()

Zone B Control (MP Series)

# Zone B power
receiver.zone_b_power_on(True)

# Zone B volume
receiver.zone_b_volume = -30.0
receiver.zone_b_volume_up()
receiver.zone_b_volume_down()

# Zone B source
receiver.change_zone_b_source(2)

Callbacks & Events

# Register for volume changes
def on_volume_change(param1, param2):
    print(f"Volume changed: {param1}")

receiver._api.register_callback("VOL", on_volume_change)

# Register for any change notification
def on_any_change():
    print("Receiver state changed")

receiver._api.register_notification_callback(on_any_change)

Model-Specific Features

MP-40

  • 3 HDMI inputs
  • 12-channel decoding
  • 16 balanced audio outputs

MP-50

  • 8 HDMI inputs
  • 3 HDMI outputs (including HDBT)
  • 11.1 setup + 4 auxiliary channels
  • Optional 16-channel AES module support

MP-60

  • 8 HDMI inputs
  • 3 HDMI outputs (including HDBT)
  • 16-channel decoding
  • Optional 16-channel AES module support

TDAI-3400

  • I-prefixed command protocol
  • Dual speaker setup switching
  • Headphone output controls
  • Network connectivity (Ethernet + Wi-Fi)
  • Media playback (Spotify, TIDAL, Roon, etc.)
  • 3-band equalizer + balance control

Development

Setup

poetry install

Run Tests

poetry run pytest -v

Code Quality

poetry run black lyngdorf/ tests/      # Format code
poetry run ruff check lyngdorf/ tests/  # Lint
poetry run mypy lyngdorf/               # Type check

Home Assistant Integration

This library is designed for use with Home Assistant. See the Home Assistant Lyngdorf integration for setup instructions.

Protocol Documentation

All models communicate via TCP/IP on port 84 using ASCII commands:

  • Commands start with ! and end with \r
  • Format: !COMMAND(parameter)\r or !COMMAND?\r for queries
  • Responses start with ! for status messages

Protocol details available in the /spec folder.

License

MIT License - see LICENSE file for details.

Contributing

Contributions welcome! Please:

  1. Run tests: poetry run pytest
  2. Format code: poetry run black .
  3. Check types: poetry run mypy lyngdorf/
  4. Ensure all CI checks pass

Support

Download files

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

Source Distribution

lyngdorf-1.4.3.tar.gz (28.4 kB view details)

Uploaded Source

Built Distribution

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

lyngdorf-1.4.3-py3-none-any.whl (33.6 kB view details)

Uploaded Python 3

File details

Details for the file lyngdorf-1.4.3.tar.gz.

File metadata

  • Download URL: lyngdorf-1.4.3.tar.gz
  • Upload date:
  • Size: 28.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.4.1 CPython/3.12.3 Linux/6.17.0-1020-azure

File hashes

Hashes for lyngdorf-1.4.3.tar.gz
Algorithm Hash digest
SHA256 eeaf1cfe440e1270d4c71888104c16d1cc657bc092f698b603c9ddfb6a0ada84
MD5 3ebcd810dbe306f8074660efc64d89b8
BLAKE2b-256 a1189362547b9508d1a09dbbf27f026586c2b084f67d8be9ef600ffc746a8fa8

See more details on using hashes here.

File details

Details for the file lyngdorf-1.4.3-py3-none-any.whl.

File metadata

  • Download URL: lyngdorf-1.4.3-py3-none-any.whl
  • Upload date:
  • Size: 33.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.4.1 CPython/3.12.3 Linux/6.17.0-1020-azure

File hashes

Hashes for lyngdorf-1.4.3-py3-none-any.whl
Algorithm Hash digest
SHA256 6f77669377d2fc070b3ba70fe28bbd739bfbf233bfd7c53b9931086fccc0d011
MD5 87b897d791398b3059ab052b57e8606e
BLAKE2b-256 4eb3cd2ecc9bbd6023836ded9d594dac6ea52b84b460d1ac1fb5edbe4a5079bf

See more details on using hashes here.

Release history Release notifications | RSS feed

1.10.0

2 files

1.9.0

2 files

1.8.0

2 files

1.7.0

2 files

1.6.0

2 files

1.5.0

2 files

1.4.9

2 files

1.4.8

2 files

1.4.7

2 files

1.4.6

2 files

1.4.5

2 files

1.4.4

2 files

This release

1.4.3 This release

2 files

1.4.2

2 files

1.4.1

2 files

1.4.0

2 files

1.3.3

2 files

1.3.2

2 files

1.3.1

2 files

1.3.0

2 files

1.2.2

2 files

1.2.1

2 files

1.2.0

2 files

1.1.0

2 files

1.0.0

2 files

0.7.0

2 files

0.6.0

2 files

0.5.0

2 files

0.4.2

2 files

0.3.8

2 files

0.3.7

2 files

0.3.6

2 files

0.3.5

2 files

0.3.4

2 files

0.3.3

2 files

0.3.2

2 files

0.3.1

2 files

0.3.0

2 files

0.2.19

2 files

0.2.18

2 files

0.2.17

2 files

0.2.16

2 files

0.2.15

2 files

0.2.14

2 files

0.2.13

2 files

0.2.12

2 files

0.2.11

2 files

0.2.10

2 files

0.2.9

2 files

0.2.8

2 files

0.2.7

2 files

0.2.6

2 files

0.2.5

2 files

0.2.4

2 files

0.2.3

2 files

0.2.2

2 files

0.2.0

2 files

0.1.1

2 files

0.1.0

2 files

Supported by

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