# node-ginlong

> NodeJS Ginlong SolarMan implementation

Latest version **0.9.3** (published 2020-10-17) · GPL-3.0-or-later license · 0 weekly downloads

## Install

```sh
npm install node-ginlong
pnpm add node-ginlong
yarn add node-ginlong
bun add node-ginlong
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; large bundle; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.9.3 |
| Published | 2020-10-17 |
| First published | 2020-06-01 |
| Weekly downloads | 0 |
| License | GPL-3.0-or-later |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=0.10 |
| Dependencies | 4 |
| Unpacked size | 24.7 MB |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 9 |
| Author | Jan Van Belle |
| Maintainers | herrjones |
| Keywords | ginlong, solar, solarman, solis, protocol, api |

## Links

- npm: https://www.npmjs.com/package/node-ginlong
- Repository: https://github.com/herrJones/node-ginlong
- Homepage: https://github.com/herrJones/node-ginlong#readme
- Issues: https://github.com/herrJones/node-ginlong/issues
- npm.io page: https://npm.io/package/node-ginlong

## Dependencies (4)

- [net](https://npm.io/package/net.md) ^1.0.2
- [events](https://npm.io/package/events.md) ^3.1.0
- [sqlite3](https://npm.io/package/sqlite3.md) ^5.0.0
- [binary-parser](https://npm.io/package/binary-parser.md) ^1.6.2

## Recent versions

- 0.9.3 (latest) — 2020-10-17
- 0.9.2 — 2020-09-25
- 0.9.1 — 2020-09-20
- 0.5.0 — 2020-06-01

## README

# node-ginlong
Node.JS module parsing of Ginlong/Solis pv-panel data 

Inspired by the various python implementations (ginlong-wifi / ginlong-mqtt / domoticz / ...)
Improved by adding an extra protocol.

Protocols available:
* *Solarman-1*
* ***Solarman-Ethernet***

The received data is stored in a SQLite database.
The previously used Loki.JS database has been dropped.
A conversion script has been created to convert existing data into a sqlite database

It is up to the main program to do something with the received data.
Via settings, the module can emit events on reception of new data.

3 testing programs are provided (WIP):
* **ginlongTest** : can send data (from CSV file) as if it were an inverter
* **ginlongServer** : demo module for receiving data from an inverter
* **convert_db** : convert previous LokiJS database to SQLite. (The LokiJS database must be placed in the same folder as this script)

## Quick-start

```javascript
const solarSrv = require('node-ginlong')
var solarData = new solarSrv();
solarData.create();

const settings = solarData.settings;
settings.verbose = false;
settings.events = true;
settings.db_path = 'my_local_path';
solarData.settings = settings;

function getData() {
    const db = solarData.db;
    // *****
}

const statistics = await solarData.getStats();

solarData.on('data', (data) => {
  // do something
})
```

---
_Source: https://npm.io/package/node-ginlong · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
