mirror of
https://github.com/skydiver/ewelink-api.git
synced 2025-12-24 14:31:53 +01:00
ec66219ed7251d30c3fd55458bf9fcf914d294bb
* added multi-channel device * added get and set power state * added some fixes * add “this” to call class methods * create params object before build payload * typo fixed on “switches” param * added new test cases * improved error message * added more test cases * added authentication error * added fix channel number too high * added region change if wrong * linting + small fixes * linting + renamed method * linting
ewelink-api
eWeLink API for Node.js
Installation
npm install ewelink-api
Usage
const ewelink = require('ewelink-api');
(async () => {
const conn = new ewelink({
email: '<your ewelink email>',
password: '<your ewelink password>',
});
/* get all devices */
const devices = await conn.getDevices();
console.log(devices);
})();
Check demo/ directory for more examples.
Languages
JavaScript
100%