mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-04-16 16:56:04 +00:00
70_KODI: update links to wiki. Fixed HTML syntax errors
git-svn-id: https://svn.fhem.de/fhem/trunk@16662 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
3d98861c36
commit
b5f9372cf1
@ -1611,53 +1611,53 @@ sub KODI_HTTP_Request($$@)
|
||||
<b>Define</b>
|
||||
<ul>
|
||||
<code>define <name> KODI <ip[:port]> <http|tcp> [<username>] [<password>]</code>
|
||||
<br><br>
|
||||
<br/><br/>
|
||||
|
||||
This module allows you to control Kodi and receive events from Kodi. It can also be used to control Plex (see attribute <i>compatibilityMode</i>).<br><br>
|
||||
This module allows you to control Kodi and receive events from Kodi. It can also be used to control Plex (see attribute <i>compatibilityMode</i>).<br/><br/>
|
||||
|
||||
<b>Prerequisites</b>
|
||||
<ul>
|
||||
<li>Requires XBMC "Frodo" 12.0.</li>
|
||||
<li>To use this module you will have to enable JSON-RPC. See <a href="http://wiki.xbmc.org/index.php?title=JSON-RPC_API#Enabling_JSON-RPC">here</a>.</li>
|
||||
<li>The Perl module JSON is required. <br>
|
||||
On Debian/Raspbian: <code>apt-get install libjson-perl </code><br>
|
||||
<li>To use this module you will have to enable JSON-RPC. See <a href="https://kodi.wiki/view/JSON-RPC_API#Enabling_JSON-RPC">here</a>.</li>
|
||||
<li>The Perl module JSON is required. <br/>
|
||||
On Debian/Raspbian: <code>apt-get install libjson-perl </code><br/>
|
||||
Via CPAN: <code>cpan install JSON</code>
|
||||
To get it working on a Fritzbox the JSON module has to be installed manually.</li>
|
||||
</ul>
|
||||
|
||||
To receive events it is necessary to use TCP. The default TCP port is 9090. Username and password are optional for TCP. Be sure to enable JSON-RPC
|
||||
for TCP. See <a href="http://wiki.xbmc.org/index.php?title=JSON-RPC_API#Enabling_JSON-RPC>here</a>.<br><br>
|
||||
for TCP. See <a href="https://kodi.wiki/view/JSON-RPC_API#Enabling_JSON-RPC">here</a>.<br/><br/>
|
||||
|
||||
If you just want to control Kodi you can use the HTTP instead of tcp. The username and password are required for HTTP. Be sure to enable JSON-RPC for HTTP.
|
||||
See <a href="http://wiki.xbmc.org/index.php?title=JSON-RPC_API#Enabling_JSON-RPC">here</a>.<br><br>
|
||||
See <a href="https://kodi.wiki/view/JSON-RPC_API#Enabling_JSON-RPC">here</a>.<br/><br/>
|
||||
|
||||
Example:<br><br>
|
||||
Example:<br/><br/>
|
||||
<ul>
|
||||
<code>
|
||||
define htpc KODI 192.168.0.10 tcp
|
||||
<br><br>
|
||||
<br/><br/>
|
||||
define htpc KODI 192.168.0.10:9000 tcp # With custom port
|
||||
<br><br>
|
||||
<br/><br/>
|
||||
define htpc KODI 192.168.0.10 http # Use HTTP instead of TCP - Note: to receive events use TCP!
|
||||
<br><br>
|
||||
<br/><br/>
|
||||
define htpc KODI 192.168.0.10 http kodi passwd # Use HTTP with credentials - Note: to receive events use TCP!
|
||||
</code>
|
||||
</ul><br><br>
|
||||
</ul><br/><br/>
|
||||
|
||||
Remote control:<br>
|
||||
Remote control:<br/>
|
||||
There is an simple remote control layout for Kodi which contains the most basic buttons. To add the remote control to the webinterface execute the
|
||||
following commands:<br><br>
|
||||
following commands:<br/><br/>
|
||||
<ul>
|
||||
<code>
|
||||
define <rc_name> remotecontrol #adds the remote control
|
||||
<br><br>
|
||||
<br/><br/>
|
||||
set <rc_name> layout KODI_RClayout #sets the layout for the remote control
|
||||
<br><br>
|
||||
<br/><br/>
|
||||
set <rc_name> makenotify <KODI_device> #links the buttons to the actions
|
||||
</code>
|
||||
</ul><br><br>
|
||||
</ul><br/><br/>
|
||||
|
||||
Known issues:<br>
|
||||
Known issues:<br/>
|
||||
Kodi sometimes creates events twices. For example the Player.OnPlay event is created twice if play a song. Unfortunately this
|
||||
is a issue of Kodi. The fix of this bug is included in future version of Kodi (> 12.2).
|
||||
|
||||
@ -1667,10 +1667,10 @@ sub KODI_HTTP_Request($$@)
|
||||
<b>Set</b>
|
||||
<ul>
|
||||
<code>set <name> <command> [<parameter>]</code>
|
||||
<br><br>
|
||||
This module supports the following commands:<br>
|
||||
<br/><br/>
|
||||
This module supports the following commands:<br/>
|
||||
|
||||
Player related commands:<br>
|
||||
Player related commands:<br/>
|
||||
<ul>
|
||||
<li><b>play [<all|audio|video|picture>]</b> - starts the playback (might only work if previously paused). The second argument defines which player should be started. By default the active players will be started</li>
|
||||
<li><b>pause [<all|audio|video|picture>]</b> - pauses the playback</li>
|
||||
@ -1678,7 +1678,7 @@ sub KODI_HTTP_Request($$@)
|
||||
<li><b>stop [<all|audio|video|picture>]</b> - stop the playback</li>
|
||||
<li><b>next [<all|audio|video|picture>]</b> - jump to the next track</li>
|
||||
<li><b>prev [<all|audio|video|picture>]</b> - jump to the previous track or the beginning of the current track.</li>
|
||||
<li><b>goto <position> [<audio|video|picture>]</b> - Goes to the <position> in the playlist. <position> has to be a number.</li>
|
||||
<li><b>goto <position> [<audio|video|picture>]</b> - Goes to the in the playlist. has to be a number.</li>
|
||||
<li><b>shuffle [<toggle|on|off>] [<audio|video|picture>]</b> - Enables/Disables shuffle mode. Without furhter parameters the shuffle mode is toggled.</li>
|
||||
<li><b>repeat <one|all|off> [<audio|video|picture>]</b> - Sets the repeat mode.</li>
|
||||
<li><b>open <URI></b> - Plays the resource located at the URI (can be a url or a file)</li>
|
||||
@ -1689,7 +1689,7 @@ sub KODI_HTTP_Request($$@)
|
||||
<li><b>addon <addonid> <parametername> <parametervalue></b> - Executes addon with one Parameter, for example set kodi addon script.json-cec command activate</li>
|
||||
<li><b>seek <hh:mm:ss></b> - seek to the specified time</li>
|
||||
</ul>
|
||||
<br>Input related commands:<br>
|
||||
<br/>Input related commands:<br/>
|
||||
<ul>
|
||||
<li><b>back</b> - Back-button</li>
|
||||
<li><b>down</b> - Down-button</li>
|
||||
@ -1705,14 +1705,14 @@ sub KODI_HTTP_Request($$@)
|
||||
<li><b>send <text></b> - Sends <text> as input to Kodi</li>
|
||||
<li><b>jsonraw</b> - Sends raw JSON data to Kodi</li>
|
||||
</ul>
|
||||
<br>Libary related commands:<br>
|
||||
<br/>Libary related commands:<br/>
|
||||
<ul>
|
||||
<li><b>videolibrary clean</b> - Removes non-existing files from the video libary</li>
|
||||
<li><b>videolibrary scan</b> - Scan for new video files</li>
|
||||
<li><b>audiolibrary clean</b> - Removes non-existing files from the audio libary</li>
|
||||
<li><b>audiolibrary scan</b> - Scan for new audio files</li>
|
||||
</ul>
|
||||
<br>Application related commands:<br>
|
||||
<br/>Application related commands:<br/>
|
||||
<ul>
|
||||
<li><b>activatewindow <name></b> - activates the window "name" of the following list:
|
||||
<ul><li>AddonSearch</li><li>Addons</li><li>Albums</li><li>AndroidApps</li><li>Artists</li><li>Compilations</li><li>EventLog</li><li>FileManager</li><li>Genres</li><li>InProgressTvShows</li><li>MovieActors</li><li>MovieCountries</li><li>MovieDirectors</li><li>MovieGenres</li><li>MovieInformation</li><li>MovieSets</li><li>MovieStudios</li><li>MovieTags</li><li>MovieTitles</li><li>MovieYears</li><li>Movies</li><li>MusicAddons</li><li>MusicFiles</li><li>MusicPlaylists</li><li>MusicRoot</li><li>MusicVideoAlbums</li><li>MusicVideoArtists</li><li>MusicVideoDirectors</li><li>MusicVideoGenres</li><li>MusicVideoStudios</li><li>MusicVideoTitles</li><li>MusicVideoYears</li><li>MusicVideos</li><li>ProgramAddons</li><li>RecentlyAddedAlbums</li><li>RecentlyAddedEpisodes</li><li>RecentlyAddedMovies</li><li>RecentlyAddedMusicVideos</li><li>RecentlyPlayedAlbums</li><li>Settings</li><li>Singles</li><li>Song</li><li>SubTitles</li><li>Top100</li><li>Top100Albums</li><li>Top100Songs</li><li>TvShowActors</li><li>TvShowGenres</li><li>TvShowStudios</li><li>TvShowTitles</li><li>TvShowYears</li><li>TvShows</li><li>VideoAddons</li><li>VideoFiles</li><li>VideoPlaylists</li><li>VideoRoot</li><li>Years</li></ul>
|
||||
@ -1724,7 +1724,7 @@ sub KODI_HTTP_Request($$@)
|
||||
<li><b>quit</b> - closes Kodi</li>
|
||||
<li><b>off</b> - depending on the value of the attribute "offMode" Kodi will be closed (see quit) or the system will be shut down, put into hibernation or stand by. Default is quit.</li>
|
||||
</ul>
|
||||
<br>System related commands:<br>
|
||||
<br/>System related commands:<br/>
|
||||
<ul>
|
||||
<li><b>eject</b> - will eject the optical drive</li>
|
||||
<li><b>shutdown</b> - the Kodi host will be shut down</li>
|
||||
@ -1734,19 +1734,19 @@ sub KODI_HTTP_Request($$@)
|
||||
<li><b>connect</b> - try to connect to the Kodi host immediately</li>
|
||||
</ul>
|
||||
</ul>
|
||||
<br><br>
|
||||
<br/><br/>
|
||||
|
||||
<u>Messaging</u>
|
||||
<ul>
|
||||
To show messages on Kodi (little message PopUp at the bottom right egde of the screen) you can use the following commands:<br>
|
||||
<code>set <KODI_device> msg <title> <msg> [<duration>] [<icon>]</code><br>
|
||||
To show messages on Kodi (little message PopUp at the bottom right egde of the screen) you can use the following commands:<br/>
|
||||
<code>set <KODI_device> msg <title> <msg> [<duration>] [<icon>]</code><br/>
|
||||
The default duration of a message is 5000 (5 seconds). The minimum duration is 1500 (1.5 seconds). By default no icon is shown. Kodi provides three
|
||||
different icon: error, info and warning. You can also use an uri to define an icon. Please enclose title and/or message into quotes (" or ') if it consists
|
||||
of multiple words.
|
||||
</ul>
|
||||
|
||||
<br>
|
||||
<b>Generated Readings/Events:</b><br>
|
||||
<br/>
|
||||
<b>Generated Readings/Events:</b><br/>
|
||||
<ul>
|
||||
<li><b>audiolibrary</b> - Possible values: cleanfinished, cleanstarted, remove, scanfinished, scanstarted, update</li>
|
||||
<li><b>currentAlbum</b> - album of the current song/musicvideo</li>
|
||||
@ -1781,10 +1781,10 @@ sub KODI_HTTP_Request($$@)
|
||||
<li><b>volume</b> - value between 0 and 100 stating the current volume setting</li>
|
||||
<li><b>year</b> - year of the movie being played</li>
|
||||
<li><b>3dfile</b> - is a 3D movie according to filename</li>
|
||||
<li><b>sd_<type><n>_<reading></b> - stream details of the current medium. type can be video, audio or subtitle, n is the stream index (a stream can have multiple audio/video streams)</li>
|
||||
<li><b>sd_<type><n>_<reading></b> - stream details of the current medium. type can be video, audio or subtitle, n is the stream index (a stream can have multiple audio/video streams)</li>
|
||||
</ul>
|
||||
<br><br>
|
||||
<u>Remarks on the events</u><br><br>
|
||||
<br/><br/>
|
||||
<u>Remarks on the events</u><br/><br/>
|
||||
<ul>
|
||||
The event <b>playStatus = playing</b> indicates a playback of a media item. Depending on the event <b>type</b> different events are generated:
|
||||
<ul>
|
||||
@ -1796,25 +1796,25 @@ sub KODI_HTTP_Request($$@)
|
||||
<li><b>type = unknown</b> generated events are: <b>file</b></li>
|
||||
</ul>
|
||||
</ul>
|
||||
<br><br>
|
||||
<br/><br/>
|
||||
<a name="KODIattr"></a>
|
||||
<b>Attributes</b>
|
||||
<ul>
|
||||
<li>compatibilityMode<br>
|
||||
<li>compatibilityMode<br/>
|
||||
This module can also be used to control Plex, since the JSON Api is mostly the same, but there are some differences.
|
||||
If you want to control Plex set the attribute <i>compatibilityMode</i> to <i>plex</i>.</li>
|
||||
<li>offMode<br>
|
||||
<li>offMode<br/>
|
||||
Declares what should be down if the off command is executed. Possible values are <i>quit</i> (closes Kodi), <i>hibernate</i> (puts system into hibernation),
|
||||
<i>suspend</i> (puts system into stand by), and <i>shutdown</i> (shuts down the system). Default value is <i>quit</i></li>
|
||||
<li>fork<br>
|
||||
<li>fork<br/>
|
||||
If Kodi does not run all the time it used to be the case that FHEM blocks because it cannot reach Kodi (only happened
|
||||
if TCP was used). If you encounter problems like FHEM not responding for a few seconds then you should set <code>attr <KODI_device> fork enable</code>
|
||||
which will move the search for Kodi into a separate process.</li>
|
||||
<li>updateInterval<br>
|
||||
<li>updateInterval<br/>
|
||||
The interval which is used to check if Kodi is still alive (by sending a JSON ping) and also it is used to update current player item.</li>
|
||||
<li>disable<br>
|
||||
<li>disable<br/>
|
||||
Disables the device. All connections will be closed immediately.</li>
|
||||
<li>jsonResponseReading<br>
|
||||
<li>jsonResponseReading<br/>
|
||||
When enabled then every received JSON message from Kodi will be saved into the reading <i>jsonResponse</i> so the last received message is always available.
|
||||
Also an event is triggered upon each update.</li>
|
||||
</ul>
|
||||
|
Loading…
x
Reference in New Issue
Block a user