Skip to content

Kodi / CoreELEC

Kodi (and CoreELEC) is a real player as well as a library. It opens URLs and paths — including stream URLs resolved by Jellyfin or Plex — and reports playback back to reMaestro.

Talks to Kodi over JSON-RPC on HTTP port 8080, with a WebSocket on port 9090 for instant playback notifications; it falls back to HTTP polling if the WebSocket is unavailable. Kodi instances are found over mDNS. Authentication is an optional username and password.

  • host and port — the Kodi machine and its JSON-RPC HTTP port (8080).
  • wsPort — the WebSocket notification port (9090).
  • username / password — Kodi web-interface credentials, if set.

It is a whole remote, not just a transport. Every command id below is one the shared command vocabulary already knows, so a remote drawn against nav.up or color.red reaches a Kodi box with nothing to map by hand — and the driver ships a layout of its own, offered as soon as a Kodi is added.

CommandWhat it does
up / down / left / right / selectThe d-pad
back / home / menu / info / exitThe keys around it — menu is Kodi’s context menu
page_up / page_downPage through a long list
settings / guide / channel_list / recordingsJump straight to a screen
top_menuThe root menu of a DVD or Blu-ray
play_pause / pause / resume / stopControl playback
next / previousMove through a playlist or between chapters
rewind / fast_forwardStep through Kodi’s scan speeds
seek_relative / seek_toSeek by an amount, or to a position
recordLive TV, with a PVR add-on enabled
volume_up / volume_down / set_volumeVolume, stepped by the box or set outright
mute / mute_on / mute_offMute as a toggle, or either half of it
channel_up / channel_downPVR channel change
number_0number_9, enter, backspaceNumber entry
red / green / yellow / blueThe colour keys, for teletext and the PVR
subtitle / audio_track / aspect_ratioMedia options for whatever is playing
launch_appRun a Kodi add-on by id, e.g. plugin.video.youtube
textType into whatever Kodi has focused
raw_commandAny Kodi action by name — the long tail
openPlay a URL or path (e.g. a Jellyfin/Plex stream URL)

It carries media.player and media.library traits. It reports rich playback.* and volume.changed state, and extracts the Jellyfin item id from a stream URL so playback ties back to the source.

A press is a press. The navigation keys go to Kodi as Input.* calls, which it accepts, queues and acknowledges — exactly as a real remote puts a pulse in the air. Success means the box took the press, not that something on screen moved. The commands that genuinely need something to be playing say so instead: pressing Next or Subtitles at an idle box reports that nothing was playing, rather than quietly doing nothing. Stop is the exception, because a box that is already stopped has done what was asked.

Which Kodi it is. The driver asks the box once, and reports it as version (e.g. 20.2 (Nexus)) and apiVersion (e.g. 13.3.0). That matters because a house can hold two boxes several major versions apart: Kodi’s action list is a closed set that grows release by release, so a command can be perfectly correct and still impossible on the box in front of it. When that happens the failure names the box, the version and the action it would not take — rather than the raw JSON-RPC error.

Power is deliberately absent. Kodi can shut its own box down, and nothing here can turn it back on — a Kodi that is off has no JSON-RPC port to ask. A power-off with no route back is worse than no power control at all, so neither is offered. Suspend, reboot and party mode are left out for a different reason: the shared vocabulary has no honest name for them, and the nearest-looking alias (sleep, which belongs to power-off) would map them to the wrong thing.

Kodi is a good target for the open command: point Jellyfin or Plex stream_url output at it via a rule to play resolved content.