jeedom-local

1.0.0 • Public • Published

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

Readme

Keywords

Package Sidebar

Install

npm i jeedom-local

Weekly Downloads

1

Version

1.0.0

License

MIT

Unpacked Size

7.17 kB

Total Files

5

Last publish

Collaborators

  • jgobillot