Skip to content
A node.js module to interface with the ELIQ API promise style.
JavaScript
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
lib
test
.editorconfig
.gitignore
.jshintrc
.travis.yml
LICENSE
README.md
package-lock.json
package.json

README.md

eliq-promise

NPM version Downloads Build Status

A node.js module to interface with the ELIQ API promise style.

Prerequisites

ELIQ access token

Install

npm install eliq-promise

API

Setup

var config = {
  eliqAccesstoken: '...',
},
eliq = require('eliq-promise')(config);

Now

eliq.getNow().then(console.log).catch(console.log);
=>
{ createddate: '2015-03-10T05:38:20', power: 1285 }

From

eliq.getFrom(<hours ago>, '6min' | 'hour' | 'day').then(console.log).catch(console.log);
=>
{ startdate: '2015-03-10T00:00:00+00:00',
  enddate: '2015-03-10T01:00:00+00:00',
  intervaltype: '6min',
  data:
   [ { avgpower: 1170,
       energy: 117,
       temp_out: null,
       time_start: '2015-03-10T00:00:00',
       time_end: '2015-03-10T00:06:00' },
   ...
   ]
}

From => To

eliq.getFromTo (<startdate>, <enddate>, '6min' | 'hour' | 'day').then(console.log).catch(console.log);
=>
{ startdate: '2015-03-02T20:00:00+00:00',
  enddate: '2015-03-02T23:00:00+00:00',
  intervaltype: '6min',
  data:
   [ { avgpower: 2790,
       energy: 279,
       temp_out: null,
       time_start: '2015-03-02T20:00:00',
       time_end: '2015-03-02T20:06:00' },
    ...
   ]
}

Notes

  • It seems like the 6min resolution is limited to 1 hour when just supplying startdate.
  • ELIQ's uptime is not 99.9998%.
You can’t perform that action at this time.