Please note, this project isn't being updated anymore - you are welcome to fork it and continue development
Node interface for Kodi using JSON-RPC.
var kodi_rpc = require('node-kodi');
var kodi = new kodi_rpc({
url: <Kodi HOST>,
user: <Kodi USERNAME>,
password: <Kodi PASSWORD>
});
kodi.player.getCurrentlyPlayingVideo().then(function(r) {
console.log(r);
});
kodi.input.sendText({"text": "This text is sent to Kodi"}).then(function(r) {
console.log(r);
});
// OR
kodi.input.sendText('This text is sent to Kodi').then(function(r) {
console.log(r);
});