0.1.2 • Published 10 years ago
indigo-ez v0.1.2
Indigo-EZ
Node.js wrapper for using the Indigo home automation server's REST API
Installation
npm install indigo-ez
Usage
The Indigo 6 server and this module both default to digest authentication, reference the Needle module's documentation if you need to change this. You can optionally provide a third ('port') parameter when requiring this module
var indigo = require('indigo-ez')('username','password'),
setVariable = indigo.setVariable,
getVariable = indigo.getVariable;
setVariable('alarmState', 'true', function(err, res){
if(err){ console.log(err); }
console.log(res); // ==> true
});
getVariable('alarmState', function(err, res){
if(err){ console.log(err); };
console.log(res); // ==> object with full details
});