FAQ  •  Register  •  Login

Relax XML case-sensitivity for device detection

<<

parish

Serviio newbie

Posts: 18

Joined: Sat Feb 26, 2011 5:00 pm

Post Fri Apr 05, 2013 12:24 pm

Relax XML case-sensitivity for device detection

I'm not sure whether this is a bug or not but since it seems that Serviio is the only app and device I can find affected I suspect it is...

I have a Humax PVR which my TV, Blu-ray, and numerous media player apps all identify as HDR-FOX T2 Media Server but Serviio always reports it as Unrecognized Device

I created a profile for it:

  Code:
<Profile name="Humax STB/PVR" id="humax" extendsProfileId="viera2010">
    <Detection>
        <UPnPSearch>
            <FriendlyName>HDR-FOX T2 Media Server</FriendlyName>
        </UPnPSearch>
    </Detection>
</Profile>


but no matter what I do - <ModelName> etc. - I can't get anything other than Unrecognized Device

Finally, I installed upnp-inspector and probed the Humax which revealed the names it reports:
  Code:
<friendlyName>HDR-FOX T2 Media Server</friendlyName>
<manufacturer>HUMAX</manufacturer>
<manufacturerURL>www.humaxdigital.com</manufacturerURL>
<modelDescription>Humax Media Server</modelDescription>
<modelName>HDR-FOX T2</modelName>
<modelNumber>Undefine</modelNumber>


It uses lowerCamelCase for the XML tags, not UpperCamelCase which serviio appears to insist on. I tried using this in profiles.xml but Serviio then barfs with this:

  Code:
2013-04-05 00:36:16,808 ERROR [XmlUtils] XML Profiles.xsd didn't pass validation, reason: cvc-complex-type.2.4.a: Invalid content was found starting with element 'friendlyName'. One of '{FriendlyName, ModelName, ModelNumber, Manufacturer, ProductNumber, Server}' is expected.
2013-04-05 00:36:16,809 ERROR [MediaServer] An unexpected error occured. Ending the application. Message: org.serviio.profile.ProfilesDefinitionException: Profiles XML file is not valid (according to the schema). Check the log.


So, Serviio is being overly strict with regards case in XML tags. The fact that most other apps/devices seem to be case-insensitive with XML tags suggest that there may be more devices than the Humax which don't use UpperCamelCase for XML tags, at least in the <device> section.

I've attached the relevant files.
Attachments
6cd43bc1-536a-4755-8a47-000378B8BF67.zip
profiles.xml, serviio.log and output from upnp-inspector
(14.22 KiB) Downloaded 214 times
<<

zip

User avatar

Serviio developer / Site Admin

Posts: 17215

Joined: Sat Oct 24, 2009 12:24 pm

Location: London, UK

Post Fri Apr 05, 2013 12:43 pm

Re: Relax XML case-sensitivity for device detection

The profiles XML has it's own syntax and it not related directly to the devide descriptor XML. It does the friendlyName and FriendlyName programmatically.

Can you post detailed log he application startup (until the point when the device is recognized as Unrecognized)? Also make sure you first remove it from the device list in the console.
<<

parish

Serviio newbie

Posts: 18

Joined: Sat Feb 26, 2011 5:00 pm

Post Fri Apr 05, 2013 4:21 pm

Re: Relax XML case-sensitivity for device detection

zip wrote:The profiles XML has it's own syntax and it not related directly to the devide descriptor XML. It does the friendlyName and FriendlyName programmatically.

Can you post detailed log he application startup (until the point when the device is recognized as Unrecognized)? Also make sure you first remove it from the device list in the console.


Debug log file attached - renamed to avoid confusion. The Humax's IP address is 192.168.1.124
Attachments
parish_humax_serviio.log
(62.37 KiB) Downloaded 309 times
<<

zip

User avatar

Serviio developer / Site Admin

Posts: 17215

Joined: Sat Oct 24, 2009 12:24 pm

Location: London, UK

Post Fri Apr 05, 2013 10:56 pm

Re: Relax XML case-sensitivity for device detection

It looks like the device doesn't support UPnP search. Does it appear in Device Spy? You said you used upnpinspector, what was the device type you found? It looks like media server, not a renderer.
<<

parish

Serviio newbie

Posts: 18

Joined: Sat Feb 26, 2011 5:00 pm

Post Sat Apr 06, 2013 4:00 am

Re: Relax XML case-sensitivity for device detection

zip wrote:It looks like the device doesn't support UPnP search. Does it appear in Device Spy? You said you used upnpinspector, what was the device type you found? It looks like media server, not a renderer.


Yes, it does appear in Device Spy. The device type in upnp-inspector is MediaServer.

But isn't it both? It is indeed a media server, but it can also play content from other servers, e.g. Serviio, which means it's a renderer as well doesn't it?
<<

zip

User avatar

Serviio developer / Site Admin

Posts: 17215

Joined: Sat Oct 24, 2009 12:24 pm

Location: London, UK

Post Sat Apr 06, 2013 5:44 pm

Re: Relax XML case-sensitivity for device detection

Normally it should list 2 devices then, server and renderer. Serviio only looks for renderers, so your config will not work. You can still achieve detection by matching http headers, eg user agent, if its value is reasonably unique

Return to Feature requests

Who is online

Users browsing this forum: No registered users and 72 guests

Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software for PTF.