Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

indigo-ez

danshev17BSD-2-Clause0.1.2

Node.js wrapper for using the Indigo home automation server's REST API

indigo, automation, REST

readme

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
});