2018-05-20, 06:36 PM
Hi all. I am an experienced developer, but new to using NextPVR. I am looking to use an executable that can take advantage of the Sky Q's capability to be controlled over the local network via NodeJS. I have no idea whether this is possible or not.
A complete list of possible commands the box will accept can be found on this page: https://github.com/dalhundal/sky-remote. I think covers almost all of the functions you can achieve using the Sky Q remote.
An example of some simple NodeJs code looks as below:
Does anyone have any example scripts they use? I am assuming that I may have to do something like write out some dynamic parameters to a text file with the NodeJS code in, then execute that, but I could be barking completely up the wrong tree. All I need really is a toe hold to get me started, then I should be alright from there.
Any help gratefully received.
Thanks
A complete list of possible commands the box will accept can be found on this page: https://github.com/dalhundal/sky-remote. I think covers almost all of the functions you can achieve using the Sky Q remote.
An example of some simple NodeJs code looks as below:
Code:
ar SkyRemote = require('sky-remote');
// var remoteControl = new SkyRemote('192.168.1.157', SkyRemote.SKY_Q);
var remoteControl = new SkyRemote('192.168.1.157');
// Simple - just send a command
// remoteControl.press('channelup');
// Nice - send commands with a callback
remoteControl.press(['4', '0', '1', 'select'], function(err) {
if (err) {
console.log("Woah! Something went wrong. Cry time.");
} else {
console.log("I just pressed the Channel Up command.");
};
});
Does anyone have any example scripts they use? I am assuming that I may have to do something like write out some dynamic parameters to a text file with the NodeJS code in, then execute that, but I could be barking completely up the wrong tree. All I need really is a toe hold to get me started, then I should be alright from there.
Any help gratefully received.
Thanks