1.0.2 • Published 12 months ago

apc-ups-broker v1.0.2

Weekly downloads
-
License
Apache-2.0
Repository
github
Last release
12 months ago

APC UPS Broker

Used to format data into JSON format from APC UPSs using apcupsd daemon via TCP by default port 3551

🛠️ Install package

npm install apc-ups-broker

🧑🏻‍💻 Usage

var APCBroker = require('apc-ups-broker');

(async () => {
    var test = new APCBroker();

    test.on('values', data => console.log(data));

    setInterval(() => test.get('values'), 5000);
})();

Values fields

NameUnitDescription
linevVInput voltage
loadpct%Output load
bcharge%Battery charge level
timeleftMin.Time left to shutdown (battery)
mbattchg%Minimal battery charge level
mintimelMin.Minimal battery runtime
outputvVOutput voltage
dwakeSec.Time before power on after power restore
dshutdSec.Delay for shutdown command
lotransVLow transfer (low voltage to start transfer)
hitransVHigh transfer (high voltage to start transfer)
retpct%Battery level required to turn on
itemp°C / °FUPS temperature
battvVBattery voltage
linefreqHzInput frequency
numxfersNumberTotal count of transfers
tonbattSec.Current time on battery
cumonbattSec.Total time on battery

All fields in status response can be found in ubuntu apcupsd docs. Note: Different ups can have different status fields, which you can find out on apcupsd docs.

🛠️ Tech Stack

🙇 Acknowledgements

➤ License

Distributed under the Apache-2.0 License. See LICENSE for more information.

1.0.2

12 months ago

1.0.1

12 months ago

1.0.0

12 months ago