2.2.3 • Published 4 years ago

sma_modbus v2.2.3

Weekly downloads
1
License
MIT
Repository
github
Last release
4 years ago

SMA Modbus

NPM

Introduction

The module provides easy access to the data provided by SMA devices with ModBus support.

It automatically establishes a new connection on disconnect, and parses incoming byte data to their respective format.

Typescript definitions are included out-of-the-box.

Usage

Common requests are included for some devices, such as:

  • current battery percentage of Sunny Island devices
  • power of Sunny Boy devices
  • total production of Sunny Boy devices
  • etc.

If more advanced requests are required, the library provides a easy method to access all registers with automatic data parsing.

The register values can be found on SMAs website under "Downloads" -> "Technical Information" -> "Modbus Interface". An Excel file containing all registers with datatype and description can be downloaded.

Examples

// require or import can be used to acquire the package
const SMA = require('sma_modbus');
let sunnyIsland = new SMA.SunnyIsland("192.168.188.60", 502);
sunnyIsland.getPower().then((x) => {
        console.log("Power: " + x + " W");
});

// Modbus addresses and datatypes can be found in the SMA docs
sunnyIsland.readModbus(40073, SMA.ModbusDatatype.uint16).then((x) => {
    console.log("Interface speed: " + x + " Mb/s");
});
2.2.3

4 years ago

2.2.2

5 years ago

2.2.1

5 years ago

2.2.0

5 years ago

2.1.1

5 years ago

2.1.0

5 years ago

2.0.0

5 years ago

1.0.5

5 years ago

1.0.4

5 years ago

1.0.3

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago