Thriving Thriving Python PY
โ†‘ 48
ups-auto-shutdown naonak/ups-auto-shutdown

This Docker image is designed to monitor the status of an Uninterruptible Power Supply (UPS) using the Network UPS Tools (NUT) and automatically shutdown the host machine in case of power failure or if the battery falls below certain thresholds. Perfect for Raspberry Pi.

HEALTH 92 / Healthy

// momentum

tracking since W47

// why it's here

  • Active: last commit today

// how to help

// readme

UPS Auto Shutdown

Description

UPS Auto Shutdown is a Python script that uses the PyNUTClient library to monitor the status of an uninterruptible power supply (UPS) via a NUT (Network UPS Tools) server. It triggers actions like system shutdown or sending notifications when the UPS battery is low, the load is too high, or the main power is lost.

The script supports alerts via email and Apprise for sending notifications to multiple platforms.

Features

  • Monitors UPS battery and load status.
  • Triggers a safe shutdown when the battery is low or the runtime is short.
  • Sends alert notifications via email and Apprise.
  • Supports dry-run mode to test without executing an actual shutdown.
  • Customizable via environment variables or command-line arguments. Command-line arguments take priority over environment variables.

Requirements

  • Python 3.x
  • Running NUT server accessible from the script
  • Python libraries:
    • PyNUTClient
    • apprise

Installation

  1. Clone the repository:
git clone https://github.com/naonak/ups-auto-shutdown.git
cd ups-auto-shutdown
Read the full README on GitHub โ†—

Health score

Is the project alive and maintained right now? A 0โ€“100 pulse recomputed nightly from commit recency, rhythm, how fast issues close, and how quickly PRs get merged.

How it's calculated

Undervalued score

Activity relative to attention (stars + watchers). Above 50 means a lot of activity for a project its size. Recomputed nightly from commit velocity, contributor effort, issue resolution, fork utility, release cadence, and project maturity โ€” divided by a logarithmic reach factor.

How it's calculated

Tags

Tags are independent behavioral signals computed nightly. A project can hold multiple at once. They drive the home page sections.

How it's calculated