Post Tue May 12, 2015 12:18 pm

run multiple instances of Serviio (patch suggestion)

When using Serviio with controller e.g. BubbleUPnP, one must assign the same profile to controller as target renderer, which makes it difficult to use controller with multiple rendereres.
Running multiple instances of Serviio can solve this problem (each instance having different profile defined for controller).
I succeeded running the second instance of Serviio with the following changes (note I'm talking about complete separate copy of Serviio in different directory).
In summary I changed various listening ports and upnp device uuid for the second instance:
- change webserver_port in serviio.properties (inside serviio.jar)
- had to change the following java files (not sure if I can post complete sources here):

org\serviio\ApplicationInstanceManager.java
org\serviio\restlet\RestletServer.java
when creating listening socket, instead of using hardcoded port use
  Code:
   int port = ApplicationSettings.getIntegerProperty(<port name>);
   if (port <=0 ) port = <default port>;

(add these port properties to serviio.properties)

in org\serviio\upnp\Device.java
  Code:
   md5.update("Serviio".getBytes());

replace "Serviio" to property read from serviio.properties

- (cosmetic) in config\profiles.xml, change FriendlyName under Profile 1, DeviceDescription.

That's all, running second instance for few days now, with different profile set for controller.