Web interface: Difference between revisions

From Official Kodi Wiki
Jump to navigation Jump to search
>Neeltje57
m (Enabled TOC again)
No edit summary
(46 intermediate revisions by 13 users not shown)
Line 1: Line 1:
{{XBMC wiki toc Inline}}
<section begin="intro" />Web interfaces allow users to control and interact with their {{Kodi}} installation through a web browser. This can be used for a remote control, library management, visual feedback, and many other things.<section end="intro" />
__NOEDITSECTION__
__TOC__
The XBMC Web GUI control-interface uses XBMC's built-in WebServer (and [[WebServerHTTP-API|HTTP API)]] to allow you to control certain aspects of XBMC via a remote web-browser on the same network as your Xbox, (e.g. from your computer). If you would like to use this XBMC Web GUI, then the HTTP-server must be activated in the XBMC [[Network Settings]]. Once activated, the XBMC Web GUI control-interface can be accessed by pointing your browser to <nowiki>http://(xbox_ip)/</nowiki>, where "xbox_ip" is the actual IP-address of your Xbox.


Once you are connected, you will see a number of options including; My Music, My Videos, Music Playlist, Video Playlist, and playback controls.  Most of which are self explanatory. When you're adding files to the playlist, you can click the name of the file to begin play immediately, or you can click the Q next to the file name to add it to the playlist (queue).
== Turning on the web interface ==


You can also change some settings and create, delete, or edit sources using the http interface using the links at the top. This may be an easier way to adjust source settings as opposed to editing the Sources.xml file.
The webserver is disabled by default and has to be manually enabled by the user. This can be done in {{highlight|bordered=yes|[[Settings/Services/Control|Settings  → Services → Control → Allow remote control via HTTP]]}}. The settings allow to specify a custom port number and an optional username and password for HTTP's [http://en.wikipedia.org/wiki/Basic_access_authentication Basic Access Authentication]. Furthermore a [[Web interface]] can be chosen which will be used when accessing the webserver without any specific path.
[[image:webserver.jpg|right|360px]]


===Control from PocketPC PDA Browser===
== Using the web interface ==
At [http://www.allxboxskins.com/skins/index.php?app=xbmc AllXBoxSkins.com] you can download skins for XBMC.  Several of these skins are described as WebServer skins.  Some skins are tailored specifically for a PocketPC PDA with a 320x240 pixel screen.  One nice example is the 'XBOX Media Center for PPC Rev. B' which can be added to the '$HOME/web' directory without overwriting the current WebServer skin allowing you to have a skin for PC access and one for PPC access.  For PPC access, point your browser at <nowiki>http://(xbox_ip)/ppcdefault.asp</nowiki>
There are two options to use any given web interface:


Known pocketpc skin names for download from [http://www.allxboxskins.com/skins/index.php?app=xbmc AllXBoxSkins.com]
=== Default web interface ===
xbmc mobile webserver


There is also a PocketPC client on sourceforge. Current status and compatibility is unknown. [http://sourceforge.net/project/showfiles.php?group_id=87054 SourceForge].
To set a web interface add-on as the default web UI, go to {{highlight|bordered=yes| [[Settings/Services/Control|System -> Services -> Control]] }} and select that add-on for the '''Default''' value. Then go to the hostname (or IP address) of that HTPC+Port number.


=== Control from PSP ===
{{note|Some platforms use port 80, which is the assumed port if no port is given in the address.}}
There is a flash client available for browsing music available. It will work on any flash player v6 and above. It has been primarily designed for the PSP and only handles music browsing. Download [http://www.markfennell.com/flash/psp here]


There is also "XBMC Remote Interface". A LUA script compatable with the PSP which is able to:
For example, <code><nowiki>http://10.0.0.3:8080</nowiki></code> or <code><nowiki>http://192.168.1.7</nowiki></code>
* Browse music, video and pictures.
* It is able to download thumbnails from all 3 media types.
* Display currently playing file information (Music tags, filename).
* Seek in music and video.
* Adjust volume.
* Previous\next in playlist.
* Shutdown\restart Xbox.
* Send button commands to the Xbox to browse menus wirelessly.
Download [http://code.google.com/p/pspmoot/ here.]
Pictures [http://www.flickr.com/photos/77372494@N00/tags/xbmc/ here.]


=== Notes for Firefox users ===
GoAhead web server XBMC uses is not compatible with Firefox when password is enabled and default Digest authentication mode is used. You can work around it by setting password normally, then editing web/umconfig.txt and changing each "method=3" line to "method=2" and restarting your XBMC. This causes web server to use HTTP Basic authentication, which does work properly with Firefox.


If you modify web server password from XBMC settings menu, umconfig.txt is rewritten and you will have to apply this fix again.
=== Using multiple web interfaces at once ===
[[File:WebUI.png|400px|border|right|A listing of all add-ons with web interfaces.]]


=== HTTP-API===
Let's say <code><nowiki>http://123.4.5.6:8080</nowiki></code> is your local IP for accessing your default web interface add-on. You can access the other [[:Category:Web interface add-ons|web interface add-ons]] you have installed by going to <code><nowiki>http://123.4.5.6:8080</nowiki>/addons/</code> where you will see a directory listing.
So you want to create your own front-end? Have a look here:
[[WebServerHTTP-API|HTTP-API]]


=== Xml Api===
For example, <code><nowiki>http://10.0.0.3:8080/addons/</nowiki></code> or <code><nowiki>http://192.168.1.7/addons/</nowiki></code>
[[WebServerXmlApi|XmlApi]]
[[category:Usage]]


{{-}}


=== Notes for Developers ===
== Manually enabling remote control ==
The [http://webserver.goahead.com GoAhead Webserver] that XBMC uses does not support ASP, PHP nor JavaScript. The current [http://webserver.goahead.com GoAhead Webserver] only support standrad HTTP (and AJAX without JavaScript), and also PSP. PSP (Python Server Pages), a.k.a. [http://spyce.sourceforge.net/ SPYCE]) is an unexplored alternative for adding server-side code to the XBMC web-site. (It may also be possible for a C++ developer either extend GoAhead Webserver source code by adding futher libraies, those libaries could possible be in C/C++ or python, maybe even support for JavaScript could be added, however no developer has volunteered to help us update and maintain the webserver code).
<section begin="manual" />
If you have installed Kodi on a device and it has started up in Kodi, and you either have [[SSH]] access or other access to the Kodi userdata folder, you can manually enable remote control. This is helpful in a few situations, for example: If you have a networked device but no physical remote control (left it at home, can't find the dang remote, etc), you can still use the web interface or a smartphone/tablet app to control Kodi.


There are two basic ways to do this:


[[category:Inner Workings]]
 
[[category:Development]]
{{bigger|'''guisettings.xml -'''}}
[[category:Inner Workings]]
:Normally you do not want to manually edit the guisettings.xml file. In this case it should be "safe", but only change these settings from <code>false</code> to <code>true</code>, and don't edit other things.
[[category:To-Do]]
:# Edit the guisettings.xml file in the [[userdata folder]] and look for the following settings under "<code><services></code>", and make sure they are set to "true". You'll have to look for them a little bit, because there among several other settings. Assuming you have not set a password or changed other default settings, this should work:
:#:* <esallinterfaces> - '''true'''
:#:* <webserver> - '''true'''
:#:* <zeroconf> - '''true'''
:# Save the file and restart Kodi.
 
 
 
{{bigger|'''[[advancedsettings.xml]] - '''}}
:While using an advancedsettings.xml file might be easier to enable these services, doing so will hide them from the normal Kodi GUI. You will have to remove or edit the advancedsettings.xml file to turn these settings back off, which can be confusing later on if you forgot you have an advancedsettings.xml file.
:# Create a '''plain text file''' (no rich text formatting, don't use .doc, etc) and save it as '''advancedsettings.xml'''. Make sure that the file extension is ".xml" and {{color|red|'''not'''}} ".txt" or ".xml.txt".
:# Cut and paste this into your new plain text file:
:#: <syntaxhighlight lang=xml enclose="div">
<advancedsettings>
    <services>
        <esallinterfaces>true</esallinterfaces>
        <webserver>true</webserver>
        <zeroconf>true</zeroconf>
    </services>
</advancedsettings>
</syntaxhighlight>
:# Save this file in your [[userdata folder]]
:#: {{note|If you have an existing advancedsettings.xml file, make sure the tags are between the main <code><advancedsettings></advancedsettings></code> tags.}}
:# Restart Kodi.
 
 
 
{{hidden|1=[[userdata folder]] location:|2={{#lst:userdata|location all}} }}
<section end="manual" />
 
== See also ==
* [[Remote controls]]
* [[Add-on:Default web interface]]
* [[:Category:Web interface add-ons]]
* [[:Category:Standalone web interfaces]]
* [[Webserver]]
 
{{Isengard updated}}
 
[[Category:Manual]]
[[Category:Remotes]]
[[Category:Add-ons]]
[[Category:Web interface add-ons|*]]
[https://kodi.tv/article/new-webinterface-called-chorus2 Chorus2]

Revision as of 11:58, 10 July 2018

Web interfaces allow users to control and interact with their Kodi installation through a web browser. This can be used for a remote control, library management, visual feedback, and many other things.

Turning on the web interface

The webserver is disabled by default and has to be manually enabled by the user. This can be done in Settings → Services → Control → Allow remote control via HTTP. The settings allow to specify a custom port number and an optional username and password for HTTP's Basic Access Authentication. Furthermore a Web interface can be chosen which will be used when accessing the webserver without any specific path.

Using the web interface

There are two options to use any given web interface:

Default web interface

To set a web interface add-on as the default web UI, go to System -> Services -> Control and select that add-on for the Default value. Then go to the hostname (or IP address) of that HTPC+Port number.

Note: Some platforms use port 80, which is the assumed port if no port is given in the address.

For example, http://10.0.0.3:8080 or http://192.168.1.7


Using multiple web interfaces at once

A listing of all add-ons with web interfaces.

Let's say http://123.4.5.6:8080 is your local IP for accessing your default web interface add-on. You can access the other web interface add-ons you have installed by going to http://123.4.5.6:8080/addons/ where you will see a directory listing.

For example, http://10.0.0.3:8080/addons/ or http://192.168.1.7/addons/


Manually enabling remote control

If you have installed Kodi on a device and it has started up in Kodi, and you either have SSH access or other access to the Kodi userdata folder, you can manually enable remote control. This is helpful in a few situations, for example: If you have a networked device but no physical remote control (left it at home, can't find the dang remote, etc), you can still use the web interface or a smartphone/tablet app to control Kodi.

There are two basic ways to do this:


guisettings.xml -

Normally you do not want to manually edit the guisettings.xml file. In this case it should be "safe", but only change these settings from false to true, and don't edit other things.
  1. Edit the guisettings.xml file in the userdata folder and look for the following settings under "<services>", and make sure they are set to "true". You'll have to look for them a little bit, because there among several other settings. Assuming you have not set a password or changed other default settings, this should work:
    • <esallinterfaces> - true
    • <webserver> - true
    • <zeroconf> - true
  2. Save the file and restart Kodi.


advancedsettings.xml -

While using an advancedsettings.xml file might be easier to enable these services, doing so will hide them from the normal Kodi GUI. You will have to remove or edit the advancedsettings.xml file to turn these settings back off, which can be confusing later on if you forgot you have an advancedsettings.xml file.
  1. Create a plain text file (no rich text formatting, don't use .doc, etc) and save it as advancedsettings.xml. Make sure that the file extension is ".xml" and not ".txt" or ".xml.txt".
  2. Cut and paste this into your new plain text file:
    <advancedsettings>
        <services>
            <esallinterfaces>true</esallinterfaces>
            <webserver>true</webserver>
            <zeroconf>true</zeroconf>
        </services>
    </advancedsettings>
  3. Save this file in your userdata folder
    Note: If you have an existing advancedsettings.xml file, make sure the tags are between the main <advancedsettings></advancedsettings> tags.
  4. Restart Kodi.



See also

Chorus2