✦ 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
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.
⬡ Links
GitHub Repository
Source code, issues, pull requests, and contribution guidelines.
Releases
Download stable releases and view changelogs.
README (EN)
Full documentation: usage, options, credential management, integration guides.
README (日本語)
日本語版ドキュメント:使用方法、オプション、認証管理、連携ガイド。
apcget.py (raw)
Direct link to the script — use with curl or wget to download.
License (MIT)
Free to use, modify, and distribute under the MIT License.