pvoutput-nodejs

0.0.2 • Public • Published

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);   
});

Readme

Keywords

none

Package Sidebar

Install

npm i pvoutput-nodejs

Weekly Downloads

3

Version

0.0.2

License

none

Last publish

Collaborators

  • adeptive