A wrapper for the xbmc jsonrpc interface
This module provides a simple way to communicate with an Kodi media center installation.
It should not be restricted to a specific version of kodi, as it pulls all its information about the available methods from
npm install xbmc-ws
var kodi = require'xbmc-ws';kodi'localhost' 9090then/* Do something with the connection */;
The connection object emits the following events:
Emitted whenever the underlying websocket throws an error.
Emitted if the underlying socket is closed.
Assigns a handler to a notfication sent by connection. The
cb function will be passed a single argument containing the notifications data.
method should be a string containing the notifications name.
Runs the specified method. This function can be passed Parameters:
The method returns a promise, which will be fulfilled as soon as the server responds. Multiple arguments can be passed either by order, or as an object by name:
var movies = connectionrunVideoLibraryGetMovies'title' 'rating' 'year' "start" : 0 "end": 2;
Arguments by name:
var movies = connectionmethods'VideoLibrary.GetMovies'properties: 'title' 'rating' 'year'limits: "start" : 0 "end": 2;