Node module for accessing ISY99 home automation controller APIs.
$ npm install isy99
var isy = require("isy99")({host:'hostname',
user:'username',
pass:'password'
});
isy.getDeviceInfo('11 22 33 4', function(err, device) {
console.log(device.address); // '11 22 33 4'
console.log(device.name); // 'Kitchen Lights'
console.log(device.enabled); // true
console.log(device.status); // 255
console.log(device.statusFormatted); // 'On'
});
isy.sendDeviceCommand('11 22 33 4', 'DON', function(err, success) {
if(success) {
console.log('The light was turned on!')
}
});
isy.sendProgramCommand('1023', 'runIf', function(err, success) {
if(success) {
console.log("The program's 'If' logic was run");
}
});