Page 1 of 1

Using an XML file for feedback

Posted: Tue Oct 29, 2013 2:46 pm
by trevorst
I have thr HTTP commands for the Denon receiver line working (will post in Device section).
This method allows for multiple clients to connect and control the receiver and is what Denon uses in their ios remote.

However with this method the Denon returns an XML file for it's status, all the required info is there but how do you use it??
None of the usual regex techniques seem to work as there is a CR after every line.

Solved my own issue..
With the following snippet of the XML file.
<Power>
<value>STANDBY</value>
</Power>

Seems that the first CR is being ignored so I can stack the <Power> and ,<value> commands in the statement
<Power><value>(.*)
and it will return: STANDBY</value>, which I can parse with regex.

Re: Using an XML file for feedback

Posted: Wed Oct 30, 2013 4:44 am
by trevorst
Thought I had found the answer but it must be just an anomaly as I can't repeat it with any other statement.
Any help would be appreciated.
Here is the main portion of the XML that I want to extract data from:
<item>
<FriendlyName>
<value>DENON:[AVR-1913]</value>
</FriendlyName>
<Power>
<value>STANDBY</value>
</Power>
<ZonePower>
<value>OFF</value>
</ZonePower>
<RenameZone>
<value>Family Rm</value>
</RenameZone>
<TopMenuLink>
<value>ON</value>
</TopMenuLink>
<ModelId>
<value>3</value>
</ModelId>
<SalesArea>
<value>0</value>
</SalesArea>
<InputFuncSelect>
<value>Computer</value>
</InputFuncSelect>
<NetFuncSelect>
<value>PANDORA</value>
</NetFuncSelect>
<selectSurround>
<value>MULTI CH STEREO</value>
</selectSurround>
<VolumeDisplay>
<value>Relative</value>
</VolumeDisplay>
<MasterVolume>
<value>-45.0</value>
</MasterVolume>
<Mute>
<value>off</value>
</Mute>

Re: Using an XML file for feedback

Posted: Wed Oct 30, 2013 9:11 am
by DemoPad
Are you sure each line has a CR (\x0D) at the end of it, it might just be a new line (\x0A) in which case you should use that for the response terminator. Viewing the response data in Hercules (with hex characters on) will reveal.

Re: Using an XML file for feedback

Posted: Wed Oct 30, 2013 4:13 pm
by trevorst
For some reason I can not get Hercules to work on the Denon via HTTP it connects fine to port 80 but I get no response from the query..

I have tried both the standard web input
"/goform/formMainZone_MainZoneXml.xml" ,
and the Demopad format,
"GET /goform/formMainZone_MainZoneXml.xml HTTP/1.0\x0D\x0A"

Each line appears to have both, 0D 0A at the end when viewing the XML file in a hex viewer.

I have tried using both \x0A and \x0D\x0A as terminators in addition to \x0D already.

The only one I get a reply from is \0D using the following statement:
"<Power><value>([0-9a-zA-Z-:]*)"
This returns Standby or On depending on the Power situation.

However the following 2 statements do not populate the labels.
"<InputFuncSelect><value>([0-9a-zA-Z-:]*)
"<selectSurround><value>([0-9a-zA-Z-:]*)

Thanks for helping.

Re: Using an XML file for feedback

Posted: Fri Nov 01, 2013 12:41 am
by trevorst
With the help of Demopad support I now have feedback working.

To make it work I used ""<InputFuncSelect><value>([0-9a-zA-Z-:]*)" as the input and </value> as the terminator.

Demopad support are the best!!!

Re: Using an XML file for feedback

Posted: Fri Jul 24, 2015 11:25 am
by flinke flasche
Hi trevorst,

can you post screenshots from your working feedback and device?