It's Json data formatted. For sending data sets instead of single variables.
What your wanting to do would basically just involve having a side plugin that has a simpler webserver built in. Then build in whatever communication is needed between the Marantz/Denon plugin. Then everything could be set to autoload whatever commands are need on the web-ui plugin. Then the user could configure the UI to there liking from the eg config.
The WebUi and Android app have no problem communicating when a telnet connection is active. The http api still functions normally too. So they must be using REST commands for everything. But there are alot of options in the web-ui that i haven't seen documented anywhere for the REST api. I can send you a copy of the javascript that runs on the default web-UI if you want a closer look. I know there's an index of all available AVR's in there too that reference the modelId number.
EDIT: This is from the default web-ui javascript . It's parsing the xml for the modelId then appending the available inputs for each model. These are the basic lists that would be needed.
Code: Select all
function parseFuncXml(data) {
var selectSource = data.getValue("InputFuncSelect");
var rename = data.find("RenameSource value");
var source = data.find("InputFuncList value");
//Source Area
if(parseInt( data.getValue( "ModelId" ) ) == 1){ // EnModelAVRX10
$("div#S3").css("display", "block");
appendSource($("div#S3 div.btn31"), $("<div>CBL/SAT</div>"), "SAT/CBL");
appendSource($("div#S3 div.btn32"), $("<div>DVD/Blu-ray</div>"), "DVD");
appendSource($("div#S3 div.btn33"), $("<div>Blu-ray</div>"), "BD");
appendSource($("div#S3 div.btn34"), $("<div>Game</div>"), "GAME");
appendSource($("div#S3 div.btn35"), $("<div>AUX</div>"), "AUX1");
appendSource($("div#S3 div.btn36"), $("<div>Media Player</div>"), "MPLAY");
appendSource($("div#S3 div.btn37"), $("<div>iPod/USB</div>"), "USB/IPOD");
appendSource($("div#S3 div.btn38"), $("<div>TV Audio</div>"), "TV");
appendSource($("div#S3 div.btn39"), $("<div>Tuner</div>"), "TUNER");
appendSource($("div#S3 div.btn310"), $("<div>Online Music</div>"), "NETHOME");
appendSource($("div#S3 div.btn311"), $("<div>Bluetooth</div>"), "BT");
appendSource($("div#S3 div.btn312"), $("<div>Internet Radio</div>"), "IRP");
$("div#S3 div.btn313").css("display", "none");
$("div#S3 div.btn314").css("display", "none");
$("div#S3 div.btn315").css("display", "none");
}else if ((parseInt( data.getValue( "ModelId" ) ) == 2) || // EnModelAVRX20
(parseInt( data.getValue( "ModelId" ) ) == 3) || // EnModelAVRX30
(parseInt( data.getValue( "ModelId" ) ) == 7) || // EnModelNR16
(parseInt( data.getValue( "ModelId" ) ) == 8)){ // EnModelSR50
$("div#S3").css("display", "block");
appendSource($("div#S3 div.btn31"), $("<div>CBL/SAT</div>"), "SAT/CBL");
appendSource($("div#S3 div.btn32"), $("<div>DVD</div>"), "DVD");
appendSource($("div#S3 div.btn33"), $("<div>Blu-ray</div>"), "BD");
appendSource($("div#S3 div.btn34"), $("<div>Game</div>"), "GAME");
appendSource($("div#S3 div.btn35"), $("<div>AUX1</div>"), "AUX1");
appendSource($("div#S3 div.btn36"), $("<div>Media Player</div>"), "MPLAY");
appendSource($("div#S3 div.btn37"), $("<div>TV Audio</div>"), "TV");
appendSource($("div#S3 div.btn38"), $("<div>AUX2</div>"), "AUX2");
appendSource($("div#S3 div.btn39"), $("<div>Tuner</div>"), "TUNER");
appendSource($("div#S3 div.btn310"), $("<div>iPod/USB</div>"), "USB/IPOD");
appendSource($("div#S3 div.btn311"), $("<div>CD</div>"), "CD");
appendSource($("div#S3 div.btn312"), $("<div>Bluetooth</div>"), "BT");
appendSource($("div#S3 div.btn313"), $("<div>Online Music</div>"), "NETHOME");
appendSource($("div#S3 div.btn314"), $("<div>Media Server</div>"), "SERVER");
appendSource($("div#S3 div.btn315"), $("<div>Internet Radio</div>"), "IRP");
}else if(parseInt( data.getValue( "ModelId" ) ) == 9){ // EnModelSR60
$("div#S3").css("display", "block");
appendSource($("div#S3 div.btn31"), $("<div>CBL/SAT</div>"), "SAT/CBL");
appendSource($("div#S3 div.btn32"), $("<div>DVD</div>"), "DVD");
appendSource($("div#S3 div.btn33"), $("<div>Blu-ray</div>"), "BD");
appendSource($("div#S3 div.btn34"), $("<div>Game</div>"), "GAME");
appendSource($("div#S3 div.btn35"), $("<div>AUX1</div>"), "AUX1");
appendSource($("div#S3 div.btn36"), $("<div>Media Player</div>"), "MPLAY");
appendSource($("div#S3 div.btn37"), $("<div>TV Audio</div>"), "TV");
appendSource($("div#S3 div.btn38"), $("<div>AUX2</div>"), "AUX2");
appendSource($("div#S3 div.btn39"), $("<div>Tuner</div>"), "TUNER");
appendSource($("div#S3 div.btn310"), $("<div>iPod/USB</div>"), "USB/IPOD");
appendSource($("div#S3 div.btn311"), $("<div>CD</div>"), "CD");
appendSource($("div#S3 div.btn312"), $("<div>Bluetooth</div>"), "BT");
appendSource($("div#S3 div.btn313"), $("<div>Online Music</div>"), "NETHOME");
appendSource($("div#S3 div.btn314"), $("<div>Phono</div>"), "PHONO");
appendSource($("div#S3 div.btn315"), $("<div>Internet Radio</div>"), "IRP");
}else if((parseInt( data.getValue( "ModelId" ) ) == 4) || // EnModelAVRX40
(parseInt( data.getValue( "ModelId" ) ) == 5) || // EnModelAVRX50
(parseInt( data.getValue( "ModelId" ) ) == 6) || // EnModelAVRX70
(parseInt( data.getValue( "ModelId" ) ) == 10) || // EnModelSR70
(parseInt( data.getValue( "ModelId" ) ) == 11) || // EnModelAV77
(parseInt( data.getValue( "ModelId" ) ) == 12)){ // EnModelAV88
$("div#S4").css("display", "block");
appendSource($("div#S4 div.btn41"), $("<div>CBL/SAT</div>"), "SAT/CBL");
appendSource($("div#S4 div.btn42"), $("<div>DVD</div>"), "DVD");
appendSource($("div#S4 div.btn43"), $("<div>Media Player</div>"), "MPLAY");
appendSource($("div#S4 div.btn44"), $("<div>TV Audio</div>"), "TV");
appendSource($("div#S4 div.btn45"), $("<div>Blu-ray</div>"), "BD");
appendSource($("div#S4 div.btn46"), $("<div>AUX1</div>"), "AUX1");
if(parseInt( data.getValue( "ModelId" ) ) == 4){ // EnModelAVRX40
appendSource($("div#S4 div.btn47"), $("<div>Tuner</div>"), "TUNER");
}else{
if(parseInt( data.getValue( "SalesArea" ) ) == 0){ // NA
appendSource($("div#S4 div.btn47"), $("<div>HD Radio</div>"), "HDRADIO");
}else{
appendSource($("div#S4 div.btn47"), $("<div>Tuner</div>"), "TUNER");
}
}
appendSource($("div#S4 div.btn48"), $("<div>Bluetooth</div>"), "BT");
appendSource($("div#S4 div.btn49"), $("<div>Game</div>"), "GAME");
appendSource($("div#S4 div.btn410"), $("<div>AUX2</div>"), "AUX2");
appendSource($("div#S4 div.btn411"), $("<div>Phono</div>"), "PHONO");
appendSource($("div#S4 div.btn412"), $("<div>iPod/USB</div>"), "USB/IPOD");
appendSource($("div#S4 div.btn413"), $("<div>CD</div>"), "CD");
appendSource($("div#S4 div.btn414"), $("<div>Online Music</div>"), "NETHOME");
appendSource($("div#S4 div.btn415"), $("<div>Media Server</div>"), "SERVER");
appendSource($("div#S4 div.btn416"), $("<div>Internet Radio</div>"), "IRP");
if((parseInt( data.getValue( "ModelId" ) ) == 6) || // EnModelAVRX70
(parseInt( data.getValue( "ModelId" ) ) == 12)){ // EnModelAV88
//Additional Source
if (data.getValue("AddSourceDisplay") == "TRUE") {
$("div#AddSource").css("display", "block");
// Additioanl Source
var ListAddSource = $( "div#AddSource div.AddSourceLabel select" ).empty();
var opt = $( "<option/>" );
opt.html( "" ).attr( "value", "" );
ListAddSource.append( opt );
var opt = $( "<option/>" );
opt.html( "AUX3" ).attr( "value", "AUX3" );
ListAddSource.append( opt );
var opt = $( "<option/>" );
opt.html( "AUX4" ).attr( "value", "AUX4" );
ListAddSource.append( opt );
var opt = $( "<option/>" );
opt.html( "AUX5" ).attr( "value", "AUX5" );
ListAddSource.append( opt );
var opt = $( "<option/>" );
opt.html( "AUX6" ).attr( "value", "AUX6" );
ListAddSource.append( opt );
var opt = $( "<option/>" );
opt.html( "AUX7" ).attr( "value", "AUX7" );
ListAddSource.append( opt );
}
}
}
// Source Name
$("#source .RParamSource").html(selectSource);
// PlayerView
if(selectSource=="Online Music" || selectSource=="iPod/USB" || selectSource=="Bluetooth" ){
$("#source .btnPlayerView").html("<a href='../NetAudio/index.html'>PlayerView ></a>");
}else if(selectSource=="HD Radio"){
$("#source .btnPlayerView").html("<a href='../Tuner/HDRADIO/index.html'>PlayerView ></a>");
}else if(selectSource=="Tuner"){
$("#source .btnPlayerView").html("<a href='../Tuner/TUNER/index.html'>PlayerView ></a>");
}else{
$("#source .btnPlayerView").html(" ");
}
if (data.getValue("BrandId") == "DENON_MODEL") {
$("div#left").css("background-color", "#0e1033");
//LOGO
$("div#menuItemLogo").html("<img src= ../img/denon_Logo.gif>");
//Quick Select
$("#QuickSelectLabel .RParamQuickSelect").html("Quick Select");
$("div#QuickSelect").css("visibility", "visible");
}else{
$("div#left").css("background-color", "#b3b3b3");
//LOGO
$("div#menuItemLogo").html("<img src= ../img/marantz_Logo.png>");
//Smart Select
$("#QuickSelectLabel .RParamQuickSelect").html("Smart Select");
$("div#QuickSelect").css("visibility", "visible");
}
}
function parseSurroundXml(data) {
var selectSurround = data.getValue("selectSurround");
// Source Name
$("#SurroundLabel .RParamSoundMode").html(selectSurround);
}
/**
* "/goform/formMainZone_MainZoneXml.xml" ´┐¢´┐¢´┐¢p´┐¢[´┐¢X´┐¢´┐¢´┐¢´┐¢html´┐¢´┐¢´┐¢\´┐¢z´┐¢´┐¢´┐¢´┐¢BVolume´┐¢´┐¢´┐¢´┐¢
*
* @since 2009/1/7
* @param {XMLDocument} data ./index.html.xml.asp ´┐¢╠ôÃé¦ì´┐¢´┐¢¦î´┐¢´┐¢´┐¢
*/
function parseVolumeXml(data) {
var bar;
var bMute = data.getValue("Mute") != "off";
// Source Name
if (bMute) {
$("#VolumeLabel .RParamVolume").html("MUTING On");
} else {
$("#VolumeLabel .RParamVolume").html(data.getVolume());
}
}