jamesaduncan / givenergy

A Node.js interface to the GivEnergy API.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

A node.js API to the GivEnergy API

GivEnergy is a British battery storage manufacturer, that mainly does things for Solar PV installations. They have an API into their battery storage system, so I've been implementing a node.js client to access it.

This is not yet a complete implementation of their entire API, and is just a work in progress.

The API documentation is at GivEnergy's knowledge base website.

create a client

let client = new GivEnergy({
  username: 'a username',
  password: 'a password'
});

authenticate the client

await client.authenticate()

determine the client's authentication status

if ( client.authenticated ) console.log("client is authenticated");

inverters

console.log( client.inverters );

inverter details

let detail = await client.inverters[0].detail

current power generation

let current = await client.inverters[0].current;

get the plants connected to the system

let plants = await client.plants;
let plant  = plants[0];

get information about a plant.

let plants = await client.plants;
await plants[0].info;

get summary from a plant

let plants = await client.plants;
await plants[0].summary

get current runtime information from a plant

let plants = await client.plants;
await plants[0].current;

get devices attached to a plant

let plants = await client.plants;
await plants[0].devices;

About

A Node.js interface to the GivEnergy API.

License:ISC License


Languages

Language:JavaScript 100.0%