Python library to control Lyngdorf A/V processors and integrated amplifiers over TCP/IP (port 84).
- 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-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)
pip install lyngdorfgit clone https://github.com/fishloa/lyngdorf.git
cd lyngdorf
poetry installimport 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())receiver.power_on(True) # Turn on
receiver.power_on(False) # Turn off
print(receiver.power_on) # Check power statereceiver.volume = -25.0 # Set volume in dB
receiver.volume_up() # Increase volume
receiver.volume_down() # Decrease volume
receiver.mute_enabled = True # Mute# List available sources
print(receiver.sources)
# Select source by name
receiver.source = "HDMI 1"
# Or by index
receiver.change_source(1)# 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"# 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 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)# 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)- 3 HDMI inputs
- 12-channel decoding
- 16 balanced audio outputs
- 8 HDMI inputs
- 3 HDMI outputs (including HDBT)
- 11.1 setup + 4 auxiliary channels
- Optional 16-channel AES module support
- 8 HDMI inputs
- 3 HDMI outputs (including HDBT)
- 16-channel decoding
- Optional 16-channel AES module support
- 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
poetry installpoetry run pytest -vpoetry run black lyngdorf/ tests/ # Format code
poetry run ruff check lyngdorf/ tests/ # Lint
poetry run mypy lyngdorf/ # Type checkThis library is designed for use with Home Assistant. See the Home Assistant Lyngdorf integration for setup instructions.
All models communicate via TCP/IP on port 84 using ASCII commands:
- Commands start with
!and end with\r - Format:
!COMMAND(parameter)\ror!COMMAND?\rfor queries - Responses start with
!for status messages
Protocol details available in the /spec folder.
MIT License - see LICENSE file for details.
Contributions welcome! Please:
- Run tests:
poetry run pytest - Format code:
poetry run black . - Check types:
poetry run mypy lyngdorf/ - Ensure all CI checks pass
- Issues: GitHub Issues
- Discussions: GitHub Discussions