Plugin: Web Interface for headless UMS

Discuss third party additions, plugins and translations for Universal Media Server
ntrp
Posts: 7
Joined: Tue Jun 04, 2013 6:09 am

Plugin: Web Interface for headless UMS

Post by ntrp » Tue Jun 04, 2013 6:11 am

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.
Last edited by ntrp on Thu Dec 18, 2014 8:29 am, edited 3 times in total.

User avatar
Optimus_prime
Posts: 690
Joined: Fri Jun 01, 2012 6:39 pm
Location: Sydney, Australia

Re: Plugin: Web Interface for headless UMS

Post by Optimus_prime » Tue Jun 04, 2013 6:14 pm

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.
How Ask For Support
Remember, Debug Log's Can/Will Help and Explain your issues, we're not mind reader's but here to help
OS's I Use And Can Assist With: Windows 7/8, Mac OS-X 10.8 & 10.9
Mac OS-X Java 7 Builds Mac OS-X Java 7 Forum

ntrp
Posts: 7
Joined: Tue Jun 04, 2013 6:09 am

Re: Plugin: Web Interface for headless UMS

Post by ntrp » Tue Jun 04, 2013 7:53 pm

Thanks for the feedback, I added a usage note in the installation section of the wiki.

User avatar
DeFlanko
Posts: 724
Joined: Thu Jun 21, 2012 3:43 am
Location: San Pedro, CA
Contact:

Re: Plugin: Web Interface for headless UMS

Post by DeFlanko » Sat Jul 20, 2013 12:00 pm

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
Last edited by DeFlanko on Sat Jul 20, 2013 12:17 pm, edited 1 time in total.

User avatar
DeFlanko
Posts: 724
Joined: Thu Jun 21, 2012 3:43 am
Location: San Pedro, CA
Contact:

Re: Plugin: Web Interface for headless UMS

Post by DeFlanko » Sat Jul 20, 2013 12:03 pm

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!

Wolfgan
Posts: 371
Joined: Fri Feb 08, 2013 12:33 am

Re: Plugin: Web Interface for headless UMS

Post by Wolfgan » Sun Jul 21, 2013 7:12 am

Amazing job ntrp. Thx for sharing it!
-- UMS serving PS3, WDTV, Samsung H6400 + J5500 and Kalemsoft renderers! (no video transcoding but remuxing accepted :D )

User avatar
DeFlanko
Posts: 724
Joined: Thu Jun 21, 2012 3:43 am
Location: San Pedro, CA
Contact:

Re: Plugin: Web Interface for headless UMS

Post by DeFlanko » Thu Aug 15, 2013 12:10 pm

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 372 times

Code: Select all

08-14 17:06:48  FAILED [email protected]{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 [email protected]: 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)

ntrp
Posts: 7
Joined: Tue Jun 04, 2013 6:09 am

Re: Plugin: Web Interface for headless UMS

Post by ntrp » Sat Aug 17, 2013 1:48 am

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 [email protected]{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 [email protected]: 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.

ntrp
Posts: 7
Joined: Tue Jun 04, 2013 6:09 am

Re: Plugin: Web Interface for headless UMS

Post by ntrp » Sat Aug 17, 2013 1:49 am

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 :)!

Shway
Posts: 3
Joined: Sat Feb 01, 2014 8:27 am

Re: Plugin: Web Interface for headless UMS

Post by Shway » Sat Feb 01, 2014 8:30 am

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!!

Post Reply