Skip to content

A Node.JS module, which provides a simplified object oriented wrapper for the Domoticz API.

License

Notifications You must be signed in to change notification settings

madgeni/domoticz-api

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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 sunrise and sunset :

api.getSunriseSunset(function (error, data) {
    console.log(data);
});

Licence

MIT license. See the LICENSE file for details.

About

A Node.JS module, which provides a simplified object oriented wrapper for the Domoticz API.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%