Control Denon AVR via XBMC/evenghost/other
#1
Hi,

I know the recent Denon AVR series (1713 1913 etc.) have network control. I was wondering if anyone knows a way to interface with the receiver via this network protocol (http etc.) so that I can set up xbmc or eventghost to control it, rather than the stock Denon iPhone app.

Cheers!
Reply
#2
Has anyone tried this?
Reply
#3
Protocols etc. for Denon can be found here http://www.audioproducts.com.au/downloadcenter.aspx
If I have been of help, please add to my reputation as a way of saying thanks, it's free.
Reply
#4
I'm not familiar with denon but you should be able to do this quite simply with a script interacting with each control button on the web GUI - problem is that you'll probably have to write it yourself.
This is assuming that it works on a simple html like basis and not flash/Silverlight
Reply
#5
Just to let you know: I've started on such an addon, but it's still very alpha, and will only be available for XMBC Gotham. I will update the addon the following weeks until I have a useful addon. Watch the repo if you still have your Denon AVR

https://github.com/jeroenvds/denonremote
Reply
#6
What would be good is if xbmc could determine what's being played e.g film or music and adjust the settings on the amp accordingly such as setting auydyseey to flat and the the reference to -5db for music and something different for film!
Reply
#7
great idea!
Reply
#8
Because there's some interest in this, I'll post what I've done and propagate the dead thread some more:

It's pretty easy to do some basic commands with the Denon AVRs. Here are a few examples of what can be done:

Code:
volume up:
http://192.168.0.120/MainZone/index.put.asp?cmd0=PutMasterVolumeBtn/>

volume down:
http://192.168.0.120/MainZone/index.put.asp?cmd0=PutMasterVolumeBtn/<

set volume at 35 (-45=35-80):
http://192.168.0.120/MainZone/index.put.asp?cmd0=PutMasterVolumeSet/-45.0

volume mute:
http://192.168.0.120/MainZone/index.put.asp?cmd0=PutVolumeMute/off
http://192.168.0.120/MainZone/index.put.asp?cmd0=PutVolumeMute/on

Inputs:
http://192.168.0.120/MainZone/index.put.asp?cmd0=PutZone_InputFunction%2FSAT%2FCBL
http://192.168.0.120/MainZone/index.put.asp?cmd0=PutZone_InputFunction%2FMPLAY
http://192.168.0.120/MainZone/index.put.asp?cmd0=PutZone_InputFunction%2FDVD

DRC:
http://192.168.0.120/SETUP/AUDIO/s_surrpara_1.asp?listDynamicComp=Mid

Power:
http://192.168.0.120/MainZone/index.put.asp?cmd0=PutZone_OnOff%2FON
http://192.168.0.120/MainZone/index.put.asp?cmd0=PutZone_OnOff%2FOFF
http://192.168.0.120/MainZone/index.put.asp?cmd0=PutSystem_OnStandby%2FSTANDBY

In Linux, it's very simple to control the AVR (assuming it's connected via Ethernet). Here's a simple example using python:
Code:
import urllib
#volume down
urllib.urlopen("http://192.168.0.120/MainZone/index.put.asp?cmd0=PutMasterVolumeBtn/<")
For Windows, I think you can take that and put it right into a python script in EventGhost and it will work too.

I also found you can query the AVR settings with:
Code:
http://192.168.0.120/goform/formMainZone_MainZoneXml.xml
You could then parse the XML returned if you need to figure out the state of certain settings before changing something.

That's it! Simple!
Reply
#9
If this plugin can turn on my Denon AVR when the htpc starts up and switch it to the bluray input I'm plugged into - the I will be one happy camper!
Reply
#10
(2014-01-05, 13:01)jeroenvds Wrote: Just to let you know: I've started on such an addon, but it's still very alpha, and will only be available for XMBC Gotham. I will update the addon the following weeks until I have a useful addon. Watch the repo if you still have your Denon AVR

https://github.com/jeroenvds/denonremote

I do indeed still have it, the addon sounds great! Thanks

(2014-01-06, 07:14)doug Wrote: Because there's some interest in this, I'll post what I've done and propagate the dead thread some more:

It's pretty easy to do some basic commands with the Denon AVRs. Here are a few examples of what can be done:

Code:
volume up:
http://192.168.0.120/MainZone/index.put.asp?cmd0=PutMasterVolumeBtn/>

volume down:
http://192.168.0.120/MainZone/index.put.asp?cmd0=PutMasterVolumeBtn/<

set volume at 35 (-45=35-80):
http://192.168.0.120/MainZone/index.put.asp?cmd0=PutMasterVolumeSet/-45.0

volume mute:
http://192.168.0.120/MainZone/index.put.asp?cmd0=PutVolumeMute/off
http://192.168.0.120/MainZone/index.put.asp?cmd0=PutVolumeMute/on

Inputs:
http://192.168.0.120/MainZone/index.put.asp?cmd0=PutZone_InputFunction%2FSAT%2FCBL
http://192.168.0.120/MainZone/index.put.asp?cmd0=PutZone_InputFunction%2FMPLAY
http://192.168.0.120/MainZone/index.put.asp?cmd0=PutZone_InputFunction%2FDVD

DRC:
http://192.168.0.120/SETUP/AUDIO/s_surrpara_1.asp?listDynamicComp=Mid

Power:
http://192.168.0.120/MainZone/index.put.asp?cmd0=PutZone_OnOff%2FON
http://192.168.0.120/MainZone/index.put.asp?cmd0=PutZone_OnOff%2FOFF
http://192.168.0.120/MainZone/index.put.asp?cmd0=PutSystem_OnStandby%2FSTANDBY

In Linux, it's very simple to control the AVR (assuming it's connected via Ethernet). Here's a simple example using python:
Code:
import urllib
#volume down
urllib.urlopen("http://192.168.0.120/MainZone/index.put.asp?cmd0=PutMasterVolumeBtn/<")
For Windows, I think you can take that and put it right into a python script in EventGhost and it will work too.

I also found you can query the AVR settings with:
Code:
http://192.168.0.120/goform/formMainZone_MainZoneXml.xml
You could then parse the XML returned if you need to figure out the state of certain settings before changing something.

That's it! Simple!

Awesome, thanks! Where did you get a list of all these commands? Or did you just go into the source for the web interface?
Reply
#11
(2014-01-06, 18:52)nikc0069 Wrote: If this plugin can turn on my Denon AVR when the htpc starts up and switch it to the bluray input I'm plugged into - the I will be one happy camper!

Since its an XBMC addon, it'll only be possible on XBMC start. You could use eventghost to turn it on when the PC is booted though.
Reply
#12
(2014-01-06, 22:03)Crotia Wrote: Awesome, thanks! Where did you get a list of all these commands? Or did you just go into the source for the web interface?

I just used the Denon web interface to change various settings and watched what was sent to the Denon IP address with Wireshark.

I primarily use those commands to switch inputs between my TV STB, game box, and xbmc and power on/standby, but it could probably be used in other cool ways with json-rpc.
Reply
#13
(2014-01-06, 18:52)nikc0069 Wrote: If this plugin can turn on my Denon AVR when the htpc starts up and switch it to the bluray input I'm plugged into - the I will be one happy camper!
Are you using Windows? If so get EventGhost. It can do all sorts of things like running simple python scripts (see earlier posts) on startup, shutdown, resume, and other events.
Reply
#14
I've tried modifying jeroenvds script, so that it uses the http request and also fixed the volume control....

Code:
import xbmc
import time
import xbmcaddon
import json
import urllib

__addon__ = xbmcaddon.Addon(id='script.jeroenvds.denonremote')

def turnOnDenon():
        urllib.urlopen("http://"+__addon__.getSetting("denonip")+"/MainZone/index.put.asp?cmd0=PutZone_OnOff%2FON")
        time.sleep(1)
        urllib.urlopen("http://"+__addon__.getSetting("denonip")+"/MainZone/index.put.asp?cmd0=PutZone_InputFunction%2F"+__addon__.getSetting("denoninput"))
        #print tn.read_eager()

def changeVolumeDenon(volume):
    if volume > 98:
        volume = 98
    elif volume < 0:
        volume = 0
    volume=volume-80

    if volume < 0:

        volumestr ='{:05}'.format(round(volume,1))
    elif volume >= 0:

        volumestr ='{:04}'.format(round(volume,1))

    
    urllib.urlopen("http://"+__addon__.getSetting("denonip")+"/MainZone/index.put.asp?cmd0=PutMasterVolumeSet/"+ volumestr )

    

class DenonWatcher(xbmc.Monitor):
    def __init__(self, *args, **kwargs):
        xbmc.Monitor.__init__(self)
                
    def onNotification(self, sender, method, data):
        if method == "Player.OnPlay":
            turnOnDenon()
        elif method == "Application.OnVolumeChanged":
            dataDecoded = json.loads(data)
            changeVolumeDenon(dataDecoded['volume'])
            
        
        

class PlayerWhichStartsDenon(xbmc.Player):
    def onPlayBackStarted(self):        
        urllib.urlopen("http://"+__addon__.getSetting("denonip")+"/MainZone/index.put.asp?cmd0=PutZone_OnOff%2FON")
        time.sleep(1)
        urllib.urlopen("http://"+__addon__.getSetting("denonip")+"/MainZone/index.put.asp?cmd0=PutZone_InputFunction%2FDVD")
        #print tn.read_eager()
        
#player = PlayerWhichStartsDenon()
monitor = DenonWatcher()

while not xbmc.abortRequested:
    xbmc.sleep(60000)



I haven't tested, but before I do, there was one issue that I can't solve. The issue is that when its in passthrough mode, I'm unable to change the volume. Is there a way to disable it, so I can change the volume while in passthrough?
Reply
#15
From looking around I see there are cec adapters, which can control volume. Anyone have an idea, if they work while in passthrough? If so, how do they allow volume change?
Reply

Logout Mark Read Team Forum Stats Members Help
Control Denon AVR via XBMC/evenghost/other2