Skip to content

RyanGWU82/pwrstat-api

 
 

Repository files navigation

PowerPanel (pwrstat) API

This is a very simple REST API that wraps the PowerPanel pwrstat application for CyberPower battery backups. Only basic GET support for a single JSON object response for all parameters of the UPS are implemented.

Usage

  • Clone GitHub repo to local computer.
  • Must have Linux PowerPanel application from CyberPower already downloaded (https://www.cyberpowersystems.com/product/software/powerpanel-for-linux/)
  • Place powerpanel_ver_amd64.deb OR PPL-*-64bit.deb (newer) file downloaded from above address in the folder containing this README, on your local computer.
  • Run Docker build, or use included Docker-Compose example.
  • Note that you cannot use this GitHub repo as a Docker-Compose build context, due to needing to download a local copy of the CyberPower binary.
  • Access JSON response at http://:5002/pwrstat

About

super simple rest API returns JSON values output by CyberPower pwrstat application.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • Python 64.0%
  • Dockerfile 31.8%
  • Shell 4.2%