Hi,
I was originally investigating apcupsd to monitor my UPS. However, it's
not working "out of the box", requiring a custom kernel / or disabling
my usb keyboard (which I use).
So I thought I would investigate sensorsd framework to see what it could do.
It's working totally fine with the hw.sensors.upd0.percent0, triggering
an event when sensorsd is started, as well as when the battery falls
below a threshold:
hw.sensors.upd0.percent0:low=83%:command=/etc/sensorsd/RemainingCapacity
%2 %3
UPS RemainingCapacity [82.00%] [83.00%]
power restored
UPS RemainingCapacity [86.00%] [83.00%]
I would love to get an alert immediately when the power goes out, so I
configured the following:
hw.sensors.upd0.indicator5:command=/etc/sensorsd/ACPresent %2
I do get an alert when sensorsd starts:
UPS ACPresent [On]
But when I unplug the UPS, I don't get an event triggered.
I do see that systcl hw.sensors.upd0 does reflect that the power is off.
Does anyone have advice if this is possible?
Here is my sysctl hw.sensors.upd0:
hw.sensors.upd0.indicator0=On (BatteryPresent), OK
hw.sensors.upd0.indicator1=Off (Charging), OK
hw.sensors.upd0.indicator2=Off (Discharging), OK
hw.sensors.upd0.indicator3=Off (NeedReplacement), OK
hw.sensors.upd0.indicator4=Off (ShutdownImminent), OK
hw.sensors.upd0.indicator5=On (ACPresent), OK
hw.sensors.upd0.indicator6=Off (Overload), OK
hw.sensors.upd0.percent0=100.00% (RemainingCapacity), OK
hw.sensors.upd0.percent1=100.00% (FullChargeCapacity), OK
hw.sensors.upd0.timedelta0=8211.000000 secs (RunTimeToEmpty), OK
Thanks,
Steve Williams