apcupsd is the Linux counterpart of the PowerChute windows program shipped by APC for their UPS models. In this article, we will go over how to properly setup apcupsd to work with APC BackUPS BR1000G-IN on Ubuntu. As the apcupsd is available in Ubuntu repository it is easy to install. Just execute the following command to install the apcupsd.

sudo apt-get install apcupsd

We need to find the location of the device file. For that, we can use the output from dmesg which will have the device file name.

dmesg.png

From the above output we can see that "hiddev1" is the device file, which will be located inside /dev/usb/

We need to change the configuration for apcupsd to make it work properly.  The configuration file goes into /etc/apcupsd/apcupsd.conf Edit this file with your favorite text editor.

sudo nano /etc/apcupsd/apcupsd.conf

Change the options to match the options given below.

UPSCABLE usb
UPSTYPE usb
DEVICE /dev/usb/hiddev1

Now restart the apcupsd servicesudo service apcupsd restartCheck if the service is running properlysudo service apcupsd statusIf the service is running properly run this command to make sure that apcupsd is communicating with UPS. apcaccess

If the communication is successful you should see something like this with all the details of the UPS

apcaccess_output_success.png

Bonus Tip: If the system you are using is not a server or a machine that will be restarted more often then you may end up in trouble as the device file may change on the next reboot. You have to change the DEVICE option in apcupsd.conf every time it changes. Alternatively you could add this line instead, which will enable apcupsd service to check all the device files and connect to the device using the correct device file.

DEVICE /dev/usb/hiddev[0-15]