From b5f9372cf17493655229217509a6058a347dd54e Mon Sep 17 00:00:00 2001
From: vbs <>
Date: Thu, 26 Apr 2018 21:12:32 +0000
Subject: [PATCH] 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
---
fhem/FHEM/70_KODI.pm | 82 ++++++++++++++++++++++----------------------
1 file changed, 41 insertions(+), 41 deletions(-)
diff --git a/fhem/FHEM/70_KODI.pm b/fhem/FHEM/70_KODI.pm
index 3ef270888..f89a641b9 100644
--- a/fhem/FHEM/70_KODI.pm
+++ b/fhem/FHEM/70_KODI.pm
@@ -1611,53 +1611,53 @@ sub KODI_HTTP_Request($$@)
Define
define <name> KODI <ip[:port]> <http|tcp> [<username>] [<password>]
-
+
- This module allows you to control Kodi and receive events from Kodi. It can also be used to control Plex (see attribute compatibilityMode).
+ This module allows you to control Kodi and receive events from Kodi. It can also be used to control Plex (see attribute compatibilityMode).
Prerequisites
- Requires XBMC "Frodo" 12.0.
- - To use this module you will have to enable JSON-RPC. See here.
- - The Perl module JSON is required.
- On Debian/Raspbian: apt-get install libjson-perl
+ - To use this module you will have to enable JSON-RPC. See here.
+ - The Perl module JSON is required.
+ On Debian/Raspbian: apt-get install libjson-perl
Via CPAN: cpan install JSON
To get it working on a Fritzbox the JSON module has to be installed manually.
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 here.
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 here.
+ See here.
- Example:
+ Example:
define htpc KODI 192.168.0.10 tcp
-
+
define htpc KODI 192.168.0.10:9000 tcp # With custom port
-
+
define htpc KODI 192.168.0.10 http # Use HTTP instead of TCP - Note: to receive events use TCP!
-
+
define htpc KODI 192.168.0.10 http kodi passwd # Use HTTP with credentials - Note: to receive events use TCP!
-
+
- Remote control:
+ Remote control:
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:
+ following commands:
define <rc_name> remotecontrol #adds the remote control
-
+
set <rc_name> layout KODI_RClayout #sets the layout for the remote control
-
+
set <rc_name> makenotify <KODI_device> #links the buttons to the actions
-
+
- Known issues:
+ Known issues:
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($$@)
Set
set <name> <command> [<parameter>]
-
- This module supports the following commands:
+
+ This module supports the following commands:
- Player related commands:
+ Player related commands:
- play [<all|audio|video|picture>] - 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
- pause [<all|audio|video|picture>] - pauses the playback
@@ -1678,7 +1678,7 @@ sub KODI_HTTP_Request($$@)
- stop [<all|audio|video|picture>] - stop the playback
- next [<all|audio|video|picture>] - jump to the next track
- prev [<all|audio|video|picture>] - jump to the previous track or the beginning of the current track.
- - goto <position> [<audio|video|picture>] - Goes to the in the playlist. has to be a number.
+ - goto <position> [<audio|video|picture>] - Goes to the in the playlist. has to be a number.
- shuffle [<toggle|on|off>] [<audio|video|picture>] - Enables/Disables shuffle mode. Without furhter parameters the shuffle mode is toggled.
- repeat <one|all|off> [<audio|video|picture>] - Sets the repeat mode.
- open <URI> - Plays the resource located at the URI (can be a url or a file)
@@ -1689,7 +1689,7 @@ sub KODI_HTTP_Request($$@)
- addon <addonid> <parametername> <parametervalue> - Executes addon with one Parameter, for example set kodi addon script.json-cec command activate
- seek <hh:mm:ss> - seek to the specified time
-
Input related commands:
+
Input related commands:
- back - Back-button
- down - Down-button
@@ -1705,14 +1705,14 @@ sub KODI_HTTP_Request($$@)
- send <text> - Sends <text> as input to Kodi
- jsonraw - Sends raw JSON data to Kodi
-
Libary related commands:
+
Libary related commands:
- videolibrary clean - Removes non-existing files from the video libary
- videolibrary scan - Scan for new video files
- audiolibrary clean - Removes non-existing files from the audio libary
- audiolibrary scan - Scan for new audio files
-
Application related commands:
+
Application related commands:
- activatewindow <name> - activates the window "name" of the following list:
- AddonSearch
- Addons
- Albums
- AndroidApps
- Artists
- Compilations
- EventLog
- FileManager
- Genres
- InProgressTvShows
- MovieActors
- MovieCountries
- MovieDirectors
- MovieGenres
- MovieInformation
- MovieSets
- MovieStudios
- MovieTags
- MovieTitles
- MovieYears
- Movies
- MusicAddons
- MusicFiles
- MusicPlaylists
- MusicRoot
- MusicVideoAlbums
- MusicVideoArtists
- MusicVideoDirectors
- MusicVideoGenres
- MusicVideoStudios
- MusicVideoTitles
- MusicVideoYears
- MusicVideos
- ProgramAddons
- RecentlyAddedAlbums
- RecentlyAddedEpisodes
- RecentlyAddedMovies
- RecentlyAddedMusicVideos
- RecentlyPlayedAlbums
- Settings
- Singles
- Song
- SubTitles
- Top100
- Top100Albums
- Top100Songs
- TvShowActors
- TvShowGenres
- TvShowStudios
- TvShowTitles
- TvShowYears
- TvShows
- VideoAddons
- VideoFiles
- VideoPlaylists
- VideoRoot
- Years
@@ -1724,7 +1724,7 @@ sub KODI_HTTP_Request($$@)
- quit - closes Kodi
- off - 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.
-
System related commands:
+
System related commands:
- eject - will eject the optical drive
- shutdown - the Kodi host will be shut down
@@ -1734,19 +1734,19 @@ sub KODI_HTTP_Request($$@)
- connect - try to connect to the Kodi host immediately
-
+
Messaging
- To show messages on Kodi (little message PopUp at the bottom right egde of the screen) you can use the following commands:
- set <KODI_device> msg <title> <msg> [<duration>] [<icon>]
+ To show messages on Kodi (little message PopUp at the bottom right egde of the screen) you can use the following commands:
+ set <KODI_device> msg <title> <msg> [<duration>] [<icon>]
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.
-
- Generated Readings/Events:
+
+ Generated Readings/Events:
- audiolibrary - Possible values: cleanfinished, cleanstarted, remove, scanfinished, scanstarted, update
- currentAlbum - album of the current song/musicvideo
@@ -1781,10 +1781,10 @@ sub KODI_HTTP_Request($$@)
- volume - value between 0 and 100 stating the current volume setting
- year - year of the movie being played
- 3dfile - is a 3D movie according to filename
- - sd__ - 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)
+ - sd_<type><n>_<reading> - 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)
-
- Remarks on the events
+
+ Remarks on the events
The event playStatus = playing indicates a playback of a media item. Depending on the event type different events are generated:
@@ -1796,25 +1796,25 @@ sub KODI_HTTP_Request($$@)
- type = unknown generated events are: file
-
+
Attributes
- - compatibilityMode
+ - compatibilityMode
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 compatibilityMode to plex.
- - offMode
+ - offMode
Declares what should be down if the off command is executed. Possible values are quit (closes Kodi), hibernate (puts system into hibernation),
suspend (puts system into stand by), and shutdown (shuts down the system). Default value is quit
- - fork
+ - fork
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 attr <KODI_device> fork enable
which will move the search for Kodi into a separate process.
- - updateInterval
+ - updateInterval
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.
- - disable
+ - disable
Disables the device. All connections will be closed immediately.
- - jsonResponseReading
+ - jsonResponseReading
When enabled then every received JSON message from Kodi will be saved into the reading jsonResponse so the last received message is always available.
Also an event is triggered upon each update.