User Tools

Site Tools


UPS: Uninterruptible Power Supply Plugin

NOTE: as of XTension version 9.5.2 the disk space monitoring in this plugin is deprecated. It will continue to work but for new setups and additional functionality please use the new Sysinfo Plugin The other functionality of this plugin of monitoring a directly connected UPS is not deprecated. For monitoring UPS’s connected to other devices please have a look at the raspberry pi apcups plugin.

The UPS plugin provides a connection between XTension and a UPS that is compatible with the built in OSX support for such devices. If you see a battery level in the system for a UPS connected via USB then the same UPS will be compatible with the UPS plugin for XTension. Build 830 of XTension adds the reporting of disk drive space to this plugin too.

NOTE there is a problem with most MacOS X versions where the “restart after a power failure” setting in the energy saver does not work if there is a UPS connected to the computer via USB. This is not OK for a home server so you should consider not connecting your UPS to the Mac via USB but rather using a raspberry pi and the new acpupsd plugin if you have an APC ups.

By providing a pseudo unit associated with AC Power availability you can take action in response to a power failure or power restoration, even a short duration one which may require that problem appliance modules be reset as they can turn on if the power flickers. The time to empty value can be used to give warnings of immanent shutdown.

For more information on dealing with UPS's and power failures with the Macintosh and XTension please see Dealing With Power Failures

Using UPS Monitor with XTension

NOTE: the Unit Addresses in the screen shot above are incorrect for the current version of this plugin and the image needs to be updated. Please use the addresses described below for your Units and not the old x10 style addressing this plugin originally used in the very dark and very distant past.

Create a new interface in XTensions preferences and select “ups” as the device type. No port selections or other setup is required, just give it a more descriptive name. In order to make available all the information that the plugin can provide you'll need to create 6 units. Assign them to the ups interface you created earlier and give them the following address strings:

  • AC Power Available (address: “AC”, not dimmable)
  • Capacity in percent of the battery (address: “CAPACITY”, dimmable)
  • Max Capacity (address: “MAXCAPACITY”, dimmable)
  • Time To Empty (address: “TIMETOEMPTY”, dimmable) approx minutes before the machine shuts down. It may display 0 if AC power is available.
  • Time To Full Charge (address: “TIMETOFULLCHARGE”, dimmable) approx minutes before the battery is recharged. If battery is fully charged it may read 0.
  • Is Charging (address: “CHARGING”, not dimmable) is the battery currently charging or not.

Monitoring Disk Space

NOTE: Please see the deprecation notice at the top of this page and use the newer sysinfo plugin to get this information.

With version 830 of XTension this plugin also sends regular updates with the percent available and k available for each mounted disk. Create a unit on this interface with the name of the disk drive as the address to receive the bytes available in k, and create another but put a “%” at the end of the disk name to receive the percent available value. Both values are always sent though you do not have to create a unit for them if you do not wish to they will always show in the log. The system may also include various other mounted file systems such as the time machine disk and volume that are dynamically created and unmounted by the system as well as other network file systems.

Running out of disk space on the server can be a major headache and cause data loss and database corruption even though XTension goes to a great deal of trouble not to corrupt itself in that case it’s not something you want to happen if you can avoid it. Sending yourself an email or other alert when this gets too low is a really good idea.


  • 4/7/2023 Deprecated the disk space monitoring functions of this plugin in favor of the newer Sysinfo plugin.
  • This plugin has been part of XTension for so long nobody knows when it was first added, least of all the author.
supported_hardware/ups.txt · Last modified: 2023/04/07 14:29 by James Sentman