Sign inSign up

penguinade/apc-trigger-charge

By penguinade

Updated about 2 years ago

Image
0

250

penguinade/apc-trigger-charge repository overview

A simple script to trigger charging for apc ups

Generally the battery is recharged after self-test was triggered. But if the battery charge was under a certain amount the self-test job will not start. In this case, when the ups was running in bypass mode, battery charge will be depleting naturally, which makes the self-test unreachable even if scheduled for 7-days.

So this is a script to check if the rule $RECHARGE_WHEN is satisfied. It'll then send signal to the ups to entry & exit bypass mode. Thus triggers the battery to recharge.

## Env vars
# USER=device # An account that has at least "device" permission.
# PASSWORD=PATH_TO_PASSWORD_FILE
# HOST=192.168.0.123
# RECHARGE_WHEN="50 <= BATTERY_PERCENT"
# INTERVAL=3600 # Check interval in seconds

Remember to also add $HOST to $HOME/.ssh/known_hosts file.

Tag summary

Content type

Image

Digest

sha256:38ae310cf

Size

9.1 MB

Last updated

about 2 years ago

docker pull penguinade/apc-trigger-charge:2024.09.07.01