have an APC SUA1500i smart ups, and want to configure power option from my FreeNAS using this ups. How can I install an appropriate APC UPS USB driver on my FreeNAS server, and use it to control power options?
FreeNAS is nothing but a FOSS network-attached storage (NAS) system based on FreeBSD Unix and the OpenZFS file system. It comes with a dedicated management web interface for managing and configuring your NAS box. In this tutorial you will learn how to configure the APC (or any other supported brand) UPS service then start it in FreeNAS to protect your server from power failures. This tutorial shows how to configure and use UPS on a FreeNAS based server.
UPS monitoring on FreeNAS
An uninterruptible power supply/uninterruptible power source (UPS) is an electrical apparatus that provides emergency power to a load when the input power source, typically mains power, fails. A UPS is useful start a standby power source such as generator or properly shut down the FreeNAS box.
FreeNAS and NUT
FreeNAS comes with NUT (Network UPS Tools) software to provide support for Power Devices such as UPS.
First connect the APC ups to your FreeNAS based server using the serial or USB port the UPS is plugged into.
Finding out the APC USB port name
Login to your FreeNAS server using ssh and type the following command:
dmesg | grep -i –color american power conversion
dmesg | grep -i usbus | grep -i –color american power conversion
Fig.01: FreeNAS/FreeBSD Find Out APC UPS USB Device Name
How do I configure UPS monitoring service on FreeNAS server?
To configure the UPS service login to your FreeNAS web-gui. Navigate as follows:
Services > Control Services
Fig.02: FreeNAS UPS service
You need to set the following options:
Fig.03 FreeNAS UPS service configuration options
Set UPS Mode to Master.
Set Identifier to ups.
Set Driver as per your USP model. In this example, I set it to “APC ups 2 Back-UPS USB USB (usbhid-ups)“.
Set Port to /dev/ugen0.3 (again set this as per your setup).
Set Shutdown mode to “UPS reaches low battery“.
Set Monitor password “passwordHere” (again replace passwordHere with actual password).
Set email to “firstname.lastname@example.org” (replace email@example.com with actual email id).
Finally click on “Ok” button to save changes.
Next make sure you start UPS service on boot by clicking “Start on boot” and Start Now button from Services right panel:
Fig.04: Starting UPS service on FreeNAS
How do I test UPS connectivity and configuration on FreeNAS?
Login using ssh and simply type the following command to poll the status of a UPS server on FreeNAS:
Gif.01: upsc demo on FreeNAS
And, there you have it, the APC ups installed and working correctly on the latest version of FreeNAS.
Network UPS Tools project.