New Marantz TCP Control Plugin

Questions and comments specific to a particular plugin should go here.

New Marantz TCP Control Plugin

Postby SamWest » Fri May 24, 2013 11:20 am

Hi all,

I've written a plugin to control Marantz (and possibly Denon) receivers via a TCP connection, for receivers which have ethernet or wifi.

It's pretty basic, and just lets you:
    a) control the receiver's volume
    b) send other arbitrary commands (see command specs below)
    c) sync the windows system volume with the receiver, so you can set the receiver's volume percentage to the same as the system volume percentage. I find this is handy if you're passing SPDIF streams which aren't affected by the system volume controls. There's an example xml file included that demonstrates this. It's a bit clunky but it works for me.

The Marantz command spec is here. Supported Marantz models are purportedly: AV7005, SR7005, SR6006, SR6005, SR5006, NR1602 (and probably any others with an ethernet or wifi connection). I've only tested with an NR1602.

From looking at the Denon command list here, these models might also be supported: AVR-3808, AVC-3808.

So anyway, grab the zip from the link below if you'd like to give it a go.
Please post back to this thread if you have any problems or feedback (this is my first ever python code, so I'm keen to learn what I've done badly :).

-Sam.
Attachments
MarantzTCP.v0.1.zip
Marantz TCP Plugin v0.1
(8.74 KiB) Downloaded 225 times
SamWest
 
Posts: 8
Joined: Thu Dec 06, 2012 10:26 am

Re: New Marantz TCP Control Plugin

Postby CypherMK » Wed May 29, 2013 6:22 pm

Hi,

I"m currently testing this plugin and it works! I have a Marantz SR7007 and I can increase and decrease the volume with the text command. Haven't tested the rest but will do that and report back.

Thanks for making this plugin!!!
CypherMK
 
Posts: 22
Joined: Sun Mar 21, 2010 2:03 pm

Re: New Marantz TCP Control Plugin

Postby CypherMK » Wed May 29, 2013 6:41 pm

Tried even more commands, like changing input and power on/of and they all work. That's all I needed! Thank you! :D
CypherMK
 
Posts: 22
Joined: Sun Mar 21, 2010 2:03 pm

Re: New Marantz TCP Control Plugin

Postby CypherMK » Wed May 29, 2013 9:37 pm

I have a request. Is it possible that eventghost gets information back from the receiver? So, for example, eventghost knows which input I have selected or which volume I have set?

And maybe subwoofer volume control? So when I load a movie I could automatically raise the subwoofer volume.

Thanks!
CypherMK
 
Posts: 22
Joined: Sun Mar 21, 2010 2:03 pm

Re: New Marantz TCP Control Plugin

Postby SamWest » Sun Jun 02, 2013 11:45 am

I'm glad it worked for you.

All status replies that come back from the receiver are turned directly into EventGhost events.
For example: MarantzTCPPlugin.@VOL:-210 means the receiver has been set to -21.0dB, and MarantzTCPPlugin.SIDVD
means the input was set to DVD. You should see this in the EG log after changing the volume using the receiver's remote etc. There should be a similar message (or set of messages) received whenever the amp's status changes. If you're not seeing these events, it may mean the plugin's receiving thread has stopped - I should probably add some more error checking for this. Restarting EG should fix this for now though.

To control the subwoofer volume, just create a new Action using the Marantz TCP plugin's 'Send Text Command' action, and give it the command CVSW UP or CVSW DOWN. You can look up these commands in the spreadsheet linked in my first post, along with absolute volume commands and many others.

My receiver ignores the subwoofer commands unless something is playing that has a sub audio channel, so fire up a movie before testing it.

Hope that helps,
Sam.
SamWest
 
Posts: 8
Joined: Thu Dec 06, 2012 10:26 am

Re: New Marantz TCP Control Plugin

Postby CypherMK » Tue Jun 18, 2013 9:25 pm

Hi Sam.

I really enjoy this plugin.

I have now setup my HTPC running mediaportal, to increase my subwoofer volume by 9 db when I play a movie. When the movie stops it will drop the subwoofer level again with 9db. So my music still sounds at it should.

I now used CVSW UP and CVSW DOWN command 18 times to get the desired 9 db increase and decrease. Is there maybe another simpler command to increase and decrease the volume? So with one command it will be 0 db volume and with another one it will be -9 db volume. I couldn"t find it in the document. I couldn't even find the previous 2 commands (CVSW UP/DOWN).

Thank you
CypherMK
 
Posts: 22
Joined: Sun Mar 21, 2010 2:03 pm

Re: New Marantz TCP Control Plugin

Postby CypherMK » Tue Jun 18, 2013 9:26 pm

oh wait. I found all the commands. Didn't see the tab. Not used to xls documents :)
CypherMK
 
Posts: 22
Joined: Sun Mar 21, 2010 2:03 pm

Re: New Marantz TCP Control Plugin

Postby puppet » Sat Jul 13, 2013 11:34 am

I merged in and fixed up some of the code from the old Marantz Serial, this means, it now includes the most basic features directly without needing to check the documentation.
Attachments
__init__.py
(13.5 KiB) Downloaded 196 times
puppet
 
Posts: 1
Joined: Sat Jul 13, 2013 11:33 am

Re: New Marantz TCP Control Plugin

Postby CypherMK » Sun Jul 14, 2013 9:59 pm

Thank you!
CypherMK
 
Posts: 22
Joined: Sun Mar 21, 2010 2:03 pm

Re: New Marantz TCP Control Plugin

Postby kkl » Fri Jan 06, 2017 10:57 pm

There are several Marantz and Denon plug-ins. The problem I've had with them is that they don't generate any/many events and/or they stop responding (presumably due to the one telnet connection at a time limitation). This plug-in is nice because it generates lots of events. I've modified it slightly to add Zone2 HDMI commands. Even that probably wasn't necessary because there is a manual command option ('Send Text Option'). Although this is a Marantz plug-in, it works fine with current generation Denon receivers (same parent company). I tested with a Denon AVR-X3200W. Attached is current Denon command reference (v.02, 15 Jul 2016). Rename the extension from .txt to .xlsx.
Attachments
__init__.py
(14.89 KiB) Downloaded 7 times
AVR-S720W_S920W_X1300W_X2300W_X3300W_X4300H_X6300H_PROTOCOL_V02 (1).txt
Rename the extension from .txt to .xlsx
(392.84 KiB) Downloaded 16 times
kkl
Experienced User
 
Posts: 302
Joined: Wed May 04, 2011 9:32 pm

Re: New Marantz TCP Control Plugin

Postby kgschlosser » Sat Jan 07, 2017 7:48 pm

@kkl


this is a very simple thing to do..

if you want me can rewrite this thing.

I can do the raw code bits and if you want to help you can set up the commands.

I will give you a template to follow to do this. the plugin you posted supports maybe 5% of the total commands that can be sent to the AVR. that's it.

and I also know how to get events from the AVR. so for example. if you turn the volume knob on the AVR manually it will spit out an event in EG. so anything that gets done directly will report back.

The current problem with the plugin is this... It will only open the connection if you send a command. so that's no good. it has to be changed to do it right away. the other issue is that it will try to trigger an event on an empty return which gets caught but it closes the socket. and you do not get a traceback for it. But also there is no catalog of responses to know what you are receiving..

it's got the tright idea. just done up a little odd and needs to be reworked.

but there are 936 different commands that can be sent to the AVR and only 62 are currently used.. heh get that i was just about right with the 5% guess.. But also the calculations for the volume are excessive. it's easy to set a new range so if 0-100% is to be used it's super simple. but I would actually keep it as -80 to -18 db i think. that is what the range is... but also offer an OSD for any of the receiver data that comes out. including a volume OSD. but put a check box to use a 0 to 100 range instead of the -80 to -18 range in the events generated. so the user can select that.

but also because of how changes to AVR's take place offer a means to log any messages that have been received that are not in a list of known messages to a file. so that way we can add anything that may not be accounted for.

I had to do this with my HarmanKardon AVR-745. (last good AVR they made). and that thing has almost 2000 incoming messages and almost 800 commands. and i didn't have this nice documentation to tell you what they all are. and my EVR has 2 lines that were output and things would flip around.. was a royal pain in the backside.. and actually My plugin could use a going through again because i wrote it when i first started coding. and is a disaster.


so if you are interested I will convert the data from xlsx to a csv file. and then bounce a python script against it to do the bulk of the conversion. but it will need to have a going through to clean it up. and make sure there are no errors.

if you are interested let me know..
I can get the back end together pretty fast as i already have a template to use. the OSD bits will take a little more time because i do not want to use the stock OSD plugin due to performance because if someone outputs information to a large screen i that kind of processing to draw at HD is brutal but at 4K would be horrific. so I want to use processing and set this thing to actually run on it's own so it won't tank the EventGhost GUI.

so let me know. this will be a fast thing to build. I am going to work on the converting of the xlsx file. i should be done with that by this evening. and I will send it over to ya.

K
A loved one and Time, The 2 things that can never be replaced.

Family, The only thing you don't get to choose in life.
User avatar
kgschlosser
Site Admin
 
Posts: 1280
Joined: Fri Jun 05, 2015 5:43 am
Location: Rocky Mountains, Colorado USA

Re: New Marantz TCP Control Plugin

Postby kkl » Sat Jan 07, 2017 9:15 pm

kgschlosser,

That's very generous of you to offer your time for something that you don't even use yourself. For devices like this that have many, many commands that most people will never use, I wonder if it's worth the time to automate the vast majority of them when any of the oddball ones can be used by a simple manual lookup. If you have a way to import the entire database, perhaps that is not a concern, other than generating a huge option list.

If you're going through this effort, you might also want to look at Denon & Marantz Network Control Plugin that is of more recent vintage and being updated by Nuts and yokel22.

The problem I'm finding is that Denon only allows one telnet connection at a time, but I need access from two different PCs. So, whichever EG connects first works, and the other gets a timeout.
kkl
Experienced User
 
Posts: 302
Joined: Wed May 04, 2011 9:32 pm

Re: New Marantz TCP Control Plugin

Postby kgschlosser » Sun Jan 08, 2017 3:16 am

The 2 PC's thing is a breeze. Can do up a simple telnet bridge for ya. Something that can be built into the plugin actually. So it will echo all messages to the second computer. But it would also allow you to connect to the first and the first would forward the information along. It would be a simple check box to turn on a telnet server we can build into the plugin. And this would allow a second computer to connect to it. And you would use the same plugin to control it. And you could if you wanted to but Daisy chain an unlimited number of machines.

Problem solved. But adding the extra controls is nothing. Because everything is already mapped out in that file ya got there. I just have to do some final touches on it. And it will need to be read through and some nice description/response wording. And that is all done. A the codes are there and all of the proper response codes for a command. And EG will create the actions dynamically from the list. So no worries there either. I can make up a generic action dialog for responses that may require user input. Like a specific volume level. But that is about it. The telnet side of things is a sinch
A loved one and Time, The 2 things that can never be replaced.

Family, The only thing you don't get to choose in life.
User avatar
kgschlosser
Site Admin
 
Posts: 1280
Joined: Fri Jun 05, 2015 5:43 am
Location: Rocky Mountains, Colorado USA

Re: New Marantz TCP Control Plugin

Postby kkl » Sun Jan 08, 2017 4:51 am

kgschlosser wrote:The 2 PC's thing is a breeze.

Wow. This has been the Achilles heel of these Denon/Marantz plug-ins. A breeze for you; not so much for mere mortals.
kkl
Experienced User
 
Posts: 302
Joined: Wed May 04, 2011 9:32 pm

Re: New Marantz TCP Control Plugin

Postby kgschlosser » Sun Jan 08, 2017 11:46 am

nah i just have a really twisted way of thinking about things. I am a problem solver. it's what i do..

I know how to so it. it's something that could be accomplished in maybe 50 lines of code.

here would be how it would work


AVR

computer 1 connects to AVR using the plugin
computer 1 starts telnet server

computer 2 connects to computer 1 using the plugin you would enter the IP of computer 1 instead of the AVR in the plugin config

computer 1 reads incoming data from the AVR. does what it needs to do triggering events and what have you. and then passes the exact same information it got from the AVR to the telnet server it has running. This will allow computer 2 to see the exact command that the AVR sent and it will do what it needs to do triggering events and what have you.

and this all works the same way for sending commands just flip flopped.

computer 2 sends a command. computer 1 sees the incoming command on the telnet server it has running. then passes the command to the AVR.

Viola !!!!! you now have 2 computers getting events and sending commands to a single connection AVR

Now the really cool thing would be this


adding computer 3

computer 3 would connect to computer 2 in the same manner that computer 2 connects to computer 1 and in the same manner that computer 1 connects to the AVR :o :shock: :D

and data send from the AVR would do to computer 1 then computer 1 would send it to computer 2 and computer 2 would send it to computer 3 :D

and if a command was sent from computer 3 . computer 2 would send it to computer 1 and computer 1 would send it to the AVR

want me to tell you how computer 4 would work??
A loved one and Time, The 2 things that can never be replaced.

Family, The only thing you don't get to choose in life.
User avatar
kgschlosser
Site Admin
 
Posts: 1280
Joined: Fri Jun 05, 2015 5:43 am
Location: Rocky Mountains, Colorado USA

Next

Return to Plugin Support

Who is online

Users browsing this forum: No registered users and 2 guests