SensorLab2 commands module
This node module builds a set of commands to control a SensorLab observer given its REST API port and host.
sensorlab-commands is available via NPM:
npm install sensorlab-commands --save
var commands;
commands = require('sensorlab-commands')('observer-X.local', 5555, false);
function onSuccess(status){
console.log('status: ', status);
}
function onError(error, response, body){
console.log('error: ', error, ' response: ', response, ' body: ', body);
}
commands.node.status(onSuccess, onError);
var commands,
promise;
commands = require('sensorlab-commands')('observer-X.local', 5555, true);
promise = commands.node.status();
promise.then( function(status){ console.log('status: ', status) });
Mozilla Public License Version 2.0 (MPL-2.0). Copyright 2016 Orange