apc-ups-broker
v1.0.2
Published
Used for formating data into structured JSON from APC UPSs
Downloads
12
Readme
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
| Name| Unit| Description | -------- | -------- | -------- | | linev | V | Input voltage | loadpct | % | Output load | bcharge | % | Battery charge level | timeleft | Min. | Time left to shutdown (battery) | mbattchg | % | Minimal battery charge level | mintimel | Min. | Minimal battery runtime | outputv | V | Output voltage | dwake | Sec. | Time before power on after power restore | dshutd | Sec. | Delay for shutdown command | lotrans | V | Low transfer (low voltage to start transfer) | hitrans | V | High transfer (high voltage to start transfer) | retpct | % | Battery level required to turn on | itemp | °C / °F | UPS temperature | battv | V | Battery voltage | linefreq | Hz | Input frequency | numxfers | Number | Total count of transfers | tonbatt | Sec. | Current time on battery | cumonbatt | Sec. | 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
apcupsd Docs. Note: different models can have different fields in status.
➤ License
Distributed under the Apache-2.0 License. See LICENSE for more information.