Page 1 of 3

Plugin: Web Interface for headless UMS

Posted: Tue Jun 04, 2013 6:11 am
by ntrp
Hi everyone,
this is a plugin I have created and it is based on jQuery (client) + JETTY Embedded (server). It enables control of UniversalMediaServer and/or Ps3MediaServer from a web browser and includes a wide set of features (the server listens on port 8083, can be configured in UMS.conf, parameter name "webinterface.port"):

- Web Feed setting
- Proxy setting, saving and activation
- PMS settings (render settings still missing)
- Realtime Server log tail (1 sec polling)

The project is still in "super beta" so don't expect miracles but it works well for me. You can find the project page at https://bitbucket.org/ntrp/ums-web-interface, please provide feedback so I can keep upgrading functionalities and fix eventual bugs. I don't know how much time I will have but I will give my best.

A Prebuilt Jar is available in the downloads section, soon I will create a wiki explaining the functionalities and how to configure them.

EDIT: the plugin has been completely rewritten using Socket.io and AngularJS on the frontend and Netty-Socket.io on the backend. It has been tested with UMS 4.3.1 and ti works but it is still experimental, you can find more info on the already provided website https://bitbucket.org/ntrp/ums-web-interface. There is a downloadable jar compiled in java 1.6 for compatibility and on the wiki page you can find instructions to compile it yourself. As before I don't have much time to update it and I will work on it when I can so don't expect too much :D.

Re: Plugin: Web Interface for headless UMS

Posted: Tue Jun 04, 2013 6:14 pm
by Optimus_prime
Wow ntrp, that works great. I'll keep testing it and let you know of any problems. In you notes you may want to mention the fact users need to launch a web browser an type UMS's ipaddress with port, for example 192.168.0.2:8083 to get it to work, i know it's simple for most people but some might not know.

Re: Plugin: Web Interface for headless UMS

Posted: Tue Jun 04, 2013 7:53 pm
by ntrp
Thanks for the feedback, I added a usage note in the installation section of the wiki.

Re: Plugin: Web Interface for headless UMS

Posted: Sat Jul 20, 2013 12:00 pm
by DeFlanko
if you ISP allows for it...

Port fwd 80 (external) to 8083 (internal) port to on your router. (but i used 8080 instead)

Next, go get your self a Dyndns Pro account...

My website link now shows this feature!

http://deflanko.dyndns.tv:8080

Re: Plugin: Web Interface for headless UMS

Posted: Sat Jul 20, 2013 12:03 pm
by DeFlanko
a new tab after shares called "Media List"

and have it use HTML5 features to stream the videos would be epic.

i feel this its a prime candidate!

Re: Plugin: Web Interface for headless UMS

Posted: Sun Jul 21, 2013 7:12 am
by Wolfgan
Amazing job ntrp. Thx for sharing it!

Re: Plugin: Web Interface for headless UMS

Posted: Thu Aug 15, 2013 12:10 pm
by DeFlanko
NTRP,

I think there is a java error while running UMS as a service and while running it normally at the same time with the Web Interface plugin.
ums_dbg.zip
(15.99 KiB) Downloaded 1026 times

Code: Select all

08-14 17:06:48  FAILED ServerConnector@145d8e{HTTP/1.1}{0.0.0.0:8083}: java.net.BindException: Address already in use: bind
java.net.BindException: Address already in use: bind
	at sun.nio.ch.Net.bind0(Native Method) ~[na:1.7.0_25]
	at sun.nio.ch.Net.bind(Unknown Source) ~[na:1.7.0_25]
	at sun.nio.ch.Net.bind(Unknown Source) ~[na:1.7.0_25]
	at sun.nio.ch.ServerSocketChannelImpl.bind(Unknown Source) ~[na:1.7.0_25]
	at sun.nio.ch.ServerSocketAdaptor.bind(Unknown Source) ~[na:1.7.0_25]
	at org.eclipse.jetty.server.ServerConnector.open(ServerConnector.java:227) ~[ums-webinterface-1.0.0-a1.jar:na]
	at org.eclipse.jetty.server.AbstractNetworkConnector.doStart(AbstractNetworkConnector.java:80) ~[ums-webinterface-1.0.0-a1.jar:na]
	at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:69) [ums-webinterface-1.0.0-a1.jar:na]
	at org.eclipse.jetty.server.Server.doStart(Server.java:303) ~[na:na]
	at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:69) [ums-webinterface-1.0.0-a1.jar:na]
	at org.qantic.umsplugin.WebInterface.<init>(WebInterface.java:67) ~[ums-webinterface-1.0.0-a1.jar:na]
	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) ~[na:1.7.0_25]
	at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source) ~[na:1.7.0_25]
	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source) ~[na:1.7.0_25]
	at java.lang.reflect.Constructor.newInstance(Unknown Source) ~[na:1.7.0_25]
	at java.lang.Class.newInstance(Unknown Source) ~[na:1.7.0_25]
	at net.pms.external.ExternalFactory.instantiateEarlyListeners(ExternalFactory.java:419) ~[ums.jar:2.6.5]
	at net.pms.external.ExternalFactory.lookup(ExternalFactory.java:399) ~[ums.jar:2.6.5]
	at net.pms.PMS.init(PMS.java:474) ~[ums.jar:2.6.5]
	at net.pms.PMS.createInstance(PMS.java:853) ~[ums.jar:2.6.5]
	at net.pms.PMS.main(PMS.java:940) ~[ums.jar:2.6.5]
08-14 17:06:48  FAILED org.eclipse.jetty.server.Server@1ba8c36: java.net.BindException: Address already in use: bind
java.net.BindException: Address already in use: bind
	at sun.nio.ch.Net.bind0(Native Method) ~[na:1.7.0_25]
	at sun.nio.ch.Net.bind(Unknown Source) ~[na:1.7.0_25]
	at sun.nio.ch.Net.bind(Unknown Source) ~[na:1.7.0_25]
	at sun.nio.ch.ServerSocketChannelImpl.bind(Unknown Source) ~[na:1.7.0_25]
	at sun.nio.ch.ServerSocketAdaptor.bind(Unknown Source) ~[na:1.7.0_25]
	at org.eclipse.jetty.server.ServerConnector.open(ServerConnector.java:227) ~[na:na]
	at org.eclipse.jetty.server.AbstractNetworkConnector.doStart(AbstractNetworkConnector.java:80) ~[na:na]
	at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:69) ~[na:na]
	at org.eclipse.jetty.server.Server.doStart(Server.java:303) ~[na:na]
	at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:69) ~[na:na]
	at org.qantic.umsplugin.WebInterface.<init>(WebInterface.java:67) ~[na:na]
	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) ~[na:1.7.0_25]
	at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source) ~[na:1.7.0_25]
	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source) ~[na:1.7.0_25]
	at java.lang.reflect.Constructor.newInstance(Unknown Source) ~[na:1.7.0_25]
	at java.lang.Class.newInstance(Unknown Source) ~[na:1.7.0_25]
	at net.pms.external.ExternalFactory.instantiateEarlyListeners(ExternalFactory.java:419) ~[ums.jar:2.6.5]
	at net.pms.external.ExternalFactory.lookup(ExternalFactory.java:399) ~[ums.jar:2.6.5]
	at net.pms.PMS.init(PMS.java:474) ~[ums.jar:2.6.5]
	at net.pms.PMS.createInstance(PMS.java:853) ~[ums.jar:2.6.5]
	at net.pms.PMS.main(PMS.java:940) ~[ums.jar:2.6.5]
08-14 17:06:48  java.net.BindException: Address already in use: bind
08-14 17:06:48  	at sun.nio.ch.Net.bind0(Native Method)
08-14 17:06:48  	at sun.nio.ch.Net.bind(Unknown Source)
08-14 17:06:48  	at sun.nio.ch.Net.bind(Unknown Source)
08-14 17:06:48  	at sun.nio.ch.ServerSocketChannelImpl.bind(Unknown Source)
08-14 17:06:48  	at sun.nio.ch.ServerSocketAdaptor.bind(Unknown Source)
08-14 17:06:48  	at org.eclipse.jetty.server.ServerConnector.open(ServerConnector.java:227)
08-14 17:06:48  	at org.eclipse.jetty.server.AbstractNetworkConnector.doStart(AbstractNetworkConnector.java:80)
08-14 17:06:48  	at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:69)
08-14 17:06:48  	at org.eclipse.jetty.server.Server.doStart(Server.java:303)
08-14 17:06:48  	at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:69)
08-14 17:06:48  	at org.qantic.umsplugin.WebInterface.<init>(WebInterface.java:67)
08-14 17:06:48  	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
08-14 17:06:48  	at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
08-14 17:06:48  	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
08-14 17:06:48  	at java.lang.reflect.Constructor.newInstance(Unknown Source)
08-14 17:06:48  	at java.lang.Class.newInstance(Unknown Source)
08-14 17:06:48  	at net.pms.external.ExternalFactory.instantiateEarlyListeners(ExternalFactory.java:419)
08-14 17:06:48  	at net.pms.external.ExternalFactory.lookup(ExternalFactory.java:399)
08-14 17:06:48  	at net.pms.PMS.init(PMS.java:474)
08-14 17:06:48  	at net.pms.PMS.createInstance(PMS.java:853)
08-14 17:06:48  	at net.pms.PMS.main(PMS.java:940)

Re: Plugin: Web Interface for headless UMS

Posted: Sat Aug 17, 2013 1:48 am
by ntrp
DeFlanko wrote:NTRP,

I think there is a java error while running UMS as a service and while running it normally at the same time with the Web Interface plugin.
ums_dbg.zip

Code: Select all

08-14 17:06:48  FAILED ServerConnector@145d8e{HTTP/1.1}{0.0.0.0:8083}: java.net.BindException: Address already in use: bind
java.net.BindException: Address already in use: bind
	at sun.nio.ch.Net.bind0(Native Method) ~[na:1.7.0_25]
	at sun.nio.ch.Net.bind(Unknown Source) ~[na:1.7.0_25]
	at sun.nio.ch.Net.bind(Unknown Source) ~[na:1.7.0_25]
	at sun.nio.ch.ServerSocketChannelImpl.bind(Unknown Source) ~[na:1.7.0_25]
	at sun.nio.ch.ServerSocketAdaptor.bind(Unknown Source) ~[na:1.7.0_25]
	at org.eclipse.jetty.server.ServerConnector.open(ServerConnector.java:227) ~[ums-webinterface-1.0.0-a1.jar:na]
	at org.eclipse.jetty.server.AbstractNetworkConnector.doStart(AbstractNetworkConnector.java:80) ~[ums-webinterface-1.0.0-a1.jar:na]
	at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:69) [ums-webinterface-1.0.0-a1.jar:na]
	at org.eclipse.jetty.server.Server.doStart(Server.java:303) ~[na:na]
	at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:69) [ums-webinterface-1.0.0-a1.jar:na]
	at org.qantic.umsplugin.WebInterface.<init>(WebInterface.java:67) ~[ums-webinterface-1.0.0-a1.jar:na]
	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) ~[na:1.7.0_25]
	at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source) ~[na:1.7.0_25]
	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source) ~[na:1.7.0_25]
	at java.lang.reflect.Constructor.newInstance(Unknown Source) ~[na:1.7.0_25]
	at java.lang.Class.newInstance(Unknown Source) ~[na:1.7.0_25]
	at net.pms.external.ExternalFactory.instantiateEarlyListeners(ExternalFactory.java:419) ~[ums.jar:2.6.5]
	at net.pms.external.ExternalFactory.lookup(ExternalFactory.java:399) ~[ums.jar:2.6.5]
	at net.pms.PMS.init(PMS.java:474) ~[ums.jar:2.6.5]
	at net.pms.PMS.createInstance(PMS.java:853) ~[ums.jar:2.6.5]
	at net.pms.PMS.main(PMS.java:940) ~[ums.jar:2.6.5]
08-14 17:06:48  FAILED org.eclipse.jetty.server.Server@1ba8c36: java.net.BindException: Address already in use: bind
java.net.BindException: Address already in use: bind
	at sun.nio.ch.Net.bind0(Native Method) ~[na:1.7.0_25]
	at sun.nio.ch.Net.bind(Unknown Source) ~[na:1.7.0_25]
	at sun.nio.ch.Net.bind(Unknown Source) ~[na:1.7.0_25]
	at sun.nio.ch.ServerSocketChannelImpl.bind(Unknown Source) ~[na:1.7.0_25]
	at sun.nio.ch.ServerSocketAdaptor.bind(Unknown Source) ~[na:1.7.0_25]
	at org.eclipse.jetty.server.ServerConnector.open(ServerConnector.java:227) ~[na:na]
	at org.eclipse.jetty.server.AbstractNetworkConnector.doStart(AbstractNetworkConnector.java:80) ~[na:na]
	at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:69) ~[na:na]
	at org.eclipse.jetty.server.Server.doStart(Server.java:303) ~[na:na]
	at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:69) ~[na:na]
	at org.qantic.umsplugin.WebInterface.<init>(WebInterface.java:67) ~[na:na]
	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) ~[na:1.7.0_25]
	at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source) ~[na:1.7.0_25]
	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source) ~[na:1.7.0_25]
	at java.lang.reflect.Constructor.newInstance(Unknown Source) ~[na:1.7.0_25]
	at java.lang.Class.newInstance(Unknown Source) ~[na:1.7.0_25]
	at net.pms.external.ExternalFactory.instantiateEarlyListeners(ExternalFactory.java:419) ~[ums.jar:2.6.5]
	at net.pms.external.ExternalFactory.lookup(ExternalFactory.java:399) ~[ums.jar:2.6.5]
	at net.pms.PMS.init(PMS.java:474) ~[ums.jar:2.6.5]
	at net.pms.PMS.createInstance(PMS.java:853) ~[ums.jar:2.6.5]
	at net.pms.PMS.main(PMS.java:940) ~[ums.jar:2.6.5]
08-14 17:06:48  java.net.BindException: Address already in use: bind
08-14 17:06:48  	at sun.nio.ch.Net.bind0(Native Method)
08-14 17:06:48  	at sun.nio.ch.Net.bind(Unknown Source)
08-14 17:06:48  	at sun.nio.ch.Net.bind(Unknown Source)
08-14 17:06:48  	at sun.nio.ch.ServerSocketChannelImpl.bind(Unknown Source)
08-14 17:06:48  	at sun.nio.ch.ServerSocketAdaptor.bind(Unknown Source)
08-14 17:06:48  	at org.eclipse.jetty.server.ServerConnector.open(ServerConnector.java:227)
08-14 17:06:48  	at org.eclipse.jetty.server.AbstractNetworkConnector.doStart(AbstractNetworkConnector.java:80)
08-14 17:06:48  	at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:69)
08-14 17:06:48  	at org.eclipse.jetty.server.Server.doStart(Server.java:303)
08-14 17:06:48  	at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:69)
08-14 17:06:48  	at org.qantic.umsplugin.WebInterface.<init>(WebInterface.java:67)
08-14 17:06:48  	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
08-14 17:06:48  	at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
08-14 17:06:48  	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
08-14 17:06:48  	at java.lang.reflect.Constructor.newInstance(Unknown Source)
08-14 17:06:48  	at java.lang.Class.newInstance(Unknown Source)
08-14 17:06:48  	at net.pms.external.ExternalFactory.instantiateEarlyListeners(ExternalFactory.java:419)
08-14 17:06:48  	at net.pms.external.ExternalFactory.lookup(ExternalFactory.java:399)
08-14 17:06:48  	at net.pms.PMS.init(PMS.java:474)
08-14 17:06:48  	at net.pms.PMS.createInstance(PMS.java:853)
08-14 17:06:48  	at net.pms.PMS.main(PMS.java:940)
The error appears because the plugin uses port 8083 to serve the view, if you start UMS twice it will try to run the same plugin thus the use of the same port. Is it necessary to have two instances at the same time? If the is a reason I can look into an implementation allowing it.

Anyway sorry for the delay, I am very busy right now but I hope I can continue with my work on the interface soon.

Re: Plugin: Web Interface for headless UMS

Posted: Sat Aug 17, 2013 1:49 am
by ntrp
DeFlanko wrote:a new tab after shares called "Media List"

and have it use HTML5 features to stream the videos would be epic.

i feel this its a prime candidate!
Seems an interesting idea, I will look into it when i get a chance to work on the project again :)!

Re: Plugin: Web Interface for headless UMS

Posted: Sat Feb 01, 2014 8:30 am
by Shway
Greetings,

I need some help getting this installed and working for my UMS 3.3.0

If someone could lend a hand I would be much appreciated.

FYI I am running the Windows version on a Windows Server 2008 R2

Thanks!!