1.0.9 • Published 10 years ago

domoticz-api v1.0.9

Weekly downloads
17
License
SEE LICENSE IN <L...
Repository
github
Last release
10 years ago

JavaScript Domoticz API for Node.JS

A Node.JS module, which provides a simplified object oriented wrapper for the Domoticz API. No properties which begin with uppercase or a multitude of parameters !

This API can determine the specific type of your devices (WallPlug, PowerNode, ...).

Installation

      $ npm install domoticz-api      

Usage

Default usage :

var Domoticz = require('./api/domoticz');

var api = new Domoticz();

Or you can use params :

var Domoticz = require('./api/domoticz');

var api = new Domoticz({protocole: "https", host: "192.168.0.20", port: 8080, username: "wifsimster", password: "_password_"});

Get an existing device :

api.getDevice({
    idx: 134
}, function (error, device) {
    console.log(device);
});

Get all devices used :

api.getDevices({
    filter: 'all',
    used: 'true',
    order: 'Name'
}, function (error, devices) {
    console.log(devices);
});

Get the generic type of a device like Switch, Power, Thermometer, ...

console.log(api.getGenericType(device));

Get the number of device siblings, useful for OpenZWave devices

api.getNumberSiblings(device, function (count) {
    console.log(count + 'siblings found for this device !');
});

Licence

MIT license. See the LICENSE file for details.

1.0.9

10 years ago

1.0.8

10 years ago

1.0.7

10 years ago

1.0.6

10 years ago

1.0.5

10 years ago

1.0.4

10 years ago

1.0.3

10 years ago

1.0.2

10 years ago

1.0.1

10 years ago

1.0.0

10 years ago