Denon & Marantz Network Control Plugin

Questions and comments specific to a particular plugin should go here.
Nuts
Posts: 25
Joined: Tue Oct 07, 2008 11:32 am

Denon & Marantz Network Control Plugin

Post by Nuts » Thu Oct 22, 2015 4:47 pm

Hi,

here is a small Plugin to send commands to Denon and Marantz devices through TCP/IP (telnet).
I don't put in too much predefined actions in because there are so many different devices and I dont know what is supported on each device.
If someone has a better list please let me know.
Anyway you can add missing actions via "Send_Custom_Action" action in Eventghost.

"close_Socket" and "cpen_socket" actions are to open and to close the connection to the denon/marantz device because only 1 connections is allowed (at least for my Marantz AV 7701) and maybe other apps want to talk to them as well.

changelog
v0.1 - 22.10.2015
- initial release
- send command to Denon Marantz devices through TCP/IP

Development
active

Greetings,

Nuts

P.S.
Its free, opensource and of course under General Public License.
Use at your own risk!
Attachments
Denon - Marantz Network Control.zip
(2.83 KiB) Downloaded 170 times

DarkCinema
Posts: 25
Joined: Wed Sep 26, 2012 10:46 pm

Re: Denon & Marantz Network Control Plugin

Post by DarkCinema » Sun Nov 01, 2015 8:36 pm

Thanks for this plugin.
I am missing feedback information like the command PW? or SSINFAISSIG ?.

This plugin has that http://www.eventghost.org/forum/viewtop ... 530#p27256
FYI I use the SSINFAISSIG ? command to read the "audio input" and dim/color the light if AC3/DTS or any HD audio format is detected.

Nuts
Posts: 25
Joined: Tue Oct 07, 2008 11:32 am

Re: Denon & Marantz Network Control Plugin

Post by Nuts » Tue Nov 10, 2015 6:50 pm

Mhm not sure I understand what you want to do, but at this point my plugin does not support any feedback from the denon / marantz devices.
It just sends commands.

User avatar
Livin
Experienced User
Posts: 790
Joined: Wed Oct 08, 2008 4:56 am

Re: Denon & Marantz Network Control Plugin

Post by Livin » Fri Dec 16, 2016 5:57 am

Has anyone updated this Plugin to receive status updates from the AVR?
setup... XBMC, W7MC for DVR & Live OTA TV, JRMC for multi-zone audio, EG, MiCasaVerde Vera3, USB-UIRT IR receiver, Harmony remote, 5.2 home theater system

yokel22
Experienced User
Posts: 153
Joined: Thu Feb 05, 2015 5:56 pm
Location: U.S. - Kansas city

Re: Denon & Marantz Network Control Plugin

Post by yokel22 » Tue Jan 03, 2017 7:24 pm

Livin wrote:Has anyone updated this Plugin to receive status updates from the AVR?
I started working on that and adding zone2, zone3 controls too. Like Nut's said, marantz avr's can only have one open connection. So events would likely have to be set up through a polling thread.

User avatar
Livin
Experienced User
Posts: 790
Joined: Wed Oct 08, 2008 4:56 am

Re: Denon & Marantz Network Control Plugin

Post by Livin » Tue Jan 03, 2017 7:29 pm

yokel22 wrote:
Livin wrote:Has anyone updated this Plugin to receive status updates from the AVR?
I started working on that and adding zone2, zone3 controls too. Like Nut's said, marantz avr's can only have one open connection. So events would likely have to be set up through a polling thread.
Yeah, I figured that out too... sux. Cant have thier own Android App connected when something else is. Stupid design. I gave up on using EG and have my Vera controlling it since the Vera can do more stuff with the status and control side.

thx
setup... XBMC, W7MC for DVR & Live OTA TV, JRMC for multi-zone audio, EG, MiCasaVerde Vera3, USB-UIRT IR receiver, Harmony remote, 5.2 home theater system

yokel22
Experienced User
Posts: 153
Joined: Thu Feb 05, 2015 5:56 pm
Location: U.S. - Kansas city

Re: Denon & Marantz Network Control Plugin

Post by yokel22 » Tue Jan 03, 2017 7:58 pm

The version posted here's generic send command is broken, but i've got it working now. You can send/recieve any value/setting with that command. So you should be able to do anything the vera allows in EG when i get it done.

Nuts
Posts: 25
Joined: Tue Oct 07, 2008 11:32 am

Re: Denon & Marantz Network Control Plugin

Post by Nuts » Wed Jan 04, 2017 6:54 pm

Ok cool. Please post your Update here and I will add it. 8)

yokel22
Experienced User
Posts: 153
Joined: Thu Feb 05, 2015 5:56 pm
Location: U.S. - Kansas city

Re: Denon & Marantz Network Control Plugin

Post by yokel22 » Thu Jan 05, 2017 10:50 pm

Nuts, i wasn't sure how you were intending the generic send command to work. It looked like you had the first field set for the receiver's ip. I changed it to just send the websocket cmd. I still need to setup the polling thread, but you'll see the basic events fire when EG starts now. I plan to make the events optional in the config, with configurable polling times.
Attachments
__init__.py
Updated Denon/Marantz TCP plugin
(21.39 KiB) Downloaded 78 times

User avatar
kgschlosser
Site Admin
Posts: 3113
Joined: Fri Jun 05, 2015 5:43 am
Location: Rocky Mountains, Colorado USA

Re: Denon & Marantz Network Control Plugin

Post by kgschlosser » Sat Jan 14, 2017 10:21 pm

Hey guys... i didn't realize there were multiples of the marantz plugin...


how about joining forces here and coming up with one kick ass version...

I have already got a basic plugin running. I am just trying to iron out a couple small kinks... but it does TCP as well as Serial. but it also solves the issue of not being able to connect multiple devices to the AVR as well.. and allows for TCP connection from other devices to EG even if the computer running EG is connected via Serial


I have a data storage set up to house any incoming messages and they values.. so EG doesn't fire an event unless something changes... I have also set up user input dialog for actions requiring a number like a station name or a speaker level setting...

Here is another thing i have done which is nice.. because marants/denon allows for the locking of the remote.... you can then program the remote to EG instead.. and remap the buttons.. the purpose to this would be.. you can set one of the buttons up to be an input toggle. so when you press that button.. then say channel up.. the plugin will lock to a user input mode. locking out any other actions.. this is beneficial for button mapping.. because the user can map a single button to multiple things without having the need to do all the complicated tree work... but it would lock everything except for the number input actions of the plugin. so a user could then input the channel they want to go to.. and when done entering if they press the channel up again.. it will send the command and exit the input toggle mode.. and to cancel the input toggle mode all that would have to be done is to press that input toggle button again
If you like the work I have been doing then feel free to Image

yokel22
Experienced User
Posts: 153
Joined: Thu Feb 05, 2015 5:56 pm
Location: U.S. - Kansas city

Re: Denon & Marantz Network Control Plugin

Post by yokel22 » Mon Jan 16, 2017 1:26 am

Yeah, i hadn't really worked on this since seeing you started on the Marantz plugin. Since your solution was a bit more eloquent to say the least :lol: . I agree there should just be one Plugin to avoid confusion. Don't know what i can do to help? But if you need some beta testing or something i have three denon S700W's at the house.

User avatar
kgschlosser
Site Admin
Posts: 3113
Joined: Fri Jun 05, 2015 5:43 am
Location: Rocky Mountains, Colorado USA

Re: Denon & Marantz Network Control Plugin

Post by kgschlosser » Mon Jan 16, 2017 5:25 am

Ideas man. ideas..

whatever you can come up with.. and I know you have done some plugin work before..

Do you have gitbub?? and know how to use it (better then me I hope)??. I could set up a project on there and you can throw some code at it.. I want to make this the best damned Marantz/Denon Automation Control available..

I want to go over the top with this.. It is such a common AVR. this and the Yamaha's.. Yamaha uses XML for communications.. and to build a plugin for that i really have to have my hands on one.. Way to much code flying back and forth. and I think they also have something funny with how to deal with connections also.. but nothing that can't be worked around. kind of like what i did with the Marantz/Denon to solve the single connection issue.

are there any features you would want to have implemented...

I am going to add a nice OSD for the thing also.. something that will display on the computer that is running EG...

are you any good with python wx GUI work???
If you like the work I have been doing then feel free to Image

yokel22
Experienced User
Posts: 153
Joined: Thu Feb 05, 2015 5:56 pm
Location: U.S. - Kansas city

Re: Denon & Marantz Network Control Plugin

Post by yokel22 » Mon Jan 16, 2017 6:02 pm

I don't have a github, but can get an account. I mainly planned on using the plugin for ir/nfc controls as well as a web-app that runs off EG. I have a basic version of this running now. It's setup so that everything builds on load via javascript. So when the user enters the avr credentials it will create all the necessary controls in the web-app. & if you can get it to detect AVR's via UPNP then the user doesn't need to do anything. I'd suggest going this way, but i can do it in wx if you'd prefer. It'd just take me a bit longer to learn the framework a better.
Attachments
denon2.jpg
denon1.jpg

User avatar
kgschlosser
Site Admin
Posts: 3113
Joined: Fri Jun 05, 2015 5:43 am
Location: Rocky Mountains, Colorado USA

Re: Denon & Marantz Network Control Plugin

Post by kgschlosser » Mon Jan 16, 2017 7:58 pm

that would be awesome can pack it all into one plugin... or make the webapp a secondary piece that can be added. and I can set the marantz plugin up so that when your plugin loads it will make a call to the marantz plugin to let it know that the web app plugin is installed and is awaiting data... you would just pass a callback to the marantz plugin.. so it will send over any data you need. and it can share all the description junk so you won't have to duplicate all that stuff... and you won't have to set up something to monitor for events or make any calls directly to the AVR because that end is already done.. and it can pass along the data that you need. we just have to hammer out a format for the data. and I also will make a place for the webapp plugin to be able to send off commands directly without having to go through the actions.


so basically when your plugin loads.. it would do something like

eg.plugins.Marantz.SetWebApp(self.Callback)

and my plugin would do self.webApp = callback

and in the code when it receives some information

if self.webApp is not None:
self.webApp(dataType, value)

and i have already begun work on a means to house any data that has been received..

so to access that you would do

z2 = eg.plugin.Marantz.States.Z2

z2.Volume.Description
z2.Volume.Value

z2.Input.Description
z2.Input.Value

this would be the best route because my setting the data into an object class you will not have to keep on calling plugin for data... you can set a threading Timer to grab the data.. and if it has changed then you app would reflect that. and if it hasn't then nothing would change
If you like the work I have been doing then feel free to Image

yokel22
Experienced User
Posts: 153
Joined: Thu Feb 05, 2015 5:56 pm
Location: U.S. - Kansas city

Re: Denon & Marantz Network Control Plugin

Post by yokel22 » Tue Jan 17, 2017 7:49 pm

and I also will make a place for the webapp plugin to be able to send off commands directly without having to go through the actions.
EDIT: Disreguard, i misread what you were saying here.

This is already possible just via javascript. This is a basic example of the web-ui request for info from the denon plugin which can be parsed on the javascript end. Nothing will show in the EG log when you call it in this way.

Code: Select all

<script>
$(document).on('pageinit', '#Denon', function(){
	// sends demo Ajax back to eg //
	$("#testsend").on('click', function () {
		$.ajax({
            type: 'POST',
            cache: false,
            url: "",
            data: JSON.stringify({"args": ["eg.plugins.DenonTCPIP.GetMainZoneState()"], "method" :"ExecuteScript"}),
            dataType: 'JSON',
            contentType: "application/json;charset=utf-8",
            success: function (jsonData, textStatus) {
                alert(jsonData);  
            },
       	});
	});
});
</script>
Format the data however you like, i had it setup to trigger an event at start to initialize each zone in the web-ui with dictionary values as the payload. "DenonTCPIP.FriendlyNameZ1 {'Volume': '57.5', 'Input': u'Online Music', 'Power': u'OFF', 'Mute': u'off'}" This is what i'm using to build the initial page with. So whatever commands are necessary would need to be passed on start.

I think the real booger in this is just the sheer number of AVR's this would cover and other disparaging types of inputs each would have. For instance AVR1 has inputs(cable,sat,tuner, DVD), AVR2 has(DVD/Blueray,CBL/SAT, NET). You could just blankently cover all possible choices but that leads to the user picking possible inactive commands. Same for things like stereo, direct, 5.1, 7.1.

I think i'm following you on all but this.
this would be the best route because my setting the data into an object class you will not have to keep on calling plugin for data... you can set a threading Timer to grab the data.. and if it has changed then you app would reflect that. and if it hasn't then nothing would change
Why not just use the events generated by the telnet connection?

Post Reply