Overview and History - SamInPgh/denonavpcontrol GitHub Wiki

A Lyrion Music Server plugin to control a networked Denon or Marantz AVR (Audio/Video Receiver) from any SqueezeBox Classic, Receiver, Radio or Touch, as well as from software-based players such as Squeezelite.

Introduction

This plugin will turn on and off a network connected Denon or Marantz AVR when a Lyrion player is turned on/off or a song is played. The plugin will optionally set one of the Quick Select modes or Input Sources, and synchronize the volume of the player to that of the AVR. The user can set the maximum volume level they wish the AVR to be set to when controlling the player and optionally poll the AVR at user-specified intervals for power status and volume changes. The AVR's audio settings can also be modified during playback when using client applications such as iPeng (iOS), Squeezer (Android) and Material Skin (Web/Android/iOS).

The plugin uses the Denon/Marantz telnet protocol over a wireless or wired network and therefore a network connection between the Lyrion Music Server and the AVR must be available.

The plugin has been tested with many Denon and Marantz AVR's and with players like the Squeezebox Receiver and Touch as well as software players such as Squeezelite. It should work with any Denon/Marantz AVR that supports the Denon telnet protocol over a network, and with other Squeezebox-compatible players as well. As far as client apps, the plugin has been tested with Apple iOS devices (Touch, iPhone and iPad) using iPeng, and Android devices using Squeezer and the Material Skin Android wrapper. It also works with the Squeezelite-X app under Windows and, of course, with the web-based LMS client app and the Material Skin client.

Details

The plugin supports the following features:

V 1.0

  • Turns the AVR on when the user turns on a player or plays a song
  • Puts the AVR in standby when the user turns the player off
  • Changes the volume of the AVR when the user changes the player volume
  • Adjusts the player volume to the default setting of the AVR when turned on
  • Optionally sets one of the three Denon Quick Select modes when turned on
  • The user specifies the maximum volume the AVR can be set to
  • The user can pick an optional on and/or off delay timer
  • The plugin can be enabled/disabled without restarting the server after the initial installation

V 1.1

  • The user can select between Main, Zone 2 and Zone 3
  • Optionally the plugin can sync the player volume from the AVR volume at track changes

V 1.2

  • Minor performance support when using multiple synced players

V 1.3

  • Minor performance improvements

V 1.4

  • Repo file now supports SBS 7.4

V 1.5

  • Added the ability to control the AVR audio settings using the iPeng application during playback.

V 1.6

  • Supports 100% volume setting on players with iPeng 1.2.5 and greater. Volume control has been changed to be less linear with more loudness in the lower settings.

V1.7

  • Supports .5 settings on volume adjustment to Denon AVR

V1.8

  • Enhancements to the performance of volume settings and receiver options

V 1.9

  • Fixes to the label file

V 1.9.1

  • Fixes for multi zone feature

V 1.9.2

  • Fixes for Quick Select feature when unit already on

V 2.0

  • Adds Quick Select delay when powering on AVR

V 2.1

  • Retracted.

V 2.2

  • Bug fixes.

V 2.3

  • Install fix.

V 3.0

  • Bug fixes, volume sync improvements

V 4.0

  • Quick Select support for all zones
  • Support CLI mute/unmute command, and AVR muting via pressing hardware vol up and down keys at the same time
  • New icons
  • Bug fixes
  • New app support (SqueezeCtrl and enhancements to Squeezer)

V 4.1

  • Re-send Quick Select command when pause key pressed twice within .5 seconds
  • Support volume sync on track change for all zones
  • Support Quick Select 4 & 5 for newer AVR's
  • Restore pre-mute volume before processing incremental volume changes while muted
  • Improved menu features
  • Menu choice for AVP or AVR
  • Disable AVP/AVR volume and muting functionality when not using player output level fixed at 100%
  • Allow for on-the-fly switching between fixed and variable player output level

V 4.2

  • Don't power off the AVR when player is turned off after the input source has been changed (main zone only)
  • Add channel volume slider controls to the client plugin menu for all zones
  • Add preamp volume slider to the client plugin menu for all zones when the player is in variable output mode (not fixed at 100%)
  • Reset AVR volume back to its initial value prior to dynamically switching from variable to fixed output mode
  • Fortify the initial client plugin menu population logic to allow for retrying failed calls, and only repopulate the menu when the player is power cycled or the Quick Select is re-invoked via the double pause shortcut
  • Add relative dB values to the maximum AVR volume setting in the plugin setup menu
  • Prevent a Squeezebox Touch from setting the AVP/AVR volume to 100% when switching from variable to fixed output mode due to a firmware bug

V 4.2.1

  • Bug fixes

V 4.3

  • Add the ability to invoke any defined Quick Select command from the client plugin menu.
  • Populate the client plugin menu variables immediately upon invocation of a Quick Select command.
  • Add support in the plugin menu to specify Quick Select 4 or 5 for newer AVR models.
  • Improve error handling and overall stability.

V 4.3.2

  • Change the labeling in the Quick Select audio menu to show the associated player name instead of "SB Player".
  • Delay the start of playback when powering on the AVR via a "play" command until the plugin is fully initialized and ready.
  • Bug fixes.

V 4.3.3

  • Fix a Windows-specific bug introduced in v4.3.2.

V 4.4

  • Add the ability in the Quick Select menu to save the current AVR audio settings to the Quick Select command defined for the active player.
  • Add support for a syntax change in the PSRSTR command introduced in the newer (X-series) AVR's.
  • Prevent the player from setting the absolute volume to 100% when running with volume fixed at 100% as a workaround for a bug in some implementations of the player firmware/software.

V 4.4.1

  • Extend support for the Quick Select update function to secondary zones.
  • Allow an optional TCP port to be specified in the plugin menu setting for the AVR IP address for use with older AVR's utilizing serial-to-network adapters.
  • Display an informational message when the plugin's AVR settings menu is selected while the player is turned off or not fully initialized.
  • Bug fixes.

V 4.5

  • Add full support for Marantz AVR's by supporting the Smart Select command. For now, this is done by selecting 'Marantz AVR' in the 'AVP/AVR Type' plugin menu option.
  • Add automatic AVR make/model detection via the 'SYMO' command.
  • Extend the Quick Select audio settings menu to support updating any of the Quick Select definitions and not just the one being used by the current player.
  • Display the AVR model, IP Address and Zone in the top level of the audio settings menu.
  • Updated the plugin setup menu to indicate that both Denon and Marantz AVR's are supported.

V 4.5.1

  • Refresh the Channel Level Adjustment menu entries from the AVR after each Quick Select.
  • Extend the feature added in V4.2 that prevents the AVR from being powered off when the input source has been changed to also apply to secondary zones.
  • Add a timeout counter and abort the current player function after the plugin has received ten (10) consecutive timeouts from the AVR.
  • Refresh the Channel Level Adjustment menu after each slider control update to keep the labels current.
  • Refresh the Quick Select menu after the Quick Select Update function has been performed so that the current QS is still selected.
  • Display the current Surround Mode at the top of the Channel Level Adjustment menu and only display slider controls for channels that are active for that mode.
  • Bug fixes.

V 4.6

  • Add a Source Input Select submenu to the client plugin menu to allow the current AVR zone input to be changed dynamically.
  • Reorder the client menu items and group them by functionality.
  • Power off any player that is registering with the plugin for the first time in order to avoid any confusion as to its status.
  • Bug fixes.

V 4.6.1

  • Add an AVR Power On/Off control to the Audio settings menu and allow the menu to be used even when the LMS player is turned off.
  • Make changes to support the Material Skin web app as a new menu client in collaboration with the app developer.
  • Prevent SqueezePlay-based player clients such as the SB Touch from displaying the Audio Settings menu.
  • Customize menu functionality based on client app capability. For example, don't create slider control menus (Preamp and Channel levels) for Squeeze Ctrl, which doesn't support them.
  • Smooth out volume changes by streamlining the calculations and fine-tuning the buffering of requests.
  • Restart playback from the beginning of the current song instead of the beginning of the playlist when powering on via a "Play" command.
  • Bug fixes.

V4.6.2

  • Improve the logic for powering on the AVR automatically during initialization after hitting "play" while the player is turned off.
  • Fix a possible Windows blocking socket read problem during startup.
  • Smooth out the volume changes (~20 per second) coming from apps such as Squeezer without sudden jumps by implementing a smart throttling mechanism.
  • Various other optimizations and bug fixes.

V4.6.3

  • Filter out callback notifications from players that are synced with ours but not using the plugin.
  • Add the ability to specify an Input Source instead of a Quick/Smart Select in the setup menu for users whose AVR's lack the Quick Select feature or who just prefer that method.
  • Fix another Windows blocking socket read problem in the plugin by reading the entire channel volume table into one 1024-byte input buffer.
  • Changed all socket read requests to the AVR from read() to recv() for Windows to hopefully eliminate any future blocking problems.

V4.7

  • Add support for controlling the power and volume of zones other than the "primary" one specified in the plugin setup menu by switching between them in the Audio settings menu.
  • Fix a timing problem in the volume control logic that could result in a socket read error loop.
  • Various other improvements and bug fixes.

V4.7.1

  • Fix a critical timing window problem in the "Power off" logic that could cause another socket read error loop.
  • Add support for the Marantz-specific M-DAX audio restorer mode in the Audio settings menu.
  • Attempt to complete the menu population process even after one of the requests fails with 10 consecutive timeouts.

V4.7.2

  • Fix another timing window that can cause multiple "power on" commands to be in effect simultaneously, resulting in a select() i/o error loop that can fill the file system and bring the LMS server down.
  • Add Audio settings menu support for the Orange/Open Squeeze clients.
  • Rewrite the logic that pauses and resumes playback during "power on" processing to make it more reliable and compatible with a wider range of AVR's by using the Quick Start delay value to determine how long to wait before resuming playback. Also resume (un-pause) playback directly rather than jumping back to the beginning of the current track in order to maintain compatability with the LMS Audio setting that determines what action to take on player power on/off.
  • Allow the AVR to still be controlled by the Audio Settings menu after the player is turned off and the AVR left on due to the input having being changed, extending the functionality of the plugin menu as an AVR remote control outside of LMS.
  • Clean up a few things in the debug log.

V4.7.3

  • Fix a bug that prevented LMS player setting changes from being saved in Material Skin.
  • Minor housekeeping changes.

V4.7.4

  • Make timeout value for AVR source changes context dependent (2 secs from audio menu, .25 secs at power on).

V4.7.5

  • Fix a possible loop condition that could occur during AVR "power on" processing.

V5.0

  • First release for the Lyrion Music Server era. Update menus and wiki pages to reflect the name change
  • Repopulate the Model Name attribute of players using the plugin with "Denon/Marantz AVR" to facilitate analytics.

V5.1

  • Add input validation to the IP Address menu field to guard against typos.
  • Improve the usefulness of "Warning" and "Debug" logging messages originating from TCP socket errors.

V5.2

  • Add the ability to keep the player and AVR in sync by optionally polling the AVR for power status and volume level at intervals chosen by the user from predefined ranges of 5-60 seconds for power status and 0-30 seconds for volume (0 turns polling "off", with synchronization done only at song changes).
  • Extensive improvements to TCP socket communication handling, making state management and error handling much more robust.

V5.2.1

  • Bug fixes

V5.3

  • Add support for the Marantz MODEL M1 and Denon Home Amp streaming amplifiers, including changes to handle the new (and undocumented) format of the 'MVnnn' volume command.

V5.3.1

  • Omit unused input sources from the "Input Source Select" audio settings menu and add missing "Tuner" and "HEOS Music" selections for HEOS branded AVRs.

V5.3.2

  • Work around a WiiM player firmware change that prevents the user from setting the player's volume control to "Fixed at 100%".

V5.3.3

  • Add a player menu option to only power the AVR on when playback is started, and not when the player is turned on. This is useful for some SB hardware devices that turn on automatically when power is applied.
  • Support newer "DTS Neural:X" and "DTS: Virtual:X" surround modes in Audio Settings menus.
  • Fix a potential loop in AVR initializion when the current surround mode is unrecognized.

V5.3.4

  • Add better support for synced players, including those that are members of a Group player.
  • Bypass populating the AVR Input Source table when none of the players are using the Audio Settings menus.

V5.4

  • Implement a method of marking a player with volume control fixed at 100% as being managed by a plugin that needs to be notified of volume changes by client apps such as Material Skin or Squeeze Ctrl. Those apps can then use this indicator in place of a generic user option to process volume changes for all fixed volume players, making the option player-specific.
  • For players using the Power Sync polling option to poll the AVR's power status, only use the specified polling interval when the player is ON. When the player is OFF, always poll at 60-second intervals, lowering network overhead.
  • Check for an empty string in the AVR IP Address during player registration. (This should never occur but did anyway.)
  • Add player registration callback support for 'player reconnect' events, which were formerly ignored, potentially resulting in the state of a player being out of sync with the plugin.

V5.4.1

  • Add support for newer single-zone streaming network amplifiers other than the Marantz MODEL M1 and Denon Home Amp. These include the Marantz 40n and 60n, as well as the Denon DNP- and PMA- series.

V5.4.2

  • Fix problems beginning playback to powered off Denon/Marantz AVR UPnP players caused by buggy firmware (finally!).
  • Always turn AVR off when player is turned off and no Quick Select or AVR input source has been specified for the player.
  • Re-order the audio settings menu to make better sense.
  • Limit AVR Input source in menu to 16 characters, as the AVR's do.
  • Don't turn the AVR off from prefSetCallback() when changes are made for a powered off player.
  • Add an option to automatically pause the player when the AVR Zone associated with it is switched to another input.

V5.4.3

  • Go back to leaving the AVR on when the player is turned off and no QS or Input Source has been specified.
  • Prevent volume from being set to 100% when the player is turned off, due to WiiM firmware (mis)behavior.

V5.4.4

  • Allow subwoofer level to be adjusted in the Audio Settings menu when surround mode is Direct or Pure Direct.
  • Normalize and reduce the size of the Audio Settings menu icons and adjust the main icon size to better match that of other Lyrion apps.