FAQ  •  Register  •  Login

Web UI in Ajax (Mobile & desktop edition)

<<

PhoenixNZ

Serviio newbie

Posts: 5

Joined: Mon Jul 25, 2011 10:46 pm

Post Wed Jul 27, 2011 11:00 pm

Re: Web UI in Restful Ajax

Please forgive me now :mrgreen: , I'm a complete moron and linux n00b :?: , and want to make sure I do this right. So this is going on a Slackware, UnRaid system.

So I extract all the files from the two zip's and get the following files:
    serviio-webclient-0.1.jar

    gson-1.7.1.jar
    org.restlet.ext.gson-2.1-M2.jar
    serviio-addons.gson.jar

and place them into
serviio/lib folder.

I add the serviio-webui.sh into serviio/bin as well as patch the serviio.sh file with your sample from your wiki.

Now do I just just start serviio.sh, or do I also need to start serviio-webui.sh

My path to the serviio files is: /boot/custom/serviio and i would start by ./bin/serviio.sh & or should i cd into /boot/custom/serviio/bin and start by serviio.sh &

Have I covered all my bases??? Am I stupid or what??? no need to answer that last one.

Anyway, thanks for wasting your time on me.
<<

kairoh

DLNA master

Posts: 180

Joined: Sun Aug 08, 2010 10:41 am

Location: France

Post Thu Jul 28, 2011 9:40 am

Re: Web UI in Restful Ajax

PhoenixNZ wrote:Now do I just just start serviio.sh, or do I also need to start serviio-webui.sh

You need to start them both in this order : serviio.sh then serviio-webui.sh.
PhoenixNZ wrote:My path to the serviio files is: /boot/custom/serviio and i would start by ./bin/serviio.sh & or should i cd into /boot/custom/serviio/bin and start by serviio.sh &

Because there are some relative path in the script, I think it is better to cd into your bin dir (/boot/custom/serviio/bin), then run the scripts (./serviio.sh& then ./serviio-webui.sh&) from here.
Be sure that you use "sh" shell and that scripts are executable.

No worries for your head : everybody was a n00b before! ;)
Serviio WebUI console developer : New Homepage | Support | Project | Issues

Samsung UA32C6600 | WinXP / Ubuntu 11.10 | Samsung Galaxy S | Freebox v6
HowTo: Provide supported formats of a device HowTo: Record a new ticket on Bitbucket
HowTo: Provide details of a video file that doesn't play HowTo: Turn on detailed logging
<<

PhoenixNZ

Serviio newbie

Posts: 5

Joined: Mon Jul 25, 2011 10:46 pm

Post Thu Jul 28, 2011 11:55 pm

Re: Web UI in Restful Ajax

OK, something going wrong. Serviio.sh is good but i get an error when I start serviio-webui.sh. See below:

  Code:
TowerTest login: root
Linux 2.6.37.6-unRAID.
root@TowerTest:~# cd /boot/custom/serviio/bin
.root@TowerTest:/boot/custom/serviio/bin# ls
Copy\ of\ serviio.sh.old*  serviio-webui.sh*   serviio.sh*
serviio-console.sh*        serviio-webui1.sh*  serviio.sh.old*
root@TowerTest:/boot/custom/serviio/bin# ./serviio.sh &
[1] 1708
root@TowerTest:/boot/custom/serviio/bin# ./serviio-webui.sh &
[2] 1760
root@TowerTest:/boot/custom/serviio/bin# Exception in thread "main" java.lang.NoClassDefFoundError: org/serviio/console/ServiioConsole
Caused by: java.lang.ClassNotFoundException: org.serviio.console.ServiioConsole
        at java.net.URLClassLoader$1.run(Unknown Source)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(Unknown Source)
        at java.lang.ClassLoader.loadClass(Unknown Source)
        at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
        at java.lang.ClassLoader.loadClass(Unknown Source)
        at java.lang.ClassLoader.loadClassInternal(Unknown Source)
Could not find the main class: org.serviio.console.ServiioConsole.  Program will exit.

[2]+  Exit 1                  ./serviio-webui.sh
root@TowerTest:/boot/custom/serviio/bin# ^C
root@TowerTest:/boot/custom/serviio/bin# ls -l
total 96
-rwxrwxrwx 1 root root 2430 2011-03-28 07:42 Copy\ of\ serviio.sh.old*
-rwxrwxrwx 1 root root 2365 2011-03-28 07:42 serviio-console.sh*
-rwxrwxrwx 1 root root 2223 2011-07-29 11:39 serviio-webui.sh*
-rwxrwxrwx 1 root root 2279 2011-07-29 11:34 serviio-webui1.sh*
-rwxrwxrwx 1 root root 2547 2011-07-28 10:42 serviio.sh*
-rwxrwxrwx 1 root root 2430 2011-03-28 07:42 serviio.sh.old*
root@TowerTest:/boot/custom/serviio/bin#


Any thoughts? Or am i missing AJAX?? This is a custom build for UnRaid. I'll look into that first.
<<

kairoh

DLNA master

Posts: 180

Joined: Sun Aug 08, 2010 10:41 am

Location: France

Post Fri Jul 29, 2011 7:41 am

Re: Web UI in Restful Ajax

PhoenixNZ wrote:OK, something going wrong. Serviio.sh is good but i get an error when I start serviio-webui.sh.

My mistake! I haven't tested the linux shell after copying the serviio console shell...
You just have to change the last line
  Code:
"$JAVA" $JAVA_OPTS -classpath "$SERVIIO_CONSOLE_CLASS_PATH" org.serviio.console.ServiioConsole "$@"

to
  Code:
"$JAVA" $JAVA_OPTS -classpath "$SERVIIO_CONSOLE_CLASS_PATH" org.serviio.restui.RestletProxy "$@"
Serviio WebUI console developer : New Homepage | Support | Project | Issues

Samsung UA32C6600 | WinXP / Ubuntu 11.10 | Samsung Galaxy S | Freebox v6
HowTo: Provide supported formats of a device HowTo: Record a new ticket on Bitbucket
HowTo: Provide details of a video file that doesn't play HowTo: Turn on detailed logging
<<

PhoenixNZ

Serviio newbie

Posts: 5

Joined: Mon Jul 25, 2011 10:46 pm

Post Fri Jul 29, 2011 8:17 am

Re: Web UI in Restful Ajax

er, nope. still something I'm doin wrong.

Edited serviio-webui.sh and complete sh is as follows:
  Code:
#!/bin/sh
### ====================================================================== ###
##                                                                          ##
##  Serviio WebUI Console ript                                              ##
##                                                                          ##
### ====================================================================== ###
DIRNAME=`dirname $0`
PROGNAME=`basename $0`

# OS specific support (must be 'true' or 'false').
cygwin=false; darwin=false; linux=false;
case "`uname`" in
    CYGWIN*) cygwin=true ;;
    Darwin*) darwin=true ;;       
    Linux)   linux=true ;;
esac

# For Cygwin, ensure paths are in UNIX format before anything is touched
if $cygwin ; then
    [ -n "$SERVIIO_CONSOLE_HOME" ] &&
        SERVIIO_CONSOLE_HOME=`cygpath --unix "$SERVIIO_CONSOLE_HOME"`
    [ -n "$JAVA_HOME" ] &&
        JAVA_HOME=`cygpath --unix "$JAVA_HOME"`   
fi

# Setup SERVIIO_CONSOLE_HOME
if [ "x$SERVIIO_CONSOLE_HOME" = "x" ]; then
    # get the full path (without any relative bits)
    SERVIIO_CONSOLE_HOME=`cd $DIRNAME/..; pwd`
fi
export SERVIIO_CONSOLE_HOME

# Setup the JVM
if [ "x$JAVA" = "x" ]; then
    if [ "x$JAVA_HOME" != "x" ]; then
   JAVA="$JAVA_HOME/bin/java"
    else
   JAVA="java"
    fi
fi

# Setup the classpath
SERVIIO_CONSOLE_CLASS_PATH="$SERVIIO_CONSOLE_HOME/lib/serviio-webclient-0.1.jar:$SERVIIO_CONSOLE_HOME/lib/log4j.jar:$SERVIIO_CONSOLE_HOME/lib/slf4j-api.jar:$SERVIIO_CONSOLE_HOME/lib/slf4j-log4j12.jar:$SERVIIO_CONSOLE_HOME/lib/jul-to-slf4j.jar:$SERVIIO_CONSOLE_HOME/lib/org.restlet.jar:$SERVIIO_CONSOLE_HOME/lib/freemarker.jar:$SERVIIO_CONSOLE_HOME/config"

# Setup Serviio specific properties
JAVA_OPTS="-Dserviio.home=$SERVIIO_CONSOLE_HOME -Djava.net.preferIPv4Stack=true"

# For Cygwin, switch paths to Windows format before running java
if $cygwin; then
    SERVIIO_CONSOLE_HOME=`cygpath --path --windows "$SERVIIO_CONSOLE_HOME"`
    JAVA_HOME=`cygpath --path --windows "$JAVA_HOME"`
    SERVIIO_CONSOLE_CLASS_PATH=`cygpath --path --windows "$SERVIIO_CONSOLE_CLASS_PATH"`
fi

# Execute the JVM in the foreground
"$JAVA" $JAVA_OPTS -classpath "$SERVIIO_CONSOLE_CLASS_PATH" org.serviio.restui.RestletProxy "$@"


Getting this error message now. Not sure if same as my previous post
  Code:
root@TowerTest:/boot/custom/serviio# ./bin/serviio-webui.sh &
[3] 1966
[2]   Exit 1                  ./bin/serviio-webui.sh
root@TowerTest:/boot/custom/serviio# Exception in thread "main" java.lang.NoClassDefFoundError: org/serviio/restui/RestletProxy
Caused by: java.lang.ClassNotFoundException: org.serviio.restui.RestletProxy
        at java.net.URLClassLoader$1.run(Unknown Source)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(Unknown Source)
        at java.lang.ClassLoader.loadClass(Unknown Source)
        at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
        at java.lang.ClassLoader.loadClass(Unknown Source)
        at java.lang.ClassLoader.loadClassInternal(Unknown Source)
Could not find the main class: org.serviio.restui.RestletProxy.  Program will exit.

[3]+  Exit 1                  ./bin/serviio-webui.sh
root@TowerTest:/boot/custom/serviio#


Your thoughts may lighten my day. lol :)
<<

kairoh

DLNA master

Posts: 180

Joined: Sun Aug 08, 2010 10:41 am

Location: France

Post Fri Jul 29, 2011 8:34 am

Re: Web UI in Restful Ajax

PhoenixNZ wrote:root@TowerTest:/boot/custom/serviio# ./bin/serviio-webui.sh &

Try to cd to your $SERVIIO_CONSOLE_HOME/bin/ before running ./serviio-webui.sh&
Serviio WebUI console developer : New Homepage | Support | Project | Issues

Samsung UA32C6600 | WinXP / Ubuntu 11.10 | Samsung Galaxy S | Freebox v6
HowTo: Provide supported formats of a device HowTo: Record a new ticket on Bitbucket
HowTo: Provide details of a video file that doesn't play HowTo: Turn on detailed logging
<<

PhoenixNZ

Serviio newbie

Posts: 5

Joined: Mon Jul 25, 2011 10:46 pm

Post Sun Jul 31, 2011 11:13 pm

Re: Web UI in Restful Ajax

Haven't had a chance to check into this further, as too busy fixing friends computers. (Why do they break them just before the weekend!!!).

Will look into getting this going later this week.
<<

williMeier

Serviio newbie

Posts: 16

Joined: Sun Jul 31, 2011 9:33 pm

Post Mon Aug 01, 2011 9:39 am

Re: Web UI in Restful Ajax

great tool, tankyou!
it seems to be running but the webUI contains no data, see attached screen shot.
what i'm missing?
Attachments
serviio.jpg
serviio.jpg (133.3 KiB) Viewed 13649 times
<<

Illico

User avatar

DLNA master

Posts: 4646

Joined: Fri Jul 23, 2010 8:08 am

Location: France

Post Mon Aug 01, 2011 12:00 pm

Re: Web UI in Restful Ajax

williMeier wrote:great tool, tankyou!
it seems to be running but the webUI contains no data, see attached screen shot.
what i'm missing?

+1 Same problem for me on Firefox or IE
Illico
Sony 2010 KDL-46EX501 | BDP-S373 | SMP-N100 | Windows 8-i7 | Network DD HD-CE1.5TLU2 | Livebox2-UHD86 | ServiiDroid | ServiiGo | BubbleUPnP
Serviio beta tester - Moderator
<<

Elfish

Streaming enthusiast

Posts: 23

Joined: Tue Aug 02, 2011 6:58 am

Post Tue Aug 02, 2011 7:22 pm

Re: Web UI in Restful Ajax

i get that when i tried to browse with lynx to http://127.0.0.1:8123/serviio/console

  Code:
HTTP request sent; waiting for response.02-Aug-2011 21:21:02 org.restlet.engine.log.LogFilter afterHandle
                                                                                                         INFO: 2011-08-02       21:21:02        127.0.0.1   -localhost       8123    GET     /serviio/console        -       200     -       0       187     http://127.0.0.1:8123   Lynx/2.8.8dev.9 libwww-FM/2.14 SSL-MM/1.4.1 GNUTLS/2.10.5    -
HTTP/1.0 200 OK


anyone knows what i'm doing wrong?
i put all the files in /lib and changed the launchers aswell

i'm running debian headless
<<

patters

User avatar

DLNA master

Posts: 1273

Joined: Sat Oct 09, 2010 3:51 pm

Location: London, UK

Post Tue Aug 02, 2011 10:18 pm

Re: Web UI in Restful Ajax

Hi, running on Synology NAS I couldn't get the shell script launch to work (just kept saying 'not found' even though it looks like it's based off the serviio.sh one.

Anyhow, I used a few find&replace and arrived at:

  Code:
/opt/serviio/bin$ java -Dserviio.home=/opt/serviio -Djava.net.preferIPv4Stack=tr
ue -classpath "/opt/serviio/lib/serviio-webclient-0.1.jar:/opt/serviio/lib/log4j
.jar:/opt/serviio/lib/slf4j-api.jar:/opt/serviio/lib/slf4j-log4j12.jar:/opt/serv
iio/lib/jul-to-slf4j.jar:/opt/serviio/lib/org.restlet.jar:/opt/serviio/lib/freem
arker.jar:/opt/serviio/config" org.serviio.restui.RestletProxy "$@"
Aug 2, 2011 10:12:38 PM org.restlet.engine.http.connector.HttpClientHelper start
INFO: Starting the default HTTP client
Aug 2, 2011 10:12:39 PM org.restlet.engine.http.connector.HttpServerHelper start
INFO: Starting the internal HTTP server on port 8123


Still can't connect on http://192.168.1.202:8123/serviio/console though.
LG OLED55B8PLA | PS4 Pro | Xbox One S | Synology DS214play
Serviio 2.0 package for Synology NAS - with limited hardware transcoding support!
<<

patters

User avatar

DLNA master

Posts: 1273

Joined: Sat Oct 09, 2010 3:51 pm

Location: London, UK

Post Tue Aug 02, 2011 10:25 pm

Re: Web UI in Restful Ajax

Elfish wrote:i get that when i tried to browse with lynx to http://127.0.0.1:8123/serviio/console

  Code:
HTTP request sent; waiting for response.02-Aug-2011 21:21:02 org.restlet.engine.log.LogFilter afterHandle
                                                                                                         INFO: 2011-08-02       21:21:02        127.0.0.1   -localhost       8123    GET     /serviio/console        -       200     -       0       187     http://127.0.0.1:8123   Lynx/2.8.8dev.9 libwww-FM/2.14 SSL-MM/1.4.1 GNUTLS/2.10.5    -
HTTP/1.0 200 OK


anyone knows what i'm doing wrong?
i put all the files in /lib and changed the launchers aswell

i'm running debian headless


Exact same behaviour here running Linux on Synology NAS.
LG OLED55B8PLA | PS4 Pro | Xbox One S | Synology DS214play
Serviio 2.0 package for Synology NAS - with limited hardware transcoding support!
<<

Elfish

Streaming enthusiast

Posts: 23

Joined: Tue Aug 02, 2011 6:58 am

Post Wed Aug 03, 2011 5:35 am

Re: Web UI in Restful Ajax

at least i'm not the only one :).

at least my sony tv was able to find the serviio itself.
<<

kairoh

DLNA master

Posts: 180

Joined: Sun Aug 08, 2010 10:41 am

Location: France

Post Thu Aug 04, 2011 4:30 pm

Re: Web UI in Restful Ajax

Elfish wrote:i get that when i tried to browse with lynx to http://127.0.0.1:8123/serviio/console
anyone knows what i'm doing wrong?

Lynx is not supported : Ajax needs an advanced Javascript-compliant browser.
You should try to connect from another device on your network.
Serviio WebUI console developer : New Homepage | Support | Project | Issues

Samsung UA32C6600 | WinXP / Ubuntu 11.10 | Samsung Galaxy S | Freebox v6
HowTo: Provide supported formats of a device HowTo: Record a new ticket on Bitbucket
HowTo: Provide details of a video file that doesn't play HowTo: Turn on detailed logging
<<

Elfish

Streaming enthusiast

Posts: 23

Joined: Tue Aug 02, 2011 6:58 am

Post Thu Aug 04, 2011 5:25 pm

Web UI in Restful Ajax

Hi thanks for your reply

I also tried to access the webinterface from my Notebook without any success. The page timed out. how to set the network device serviio is bound to/uses? Serviio itself starts up fine. There are no errors in the log.
<<

zip

User avatar

Serviio developer / Site Admin

Posts: 17154

Joined: Sat Oct 24, 2009 12:24 pm

Location: London, UK

Post Thu Aug 04, 2011 5:28 pm

Re: Web UI in Restful Ajax

can you access this url from the remote machine?

  Code:
http://<IP of serviio box>:23423/rest/application
<<

Elfish

Streaming enthusiast

Posts: 23

Joined: Tue Aug 02, 2011 6:58 am

Post Thu Aug 04, 2011 7:44 pm

Re: Web UI in Restful Ajax

doesn't work on my server

http://127.0.0.1:23423/rest/application
seems to work.
w3m is asking if i wanted to download "application"

however trying to access
http://192.168.1.105:23423/rest/application

doesn't work on my local machine and my remote machine
the ip is 100% correct since i'm sshing to it.
<<

kairoh

DLNA master

Posts: 180

Joined: Sun Aug 08, 2010 10:41 am

Location: France

Post Thu Aug 04, 2011 8:23 pm

Re: Web UI in Restful Ajax

williMeier wrote:great tool, tankyou!
it seems to be running but the webUI contains no data, see attached screen shot.
what i'm missing?

Is javascript enabled?
Serviio WebUI console developer : New Homepage | Support | Project | Issues

Samsung UA32C6600 | WinXP / Ubuntu 11.10 | Samsung Galaxy S | Freebox v6
HowTo: Provide supported formats of a device HowTo: Record a new ticket on Bitbucket
HowTo: Provide details of a video file that doesn't play HowTo: Turn on detailed logging
<<

williMeier

Serviio newbie

Posts: 16

Joined: Sun Jul 31, 2011 9:33 pm

Post Thu Aug 04, 2011 11:56 pm

Re: Web UI in Restful Ajax

yes. tried with chrome, ie 8, firefox portable, opera.
are there any logfiles?
<<

zip

User avatar

Serviio developer / Site Admin

Posts: 17154

Joined: Sat Oct 24, 2009 12:24 pm

Location: London, UK

Post Fri Aug 05, 2011 6:10 am

Re: Web UI in Restful Ajax

Elfish wrote:doesn't work on my server

http://127.0.0.1:23423/rest/application
seems to work.
w3m is asking if i wanted to download "application"

however trying to access
http://192.168.1.105:23423/rest/application

doesn't work on my local machine and my remote machine
the ip is 100% correct since i'm sshing to it.

Are you using beta 2 or something before that? If 0.5.2, then make sure to bind the rest API to the external Ip address by passing this on the server side:

  Code:
-Dserviio.remoteHost=192.168.1.105
PreviousNext

Return to Third-party tools integration

Who is online

Users browsing this forum: No registered users and 5 guests

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