Cynical Denon

Cynical Denon #

This plugin allows Indigo to control a Denon or Marantz AV Receiver device, through either an IP network port, or through a serial RS-232 port (if your device has one of them). It allows you to observe and change many settings on the receiver, including controlling multiple zones if you have them.

There is no definitive list of supported devices. See Supported Devices for information on what this plugin may work with. Feel free to send testaments of success or failure with your particular Denon/Marantz receiver, and over time we may be able to compile a compatibility list.

Overview #

For each Denon AVR, create an AV Receiver device in Indigo. If your receiver has multiple zones that you wish to use, then create an additional AVR Zone device for each zone of interest. Finally, if your receiver has trigger outputs in the back that you wish to control directly from Indigo, then create a separate Trigger Output device for each of them.

Supported Devices #

Officially, this is a plugin for the U.S. version of the Denon AVR3312CI receiver. Denon makes and has made many receivers. You can only control those with serial ports or network interfaces (the “CI” stands for “Custom Install”). If your receiver is not exactly an AVR3312CI, it will be different in some way. Denon receivers have no way to explain their capabilities to Indigo, and so this plugin has very limited means to automatically adjust to the precise capabilities of your receiver. The more your receiver is different from an AVR3312CI, the less the plugin will work for you without effort.

If you wish to customize the plugin to your particular receiver, you need to find Denon’s documentation for it. Find your receiver on Denon’s web site and look for a downloadable document describing its “serial” or “IP” protocol. If Denon has already forgotten about your device, search the Internet for “Denon AVRnnnnxx protocol” (using the exact model number of your device). If you can’t find the specific one for yours, look for a similar one, such as AVR3311CI instead of AVR3312CI (these are model year changes). This document may look like some kind of diabolical spreadsheet filled with gibberish. That’s okay. Scan for for the “SI” command. It describes the list of sources your receiver uses. See below for instructions.

Sources #

The receiver represents each source as a small uppercase string such as DVD or GAME2. The plugin comes with a pre-configured list of sources that the AVR3312CI happens to support, from which you may select in menus. If your receiver has a different source such as DVR2, then you can simply select the Other... menu option and type in your code exactly as your receiver needs it (and always in UPPERCASE). You can read those names off the receiver’s front display or on-screen interface, or find them in the interface document you found earlier, in the section for the “SI” command.

Your receiver probably allows you to delete and rename sources, using the on-screen display. These are purely cosmetic changes that don’t affect its interface to Indigo - if you rename GAME to Playstn, Indigo must still send GAME. Bring up the configuration dialog for your Receiver device in Indigo and look at the Source Map field. This is a comma-separated list of source names, and the plugin uses this list to make its source menus. Remove any sources you have deleted. For any source you renamed, use an equal sign like so GAME=Playstn. This will allow the menu to show Playstn while Indigo keeps sending GAME commands. The same procedure can be used to adjust the menu for your different Denon/Marantz receiver model. Just remove non-existent sources, add new ones, and rename and reorder at will. Keep in mind that the Other… option always requires you to type in the original (un-renamed) name of a source.

In source menus that apply to secondary zones or recording sources, you will find an additional item called (main). Select this to track the current source of the main zone. The internal name for this source setting is SOURCE.

Cynical Denon can automatically figure out if your receiver has an HD Radio or a normal (analog) radio. If you have an (old) device that has both, radio-related settings will apply to the HD Radio source, and the plugin will entirely ignore the analog one.

Audio Volumes #

Within the plugin, sound volume is given as a number representing decibel (dB) relative to reference level. Zero means “as loud as it gets without distortion.” Very big negative numbers are effectively inaudible. One way to shut up the receiver is to set the volume to -100, which will result in the smallest possible value. Positive values mean “louder than you should,” and the receiver feels entitled to distort the sound to get that loud. I recommend avoiding that if you can.

This describes how all volumes work. The details vary however - different receivers have different high and low limits; some allow fractional values and some don’t. You can specify any number, but the plugin will clip and round it according to the receiver’s capabilities.

To change the volume relative to its current value, use a plugin formula . The special names current and step represent the current volume and the smallest change possible; for example, a new value of =current+step turns up the volume by as little as possible.

Volume changes are instantaneous. Muting is independent of volume, and can be configured (in the on-screen interface) to either turn off the amplifiers or mute the sound by -20dB or -40dB. The plugin will work either way.

Limitations and Problems #

Denon receivers report no errors of any kind. If you make a mistake in spelling a source name, absolutely nothing will happen when you try to use it. A bit of trial-and-error may be needed.

Some commands do not work unless the receiver is in the right state. For example, you cannot change the tuner frequency unless the tuner source is selected first. These restrictions are often obscure or undocumented, and the plugin makes no attempt to work around them. If some action seems to work sometimes but not at others, see if switching something else around will help.

My receiver has an annoying bug where it sometimes flat-out refuses to report the state of the recording source (it reports something unrelated instead). This is unimportant unless you actually need to know the state of the recording source setting for something. Actively switching this setting seems to cure the bug for a while, so just change the setting to something unimportant and then change it back to what you want. I assume other receiver models and other firmware versions will have equally interesting (mis)behaviors.

Devices #

AV Receiver Device #

This device represents the actual AV Receiver you use, as well as its main (and perhaps only) zone.

Configuration Settings #

Setting Value Description
Address IP address or serial port path Network name or address of receiver; or full path to a local serial port.
Keepalive checkbox Periodically send commands to the receiver to see if it’s still responding.
Source Map string Receiver source configuration - see Sources.

To connect to a receiver with an IP connection, enter the receiver’s host name or address into the Address field. For a receiver on your local network, you may use the Bonjour name, name.local.

To connect to the receiver’s serial port through a networked serial relay such as a Global Caché serial interface, enter the host name or address of the relay using the form relayname:port. Set the relay serial port for 9600 bps.

To connect to the receiver’s serial port through a USB serial adapter connected to your computer, enter the full path to the serial device (starting with a slash) into the Address field. The serial port will be configured correctly.

Only one device may talk to the Ethernet plug of a Denon receiver at a time. Make sure you don’t accidentally have two devices trying to control the same receiver, or they will randomly interfere with each other. This also means you can’t both use Cynical Denon and some other IP-based control device on the same receiver. The receiver’s web interface works separately, and Denon’s own iPhone app uses that and won’t interfere with Cynical Denon. The serial and IP ports (if your receiver has both) can be used at the same time.

The Source Map field is used to adapt the plugin to the particular kind of receiver you have. See Sources.

The receiver device’s state tracks the receiver’s general state.

Device States #

State Meaning
connecting The device is trying to establish a connection.
exploring The device has connected to the receiver and is now examining it.
standby The device is ready to use. It is turned off (in standby mode).
powerup The device is turning on. It will become on in a short while.
on The device is ready to use. It is turned on (at least one zone is active).
preparing The device is trying to initialize the network port.
unavailable Something has gone wrong and the device cannot be used right now. Check the Indigo log for details.

It usually takes a few seconds for the exploring phase to conclude. The plugin will not change anything in the receiver, though the two will chat quite a bit. This may take a wee bit longer when using a serial connection.

It takes a few seconds for the receiver to switch on. During this time, the device state is powerup. It will switch to on on its own when it is ready. Turn-off is instantaneous.

AVR Zone Device #

This device represents an additional output zone in a receiver. You specify the “host” receiver and a zone number.

Device States #

State Meaning
ready The zone is ready to be used. (It may either be on or off.)
preparing The zone is trying to initialize.
unavailable Something has gone wrong and the zone cannot be used right now. Check the Indigo log for details.

The plugin discovers all available zones during the initial discovery process, and will allow you to configure only zones that it has found.

Trigger Output Device #

This device represents a trigger output at the back of your receiver, if it has one. These outputs are usually used to switch auxiliary devices such as projectors and power amplifiers on and off, and the receiver can be configured to do this (using its on-screen interface) completely on its own. If this is your use, you don’t need this device.

However, you can send explicit on/off commands to a trigger output. Once you do this, the automatic switching functionality is temporarily suspended, and the trigger will follow your commands exactly - until the receiver turns off. At that point, it reverts to automatic operation until you switch it again.

There is no reliable way to read the current state of the trigger output itself. Do not attempt to read the onOffState of this device; it may be wrong while the trigger is switched by the receiver. Of course, all that automatic switching is based on other state of the receiver, such as zone state and source selections, and that you can observe directly and act accordingly.

Device States #

State Meaning
ready The trigger is ready to be used.
preparing The trigger is trying to initialize.
unavailable Something has gone wrong and the trigger cannot be used right now. Check the Indigo log for details.

Receiver Properties #

Here is a list of the receiver properties the plugin allows you to use. Each one is a separate state value on the receiver device, and each one has an action that can change it. Use the state values to read the current value and to trigger events based on changes or thresholds. Use the actions to change the values.

The plugin will notice all changes to these values and automatically reflect them in changes to the device’s state values, whether the change was commanded with an Indigo action, by using the receiver’s remote, or by using the dials and buttons on the device itself. Note that some values affect others – for example, the surround mode will likely change whenever you switch sources. Plan accordingly.

State Value Meaning
Power bool Whether a zone is turned on.
Volume number Zone audio volume - see Volumes.
Muted bool Whether zone audio output is muted.
Source enum Zone source (what the zone output is playing) - see Sources.
Video Source enum What separate picture the zone output is playing - see Sources.
Recording Source enum What the recording output is playing - see Sources.
Surround enum The current surround encoding mode.
tuner_frequency number What frequency the tuner is currently tuned to.
dynamic_volume enum Dynamic compression mode (“night mode”).
mult_eq enum The setting for the room correction computer.
video_processing enum Trade off video processing between quality and speed.
quick_select number Preset quick select slot.

The tuner frequency is the actual number - like 88.5 or 1590. The receiver can figure out whether that’s AM or FM radio.

The dynamic volume settings are DAY, EVE, or NGT. EVE and NGT make quiet sounds louder so you can hear dialog without blowing the neighbors’ eardrums out when the shooting starts.

The mult_eq setting lets you switch between room correction settings. Once you’ve done the microphone-based automatic setup, you should probably just leave it at the Audyssey setting unless you think you’re an audiophile.

The Quick Select state is the number of the predefined quick select storage slot currently in use. Each zone has its own quick select slots, which can record a wide variety of state for instant recall. Use the Quick Select action to engage a quick select. Observe the quick_select state to see when a quick select is used. Use the on-screen interface to define or change the meaning of quick select slots; the plugin cannot currently do this.

Actions #

Use Preset Action #

Selects one of the presets you previously defined on the receiver. This plugin cannot save presets.

The AVR3312CI has three different sets of presets. Three front-panel presets correspond to actual buttons you can press on the receiver itself. They are named P1, P2, and P3. There are 56 tuner presets named A1 through G8. And then there are 56 Internet presets also named A1 through G8, but totally distinct. This action lets you pick any of them. If you have not previously defined a value for a particular preset, nothing happens.

Receiver Main Power Action #

This action peremptorily turns the whole receiver on or off (to standby), regardless of the state of its zones. You probably do not want to ever do this. Your receiver is designed to automatically turn itself on or off to reflect the on/off state of all of its zones; so that if the main zone is off but zone 2 is on, it will remain on until zone 2 too is turned off.

Use this action only if you need to turn the whole system off right now.

Set Attribute Action #

Under the hood, the Python code that controls the receiver knows of many more parameters to set and tweak. For experts, and experts only, this command allows setting them all. This requires an understanding of what all those values mean, which certainly means you need a working understanding of the Denon protocol document for your receiver. You also need to know exactly what values to use. It’s an iffy, tweaky kind of power.

These are all values you can set using the receiver’s on-screen interface.

Keep in mind that these values persist across standby cycles. You can easily get your receiver into an interesting state where something doesn’t quite sound right but you can’t quite remember what you did (and how to get back to where you were). If you get into trouble, you’ll find the on-screen interface easier to use than Indigo commands. If you’re desperate, you can reset the receiver to its factory defaults. The plugin won’t interfere.

Notes #

Release Notes #

Notable releases:

Release Notes
1.8.0 Released under Apache 2.0 license.
1.7.2 Support for Indigo 7.
1.5.0 Keepalive support. Support devices with dual radios. Better Indigo 6 support.
1.0.1 First official release. Adds toggle commands for zone power and muting.
1.0.0b3 Beta release.