node-hoganas-energi
v1.0.3
Published
Retrieves energi data from Hoganas Energi using your credentials
Downloads
10
Readme
node-hoganas-energi
Install
npm install node-hognas-energi
Methods
/**
* Retrieves a month report. If year and month are not passed
* it will take the current month
* @param {string} username Username at Höganäs Energi
* @param {string} password Password at Höganäs Energi
* @param {number/function} p1 Year of report (YYYY) or callback (gets current year and month)
* @param {number} p2 Month of report or empty (1-12)
* @param {function} p3 callback function or empty
*/
getMonth = function(username, password, p1, p2, p3)
/**
* Get report for a specific day
* @param {string} username Username at Höganäs Energi
* @param {string} password Password at Höganäs Energi
* @param {Date} date Date object for specific day
* @param {function} callback callback function for result
*/
getDay = function(username, password, date, callback)
/**
* Retreives the consumption from yesterday
* @param {string} username Username at Höganäs Energi
* @param {string} password Password at Höganäs Energi
* @param {function} callback callback function
*/
getYesterday = function(username, password, callback)
Example
var nodeHoganasEnergi = require("node-hoganas-energi")
// uid = 123456, pwd = 101112
nodeHoganasEnergi.getYesterday('123456', '101112',function(m){
console.log(m);
})