Gathering detailed insights and metrics for @woifes/node-yasdi
Gathering detailed insights and metrics for @woifes/node-yasdi
Gathering detailed insights and metrics for @woifes/node-yasdi
Gathering detailed insights and metrics for @woifes/node-yasdi
npm install @woifes/node-yasdi
Typescript
Module System
Node Version
NPM Version
Cumulative downloads
Total Downloads
Last Day
0%
NaN
Compared to previous day
Last Week
0%
0
Compared to previous week
Last Month
0%
0
Compared to previous month
Last Year
0%
0
Compared to previous year
This package binds the yasdi library to a nodeJS package which may be used for other projects. The yasdi library is a open source library provided by SMA, which enables the connection to SMA products. This package was only used for/used with:
On windows I only succeeded to compile the bindings but did not try it
Please check the source code before using this package
1npm install @woifes/node-yasdi
1import { NodeYasdi } from "@woifes/node-yasdi"; 2 3const nodeYasdi = new NodeYasdi("myPlant", { 4 expectedDeviceCount: 3, 5 //serialPorts: ["path/to/serialDevice"] //on linux you can also use a link as a device like "/dev/serial/by-path/<usbDeviceLink>" 6 //iniFileDir: "path/to/dir/where/iniFile/may/be/created 7}, "path/to/iniFile.ini"); //either provide 'serial ports' and 'iniFileDir' in config, or the ini file directly 8await once(nodeYasdi, "deviceSearchEnd"); //the yasdi library can not fetch data before this event 9 10let inverter01 = nodeYasdi.getInverterBySerial(nodeYasdi.handles[0]); 11 12let values = await inverter01.getData(5);
1pnpm run createIni 2> my.ini #follow instructions to create a yasdi compatible ini file 2 3pnpm run shell <path/to/my.ini> #run the shell with a given ini file
Here are the instructions how one can build a custom version of the yasdi library into this package (according to LGPL v2.1 with statically linked libraries). (It is assumed that the nodeJS related development is known.)
The following list describes where you find the different parts involved in the build:
bin/yasdi-1.8.1build9-src/os/os_linux.h
: changed include from
#include <termio.h>
to #include <termios.h>
so that it compiles on alpine
linuxFor running the build see the following section.
Build yasdi library and bindings:
1pnpm run build
TypeScript build:
1pnpm run compile
Run tests:
1pnpm test
No vulnerabilities found.
No security vulnerabilities found.