I'm trying to control my OSMC via SSH. I'm sending commands via an SSH link with a Crestron Control system and want to play files directly from that interface as well as stop play and any other available transport controls and menu Navigation controls via SSH or some other Ethernet control protocol. Would love to add CEC control too at some point. But I'll cross that bridge later.

  • fancy seeing you here. :)
    – Accentrix
    Mar 17 '16 at 4:34

You can use the xbmc-send command. For example to make the video window the active window you would enter this:

xbmc-send --action="ActivateWindow(Videos)"

A list of the built in actions can be found here.

I could not find how to get the currently playing title using xbmc, but there is a JSON-RPC API, some examples can be found here, and this question explains how to get the currently playing title using it.

To access the API endpoint you will need to make sure HTTP control is enabled. To do this:

  • select the system menu
  • then the settings menu
  • then services
  • then Web Server
  • ensure that Allow remote control via HTTP is checked and note the Port number

You will also need the IP address of your Pi.

from the command line enter the following:

curl --data-binary '{
    "jsonrpc": "2.0",
    "method": "Player.GetItem",
    "params": {
        "properties": [
        "playerid": 1
    "id": "VideoGetItem"
}' -H 'content-type: application/json;' http://IP address:port number/jsonrpc

replacing "IP Address" and "port number" in the above with yours.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.