I want to share with you an Eventghost plugin, which enables you to control your Marantz (M-CR511 / M-CR611) amplifier via the TCP/IP protocol.
As other amplifiers and receivers (from Marantz and Denon) are using the same, or a very similar protocol, other amplifiers (from Marantz and Denon) should work as well (at least partly).
I have been using the basis of the plugin for about a month now and it seems to be stable on my setup/system. If you encounter any bugs, please post them here. (Please however keep in mind that this is my first Eventghost plugin.)
I want to mention, that yesterday, I noticed that there are two other plugins in this forum, which could basically do the same thing (send commands to your amp via ethernet). (If only I had seen them earlier - it would have saved me quite some time ).
That being said, I don't know to what extent their features overlap with this plugin.
How to install the plugin:
- - First of all, in your Marantz amplifier settings, switch "Network Control" to ON
- Now create a folder called "Marantz M-CR511" in your Eventghost-plugins folder (where the other EG-plugins are located).
- Download the __init__.py file (attached to this post)
- Copy it into the newly created folder
- Restart Eventghost
- load the plugin into your EG tree
- enter the IP address of your amplifier (I suggest you fix the IP in your Router settings)
- if you wish, give your various Inputs other names than the suggested ones (e.g. TV / Laptop etc...)
- you're good to go!
How to use the plugin:
Connecting / Disconnecting:
- - When you start the plugin, it automatically connects to the amplifier.
- To disconnect and/or reconnect manually, use the available actions.
- When the plugin stops (by deactivating the plugin or shutting down eventghost), it automatically disconnects from the amplifier.
- On suspend/resume the plugin automatically disconnects/reconnects.
I guess the actions are pretty much self-explanatory. Available at the moment are:
- - Power On/Off
- Set Volume level to an absolute amount xx
- Volume Up/Down by one step
- Increase/Decrease the volume in percentage terms of the current volume
- Gradually change the volume to a predefined level (either "only from below", "only from above" or "both cases")
- stop the gradual change of the volume
- Audio Modes: "Normal", "Night" and "Stadium" (see explanation below)
- Switch to next Audio Mode
- Switch to NightMode if StadiumMode is not active
- Show the Clock (on the amp's display, this is equivalent to pressing the clock button on the remote)
- Configure the Timer and switch it on (Once or every day) or switch it off
- Print current status_variables (like volume, bass, treble, audio mode, etc...)
- ReadAmpDisplay (create an event with the amplifier's display information as payload)
- Go to Favourite (equivalent to pressing "CALL" on the remote and choosing the desired favourite)
- Set Brightness of the amp's display
- send custom command (enter any command to send to the amplifier)
- set the amp's sleep timer
The following will generate an event:
- - gradually changing the volume has finished
- if one requests the information of the amp's display (info as payload)
- - Volume is altered (level in payload)
- Input is altered (Input name in payload)
- Mute On/Off
- Power On/Off
- Sleep Mode is activated / modified (Sleep Time in payload)
These are three pre-defined audio modes I frequently use. In the future I will probably make them configurable. At the moment this is not possible.
- - Normal Mode means SourceDirectInput=True, Display Brightness=100%
- Night Mode means Bass is cut out (-10), Treble is pushed slightly (+2), and Display Brightness is set to 50%
- Stadium Mode means Bass is pushed (+2), Treble is pushed (+8) and Display Brightness is set to 50%
- if the amplifier is switch off, the audio mode cannot be set. In this case, the plugin remembers it and switches into the desired audio mode as soon as the amplifier is switched back on again.
- - First of all, the amplifier only allows one TCP connection at a time. Therefore you cannot use the plugin and Marantz' smartphone app at the same time! The plugin needs the open TCP connection to receive events from the amplifier, which were triggered by the remote or by hand.
- Further it is important that the plugin disconnects before Eventghost is shut down (which is done automatically, as long as eventghost doesn't crash or similar). Otherwise it's possible that the amplifier keeps the connection open and won't allow any new connections. In this case, unplug your amplifier, wait 10sec, then plug it back in.
- If the amplifier is not controllable when the amplifier is switched off, turn on "Network Control" in your amplifier's settings.
- If you are using a different amplifier and want to compare the used commands: All commands of the Marantz M-CR511 Amplifier are listed in "self.available_commands". This variable is just there to provide the info. It is not used later in the plugin.
- If some commands differ from the ones your amplifier is using, use the "send custom command" action to add customised commands.
If there's anyone out there who can benefit from this, great! Any comments, bug reports or feature ideas are of course always welcome.