🌐 このページは日本語でもご覧いただけます。 日本語で読む →

apcget

Retrieve UPS status from APC PowerChute Serial Shutdown for Business — CLI, JSON, MQTT, and Zabbix integration.

License: MIT Latest release Python 3.6+

Features

CLI Output

Print UPS load, battery, runtime, voltage and status directly to stdout — ideal for scripts and cron jobs.

JSON Output

Output all metrics as a single JSON object for easy integration with Home Assistant and other automation platforms.

MQTT Publishing

Publish metrics to any MQTT broker. Works with mosquitto_pub or paho-mqtt.

Zabbix Integration

Send all 6 metrics at once via zabbix_sender to a Zabbix trapper item.

Zero Dependencies

Core functionality uses Python standard library only. Optional features require MQTT or Zabbix tools.

Credential Management

Supports CLI args, environment variables, and a config file — no plain-text passwords in shell history.

Quick Start

Download and run — no installation required:

# Download
curl -O https://raw.githubusercontent.com/yo1t/apcget/main/apcget.py

# Basic usage (returns UPS load %)
python3 apcget.py 192.168.1.100 username password

# All metrics as JSON
python3 apcget.py 192.168.1.100 username password --json

# Publish to MQTT
python3 apcget.py 192.168.1.100 username password \
  --mqtt-send 192.168.1.200 --mqtt-topic apcget/ups

Release History

v0.1.0 Latest 2026-02-15

Initial release of apcget.

  • Retrieve UPS status from APC PowerChute via HTTP scraping
  • JSON output support (--json)
  • MQTT publishing support (--mqtt-send)
  • Zabbix sender integration (--zabbix-send)
  • Multi-language support (Japanese / English)
  • Config file and environment variable credential management

All releases: github.com/yo1t/apcget/releases

Issues & Feedback

Found a bug or have a feature request? Open an issue on GitHub.

No open issues at this time.
View All Issues New Issue