Linky
Easily retrieve your Linky power consumption
If you are looking for a command-line tool, check out linky-cli
Install
$ npm i @bokub/linky
Usage
const linky = require('@bokub/linky');
linky.login('my-email@example.com', 'password').then(session => {
session.getDailyData().then(data => {
console.log(data);
});
session.getDailyData({ start: '24/08/2018', end: '06/09/2018' }).then(data => {
console.log(data);
});
});
API
login(email, password)
Log into you customer area and retrieve a session that you can use to retrieve your power consumption
session.getHourlyData([options])
Retrieve power consumption with a step of 30 minutes
Default time period: Yesterday
session.getDailyData([options])
Retrieve power consumption with a step of 1 day
You cannot retrieve more than 31 days at once
Default time period: Last 31 days
session.getMonthlyData([options])
Retrieve power consumption with a step of 1 month
You cannot retrieve more than 12 months at once
Default time period: Last 12 months
session.getYearlyData([options])
Retrieve all your power consumption with a step of 1 year
You cannot use a custom time period