Page 1 of 1

Creating a user-profiles.xml file

PostPosted: Sat Aug 24, 2019 11:15 am
by Paul C
At long last I have got around to creating a user-profiles.xml file (which is maintained during an installation update) so that I do not have to re-edit the profiles.xml to re-add my own profiles each time.
I cannot find a page that describes this. Perhaps someone can direct me if one exists.

1. Presumably the user-profiles.xml goes in the same "serviio/config" directory as the profiles.xml ?

2. What is the format of the user-profiles.xml file ?
Does it need the same header/trailer as in the profiles.xml file or just the profile ? i.e.

<?xml version="1.0" encoding="UTF-8"?>
<Profiles version="1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://www.serviio.org/xsd/profiles/v/2.0/Profiles.xsd">


<!-- New Generic HD profile -->
etc. etc.
<!-- End of Generic HD profile -->


</Profiles>

Re: Creating a user-profiles.xml file

PostPosted: Sat Aug 24, 2019 5:36 pm
by atc98092
That is correct for both questions. My test profile file still says /v/1.10, but I haven't tried it with Serviio 2.0. That line might need to say /v/2.0/ as yours does.

Re: Creating a user-profiles.xml file

PostPosted: Sun Aug 25, 2019 9:55 am
by Paul C
atc98092 wrote:That is correct for both questions.

Thanks Dan. All seems to be working OK. Now all I want is a user-based vmoptions feature and upgrades will be sorted.

Re: Creating a user-profiles.xml file

PostPosted: Sun Sep 15, 2019 12:50 pm
by DenyAll
You can minimise the header - only the <Profiles version="1.0"> bit is needed. ie.

  Code:
<Profiles version="1.0">

<!-- New Generic HD profile -->
etc. etc.
<!-- End of Generic HD profile -->

</Profiles>
That way you dont have to update the headaer next version release.

Re: Creating a user-profiles.xml file

PostPosted: Mon Sep 16, 2019 10:47 pm
by Paul C
DenyAll wrote:You can minimise the header - only the <Profiles version="1.0"> bit is needed. ie.

  Code:
<Profiles version="1.0">

<!-- New Generic HD profile -->
etc. etc.
<!-- End of Generic HD profile -->

</Profiles>
That way you dont have to update the headaer next version release.

Thanks - will make the change.
Especially as the idea was not having to re-apply on new releases.

Re: Creating a user-profiles.xml file

PostPosted: Mon Sep 16, 2019 10:51 pm
by atc98092
For what it's worth, I just tested a new user profile file with the 1.10 header on my 2.0 server, and it still worked fine. Not certain if it will matter down the road, though.

The only reason that 1.10 header is still there is because I forgot to remove it... :lol:

Re: Creating a user-profiles.xml file

PostPosted: Sat Sep 21, 2019 11:31 pm
by Paul C
Having set-up my User Profile file (to avoid having to update the profiles on a Serviio update) I thought I had cracked it !
Wrong.
A glitch on my Virgin Media router caused them to reboot it.
This caused some of my mobile devices (laptops/tablets) to acquire a different IP address (adopting the Serviio default profile not the "Generic HD Profile" user profile I had set up).

Need a feature request to set a default profile other than the Serviio default profile.
(related to ability to recognise mac address).

Alternately include a Generic HD Profile in the Serviio profiles (as previously suggested).

Re: Creating a user-profiles.xml file

PostPosted: Sun Sep 22, 2019 1:50 am
by DenyAll
Setting a default other than the Default Generic Profile wouldn't be a good idea. The default profile sets up a lot of the common environment (mime types etc) that are then inherited by all other profiles. For someone to create their own default they have to emulate what was in the Generic Profile does, which would largely negate any benefit of creating your own.

I remember asking for the ability to enrol renderer devices based on MAC address when I first started with Serviio, but it never got on the development program.

What I do now is both:
  • reserve an IP address for each fixed renderer (TV's, etc) and for my Serviio server, within my router. This wouldn't help when your router was rebooted (factory restore I presume) unless you also save the config of the router - which I also do - and restore it after the reboot; and
  • wherever possible use the <Detection> block within the profile to auto-detect and assign the profile to the renderer. This works irrespective of the IP address
Note - I don't reserve laptops and PC renderers as these should be fine on the Generic Profile. What applications are you using.

Re: Creating a user-profiles.xml file

PostPosted: Tue Sep 24, 2019 10:33 am
by Paul C
DenyAll wrote: What applications are you using.

I also have fixed IPs for my network, server, renderers etc.

The issue is with my Kindle 7 HDX which runs BubbleUPnP control app to control my media (and it is not practical to have a fixed address for this).
It is the only device that shows my artwork as none of the renderers have a picture screen.

Something MAC related would do the trick - I remember the original requests and I think there was a technical issue.

Re "wherever possible use the <Detection> block within the profile to auto-detect and assign the profile to the renderer. This works irrespective of the IP address"
Can you please give me a bit more information about how you do this as it would be helpful?

A final thought - if my device loses the profile again then surely it has lost any detection changes as these will not be in the default DLNA profile. Back to square one !

Re: Creating a user-profiles.xml file

PostPosted: Sat Oct 05, 2019 7:18 am
by DenyAll
Re "wherever possible use the <Detection> block within the profile to auto-detect and assign the profile to the renderer. This works irrespective of the IP address"
Can you please give me a bit more information about how you do this as it would be helpful?

See https://www.serviio.org/index.php?optio ... icle&id=16.

Firstly and importantly, for the detection block to work, the renderer must tell the server something about itself (via UPnP or HTTP). Some renders do, some don't (mainly apps) and some do but they are use a generic name/identifier which is useless.

The detection block within a profile is used when a new device is found (or in your case where an existing device changes IP address) to auto-assign that profile to your device. In your case, if your custom profile had a detection block that works, then your Kindle 7 will be assigned to that profile automatically.

A detection block appears near the top of a profile and looks like
  Code:
        <Detection>
            <UPnPSearch>
                <FriendlyName>Freindly Name</FriendlyName>
                <ModelName>Model</ModelName>
                <ModelNumber>ModelNumber</ModelNumber>
            </UPnPSearch>
         <HttpHeaders>
            <User-Agent>User_Agent</User-Agent>
         </HttpHeaders>
      </Detection>
A block would typically contain one or more of these elements (doesent need them all, just what's needed for unique match - Freindly Name, Model, Model Number, or User_agent. I often get by with justthe freindly name within a UPnPSearch block).

Have a look in profiles.xml - theres plenty of examples in there for various existing profiles. Note that you can make use of regular expressions to match on wildcards and the like within your detection block. It does take some playing with but it is a very powerful way to assign profiles to devices.

To find what string to put into the detection block use Intel UPnP tools and run Device Spy (with your Kindle running and connected to your network). IF the Kindle identifies itself then you will see it under the Devices:

Capture.JPG
Capture.JPG (71.19 KiB) Viewed 30765 times
See how you go.

A final thought - if my device loses the profile again then surely it has lost any detection changes as these will not be in the default DLNA profile. Back to square one !
Nope - the device will re-acquire the correct profile via the detection block. On detecting a new device Serviio will check all detection blocks looking for a match, and if all works as it should, will assign your profile to the device.

Re: Creating a user-profiles.xml file

PostPosted: Tue Oct 08, 2019 8:22 pm
by Paul C
DenyAll wrote:
Re "wherever possible use the <Detection> block within the profile to auto-detect and assign the profile to the renderer.

DenyAll - Many thanks for your comprehensive post.
I will give this a try and hopefully it will solve my issue.

Re: Creating a user-profiles.xml file

PostPosted: Sat Oct 12, 2019 1:07 pm
by Paul C
Paul C wrote:
DenyAll wrote:
Re "wherever possible use the <Detection> block within the profile to auto-detect and assign the profile to the renderer.

If a device is set to the default Generic DLNA profile on the Serviio status page
and the user-profile has a detection block.
Am I correct that the detected profile will be applied but that the profile on the Serviio status page will remain unchanged?

Re: Creating a user-profiles.xml file

PostPosted: Sat Oct 12, 2019 3:53 pm
by atc98092
Paul C wrote:If a device is set to the default Generic DLNA profile on the Serviio status page
and the user-profile has a detection block.
Am I correct that the detected profile will be applied but that the profile on the Serviio status page will remain unchanged?


Paul, I don't believe so. The detection block is only used when Serviio first sees a new player and is searching for the correct profile to assign. Once a profile has been assigned, that's what gets used, regardless of any profile updates that might now match the device. You would have to manually change the assigned profile in the console. As long as the IP address remains the same, profiles do not change assignments.

Re: Creating a user-profiles.xml file

PostPosted: Sat Oct 12, 2019 5:31 pm
by Paul C
DenyAll wrote:
Re "wherever possible use the <Detection> block within the profile to auto-detect and assign the profile to the renderer.

Not getting on too well.

Is it possible to specify detection of multiple devices in the same profile?
I tried multiple <Detection> blocks - that failed to load.
I then tried multiple <UPnPSearch> blocks within one detection block - failed to load.
Then put several items within one <UPnPSearch> block - but that failed too.

Also which wildcards and formats can be used?

Re: Creating a user-profiles.xml file

PostPosted: Sat Oct 12, 2019 11:06 pm
by DenyAll
Is it possible to specify detection of multiple devices in the same profile?
By using regular expressions you can match to multiple strings.
Also which wildcards and formats can be used?
Regular expressions. I must admit I have to Google instructions everytime I use it. Try https://www.regular-expressions.info/

What are you tring to do. Why do you need to match two/more devices to the one profile? If you post the Device Spy results we may be able to help.

Re: Creating a user-profiles.xml file

PostPosted: Mon Oct 14, 2019 3:43 pm
by Paul C
DenyAll wrote:What are you tring to do. Why do you need to match two/more devices to the one profile? If you post the Device Spy results we may be able to help.

I did download UPnP tools and Device spy (as you suggested).
The results for three devices are attached.

I am trying to do two things:-

1. Initially I was trying the ensure that my "Generic HD Profile" in my user-profiles.xml file is used by Kindle 7 HDX which runs BubbleUpnP and does not have a fixed IP.
Hence my original suggestion of an alternative default profile.
The only change in the generic profile was ThumbNail HD not DLNA for quality artwork.

2. Additionally I added an audio transcode in <OnlineTranscoding> to detect ogg files (which would not play) and match them with LPCM which works fine.
Hence Denon and AirstreamPro devices.

My last <Detection> attempt that failed was (I tried several other options)
<Detection>
<UPnPSearch>
<Manufacturer>Bubblesoft</Manufacturer>
<Manufacturer>Denon</Manufacturer>
<Manufacturer>NEET</Manufacturer>
</UPnPSearch>
</Detection>

It validates with one <Manufacturer> line but not sure yet if it "works".
Maybe I need to create 3 individual profiles?

Re: Creating a user-profiles.xml file

PostPosted: Mon Oct 21, 2019 12:14 pm
by Paul C
I created 3 different profiles in user-profiles.xml with one detection in each
1.
<Detection>
<UPnPSearch>
<Manufacturer>Bubblesoft</Manufacturer>
</UPnPSearch>
</Detection>
------------------------------
2.
<Detection>
<UPnPSearch>
<Manufacturer>Denon</Manufacturer>
<Model Number>730</Model Number> - including this line fails validation?
</UPnPSearch>
</Detection>
--------------------------------
3.
<Detection>
<UPnPSearch>
<Manufacturer>NEET</Manufacturer>
<Model Number>NAS2POR</Model Number> - including this line fails validation?
</UPnPSearch>
</Detection>
-----------------------------------

It has passed console validation after a couple of earlier errors the reason for which was unclear - Is it working? - Have to wait and see.
This is all a bit OTT and Serviio configuration needs to be much simpler - to help the user not able to do this sort of thing.

Update - Set the device profile back to the DLNA profile and stopped/started the server so it could "detect". Failed - shows rubbish artwork. !!!!!!

Re: Creating a user-profiles.xml file

PostPosted: Tue Oct 22, 2019 5:17 am
by DenyAll
Must admit Ive never tried a match based just on Manufaturer or Model Number. Have you tried using Freindly Name (which I've had success with).

To add multiple Freindly Name's to the one profile you will need to use a Regular Expression using its "OR" capability and grouping capabilities - something like (remembering I'm a novice at Regular Expressions):

    <FriendlyName>(Air Stream Pro)|(Dennon DNP-730AE)I(Bubble UPnP)</FriendlyName>
might work, you'd have to play with it. Remember to restart your server after changing profiles.

ps. <ModelNumber> not <Model Number>