jeedom-local
v1.0.0
Published
An asynchronous client library for the API of Jeedom in local network.
Downloads
2
Readme
Jeedom Local 1.0.0
An asynchronous client library for the API of Jeedom in local network.
const JeedomLocal = require('jeedom-local');
const client = new JeedomLocal({
base_url: '',
api_key: ''
});
client.command(5)
.then(console.log)
.catch(console.error);
Installation
npm install jeedom-local
You will need to retrieve your api key and internal ip. You can follow instructions here.
const JeedomLocal = require('jeedom-local');
const client = new JeedomLocal({
base_url: 'http://<internal ip>',
api_key: '<api key>'
});
Requests
You can use the defined client methods to call endpoints.
client.message('test', 'Add message in message center');
Promises
The request will return Promise.
client.fullData()
.then(function (data) {
console.log(data);
})
.catch(function (e) {
throw e;
});