@trickfilm400/solarlog-api
TypeScript icon, indicating that this package has built-in type declarations

0.0.5-v0-npm-354eabe3f5a98a1a3092464fd885e2f6bd85e96f.0 • Public • Published

solarlog-api

This NPM package provides a full nodejs-api for the Solar-Log device to fetch data of the solar-log device.

Tested with SolarLog 500 device.

Implements one part of the API which is documented here: https://github.com/iobroker-community-adapters/ioBroker.solarlog/blob/master/docs/solarlog_dataobjects.md (or: https://github.com/iobroker-community-adapters/ioBroker.solarlog/blob/9e92005e51ca10e3692319545688805ecb1396ec/docs/solarlog_dataobjects.md)

If you need more requests implemented, just create an issue.

Usage

  • Install NPM package from GitHub or NPM.
  • Function return a Promise

Example

import SolarLogAPI from "@trickfilm400/solar-log";

const client = new SolarLogAPI("<IP / Host of device", [0, 1, 2] /* Array of numbers of inverters*/);

client.getStatusAndProduction().then((res) => {
    console.log(res);
    /*
     * {
         status: { '0': 'MPP', '1': 'MPP', '2': 'MPP' },
         production: { '0': '566', '1': '588', '2': '846' }
        }
     *
     *
     */
}).catch(console.error);

© 2022-2024 Trickfilm400

Package Sidebar

Install

npm i @trickfilm400/solarlog-api

Weekly Downloads

2

Version

0.0.5-v0-npm-354eabe3f5a98a1a3092464fd885e2f6bd85e96f.0

License

MIT

Unpacked Size

5.86 kB

Total Files

8

Last publish

Collaborators

  • trickfilm400