voc0der / pwrstat-api

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

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

PowerPanel API (pwrstat-api)

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

Usage

Using pre-built Docker Image

Building Manually

  • 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 docker-compose.yaml, the included Docker-Compose example.
  • Access JSON response at http://:5002/pwrstat

About

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

License:GNU General Public License v3.0


Languages

Language:Python 97.8%Language:Shell 2.2%