No announcement yet.

apcupsd monitor script

  • Filter
  • Time
  • Show
Clear All
new posts

    apcupsd monitor script

    This script will monitor your APC UPS status via the open source apcupsd application.

    I'm beta'ing this right now, so this post will be the "readme" for now.

    This script is based on Jon00's UPS Monitor. For some reason the Business Edition of APC's software would not work with my UPS, and I have used apcupsd for my linux boxes I figured I could integrate the two.

    Since most of the user documentation of Jon00's UPS Monitor plugin is still valid download and read that information from


    1) You will need to download apcupsd from, you need to get the winapcupsd install, located at the bottom of the page.

    2) I recommend you uninstall any existing UPS monitoring software

    3) Install apcupsd.
    3a) Change the default install path from c:\apcupsd to c:\program files\apcupsd
    3b) When the installer asks you to modify the configuration file, do so and change STATTIME from 0 to 30. This number represents the time in seconds between updates to the apcupsd.status file this plugin reads. This value should be smaller than the recurring delay in your HS event. I use 60 second between HS events, and 30 seconds between writes to apcupsd.status.

    4) Make any other changes to the apcupsd.conf (located in %installpath%\etc\apcupsd directory) as needed.

    5) You may need to reboot your system for the apcupsd driver to properly install

    6) Unzip the contents of the zip file into your Homeseer directory

    1) Modify the HL and HN values of the UPSMonitorAPCUPSD.ini file located in your config directory, as needed

    2) Create an recurring event to run the UPSMonitorAPCUPSD.vb script

    The currently supported user configurable ini values are:

    ShowUpdateTimeDate -- The date of the last apcupsd.status file
    ShowModel -- Show your UPS model number
    ShowLineVoltage -- Show the input voltage to your UPS
    ShowUPSLoad -- Show your current UPS load
    ShowBatteryCharge -- Shows your current UPS battery charge level
    ShowTimeLeft -- Shows the estimated time left of the UPS battery under current load conditions
    ShowLastonBattery -- Shows various information about the last time the UPS was on battery (when, why, for how long, etc, etc)
    ShowBatteryVoltage -- Shows the current and "normal" UPS battery voltage

    In addition to Jon00's functionality I have added code to trigger an event/run a script when values go back under the high/low thresholds. Use the appropriate:

    RunScriptLowReset, RunScriptHighReset, RunEventLowReset, RunEventHighReset as desired.

    This new feature will need some tweaks since it only checks that you are back over/under the low/high threshold and not in between them. It is supposed to say "things are back to normal now", but I need to work on it some more to get it right.

    Once this code is ironed out I will submit it back to Jon00 so that he can add this functionality to his own plugins.

    Now.. one issue I have found with apcupsd is that it does not work properly when the machine comes out of hibernate (have not tested standby). Basically it no longer talks to the UPS. Restarting the service will do nothing. You need to go to the device manager and disable/re-enable the "American Power Conversion USB UPS (Acpupsd)" driver to get it work again. I'm looking for a way to do this/talk to apcupsd guys to get them to fix it.

    Now if you have made it this far and decide to give this a try, please PM me with a copy of your apcupsd.status file. Not all UPSs report all values, so I need some live data to get formatting of the values my UPS does not report.

    Thanks, and enjoy.

    Discussion forum:
    Attached Files
    Last edited by BootsC5; January 29, 2008, 11:08 AM.

    Has there been any progress on this? I've just come across this thread and downloaded everything. I'm excited about installing now as up until now I've been using Blades plugin which unfortunately doesn't provide much information thru what Windows makes available.
    Real courage is not securing your Wi-Fi network.


      Just an update.
      I installed everything and once I figured out how many devices were needed and found a block within my system status house code, have everything working tickedy-boo. One change I did make to the script was to rename the devices location from "Virtual - UPS Monitoring" to "UPS Monitor". I like short, to the point names for locations. Would it be possible in any future versions to make this configurable in the INI?

      Now, before I go too much further, I note that APCUPSD seems to have some support for networked machines. Any suggestions on how to implement this functionality on remote machines? I use ScriptConnector. Perhaps this might be a good route to take?

      Thanks for making my APC Back-UPS XS 1300 LCD (and perhaps others within the house) do for Homeseer what I'd intended when I bought it.
      Real courage is not securing your Wi-Fi network.