pvoutput-nodejs
v0.0.2
Published
PVoutput nodejs project to send data to pvoutput. Based on http://pvoutput.org/help.html#api-getting-started
Downloads
1
Readme
PVoutput-NodeJS
PVoutput nodejs project to send data to pvoutput. Based on http://pvoutput.org/help.html#api-getting-started
Installation
npm install https://github.com/CONNCTED/PVoutput-NodeJS --save
Usage
Create a new file 'my-pvoutput.js'
var PVoutputAPI = require('pvoutput-nodejs');
var pvoutput = new PVoutputAPI({
debug: false,
apiKey: "xxx",
systemId: "xxx"
});
module.exports = pvoutput;
In another nodejs file
var pvoutput = require('./my-pvoutput');
var timestamp = 1451936700000;
var solarWatt = 6000;
var solarWattHour = 400;
var consumptionWatt = 12000;
var consumptionWattHour = 650;
pvoutput.send(timestamp, solarWatt, solarWattHour, consumptionWatt, consumptionWattHour, function(statusCode, body) {
console.log(body);
});