npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

cyberpower-powerpanel-status

v1.0.0

Published

NPM to get the status from a Cyberpower USB connected UPS. Requires Cyberpower Powerpanel Business 4.x or higher.

Downloads

1

Readme

cyberpower-powerpanel-status

Get the status from a Cyberpower USB connected UPS. Requires Cyberpower Powerpanel Business 4.x or higher.

Tested only on Windows.

Note that this lib is not actively maintained as it does everything I need it to do in its current state. If you need additional functionality, I suggest you fork it.

Overview

If you want to log the stats of your USB connected Cyberpower on Windows, it's not that straightforward if you have their PowerPanel software installed.

If you install the Cyberpower Powerpanel Business (instead of Personal) the software is a web app server that uses a REST API.

This little lib logs into the Powerpanel Business web server, makes a request for the current status and returns a JSON object.

From there, you can post it into a database or whatever you want to do with it.

Install

npm install cyberpower-powerpanel-status

Sample Usage

var PowerPanelStatus, ecb, options, scb, status;

PowerPanelStatus = require("cyberpower-powerpanel-status");

// If you have PowerPanel Business 4.x installed, this would be the default 
// connection URL and credentials. Change this to reflect your own setup.
options = {
  base_url: "http://localhost:3052",
  user_name: "admin",
  password: "admin"
};

status = new PowerPanelStatus(options);

scb = function(response) {
  console.log("Success!");
  return console.log(response);
};

ecb = function(err) {
  console.error("Error!");
  return console.log(err);
};

status.fetch(scb, ecb);

Sample Output:

{
  communicationAvaiable: true,
  deviceId: 0,
  onlyPhaseArch: false,       
  input: {
    state: 0,
    stateText: 'Normal',      
    voltages: [ '120.0 V' ],  
    currents: null,
    frequencies: null,        
    powerFactors: null,       
    available: true
  },
  output: {
    state: 0,
    stateText: 'Normal',      
    outlet1: null,
    outlet2: null,
    voltages: [ '120.0 V' ],  
    currents: null,
    frequencies: null,
    powerFactors: null,
    loads: [ '25 %' ],
    watts: [],
    vas: [],
    activePowers: null,
    apparentPowers: null,
    reactivePowers: null,
    available: true
  },
  battery: {
    state: 0,
    stateText: 'Normal, Fully Charged',
    voltage: '13.1 V',
    capacity: '100 %',
    remainingRunTimeInSecs: 1335,
    remainingRunTimeFormated: '0hr. 22min.',
    remainingRuntimeInsufficient: false,
    modularUpsRuntimeZero: false,
    chargeTimeInSecs: null,
    chargeTimeFormated: null,
    temperatureCelsius: null,
    highVoltage: null,
    lowVoltage: null,
    highCurrent: null,
    lowCurrent: null,
    available: true
  },
  bypass: {
    available: false,
    state: null,
    stateText: null,
    voltages: null,
    currents: null,
    frequencies: null,
    powerFactors: null
  },
  system: {
    state: null,
    stateText: null,
    maintenanceBreak: null,
    temperatureFormated: null,
    temperatureCelsius: null,
    temperatureFahrenheit: null,
    originalHardwareFaultCode: null,
    modules: null,
    available: false
  }
}