Is it normal for WUI-Status-Services
to show NUT and APCUPSD to be “STOPPED” ?
If I click the green arrow, to start the service, nothing changes,
both will stay “STOPPED”
I found a typo in the apcupsd.conf
so its running but can’t read any data
/etc/init.d/apcupsd start
Starting apcupsd daemon… [ OK ]
Warning communications lost with UPS Cyberpower
|UPS Name: Cyberpower APCUPSD: Version 3.14.14 Status: COMM LOST|
WUI-IPfire-APC-UPS-status says
Last UPS Self Test: Not found
Last Test Date: Not found
Utility Voltage: Not found VAC
Line Minimum: Not found VAC
Line Maximum: Not found VAC
Output Freq: Not found Hz
Only one of them should be running at a time otherwise you will have two systems both trying to access the UPS at the same time.
If you are trying to evaluate apcupsd then I would uninstall nut. nut does a backup when being installed so if you re-install again leter then your conf file should be restored.
As a quick check if you run lsusb does the list of usb connections include your Cyberpower UPS? My APC UPS is shown when I do that.
Searching around I found another person having similar trouble as you. In the end he said that it was fixed after he fully switched off the UPS, including disconnecting it from the mains. Then when he started everything back up again his UPS usb connection was working again.
I just added the USB cable from my IPFire device to my existing Cyber Power CP1500PFCLCD. And here are the changes I made to apcupsd.conf:
[root@ipfire ~] # cat /etc/apcupsd/apcupsd.conf
...
UPSNAME Cyberpwr # <- only 8 character allowed
UPSCABLE usb
UPSTYPE usb
# leave DEVICE blank
DEVICE
...
These are the only changes I made to the default apcupsd.conf file. And it seems to work OK for me. I have not tested this yet (no test button and no test power down).
EDIT: Here is the screen I see in menu IPFire > APC-UPS status
I was able to shutdown the firewall and disconnected Cyberpower from the mains,
Now APC-UPS status works, at least partially, just like Jon’s screenshot shows.
I wish, in the future, I could figure out how to make it gracefully shutdown devices,
right now the Cyberpower is 200 minutes strong, so it outlasted any power outages but eventually, it won’t.
I think the timer for the shutdown is somewhere in this section below. (I have not set mine up yet).
And I think the graceful shutdown comes from other software installed on the other devices. The UPS broadcasts a shutdown notice and devices react.
#
# ======== Configuration parameters used during power failures ==========
#
# The ONBATTERYDELAY is the time in seconds from when a power failure
# is detected until we react to it with an onbattery event.
#
# This means that, apccontrol will be called with the powerout argument
# immediately when a power failure is detected. However, the
# onbattery argument is passed to apccontrol only after the
# ONBATTERYDELAY time. If you don't want to be annoyed by short
# powerfailures, make sure that apccontrol powerout does nothing
# i.e. comment out the wall.
ONBATTERYDELAY 6
#
# Note: BATTERYLEVEL, MINUTES, and TIMEOUT work in conjunction, so
# the first that occurs will cause the initation of a shutdown.
#
# If during a power failure, the remaining battery percentage
# (as reported by the UPS) is below or equal to BATTERYLEVEL,
# apcupsd will initiate a system shutdown.
BATTERYLEVEL 5
# If during a power failure, the remaining runtime in minutes
# (as calculated internally by the UPS) is below or equal to MINUTES,
# apcupsd, will initiate a system shutdown.
MINUTES 3
# If during a power failure, the UPS has run on batteries for TIMEOUT
# many seconds or longer, apcupsd will initiate a system shutdown.
# A value of 0 disables this timer.
#
# Note, if you have a Smart UPS, you will most likely want to disable
# this timer by setting it to zero. That way, you UPS will continue
# on batteries until either the % charge remaing drops to or below BATTERYLEVEL,
# or the remaining battery runtime drops to or below MINUTES. Of course,
# if you are testing, setting this to 60 causes a quick system shutdown
# if you pull the power plug.
# If you have an older dumb UPS, you will want to set this to less than
# the time you know you can run on batteries.
TIMEOUT 0
# Time in seconds between annoying users to signoff prior to
# system shutdown. 0 disables.
ANNOY 300
# Initial delay after power failure before warning users to get
# off the system.
ANNOYDELAY 60
# The condition which determines when users are prevented from
# logging in during a power failure.
# NOLOGON <string> [ disable | timeout | percent | minutes | always ]
NOLOGON disable
# If KILLDELAY is non-zero, apcupsd will continue running after a
# shutdown has been requested, and after the specified time in
# seconds attempt to kill the power. This is for use on systems
# where apcupsd cannot regain control after a shutdown.
# KILLDELAY <seconds> 0 disables
KILLDELAY 0