Copyright (C) 2015 ESF, LLC All rights reserved. */ /* ====================================================================================== */ /* Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ /* ====================================================================================== */ ]]> Apcupsd Services: Apcupsd (General) 0.3.9 /usr/local/pkg/apcupsd.inc Apcupsd configuration has been created/modified. Apcupsd configuration has been deleted. /usr/local/etc/rc.d/apcupsd.sh restart https://packages.pfsense.org/packages/config/apcupsd/apcupsd.inc /usr/local/pkg/ https://packages.pfsense.org/packages/config/apcupsd/apcupsd.priv.inc /etc/inc/priv/ https://packages.pfsense.org/packages/config/apcupsd/apcupsd_status.php /usr/local/www/ https://packages.pfsense.org/packages/config/apcupsd/apcupsd.conf.php /usr/local/pkg/ https://packages.pfsense.org/packages/config/apcupsd/apcupsd_mail.php /usr/local/pkg/ Apcupsd Setup Apcupsd specific settings
Services
/pkg_edit.php?xml=apcupsd.xml
apcupsd apcupsd.sh apcupsd APC UPS Daemon General /pkg_edit.php?xml=apcupsd.xml Status apcupsd_status.php General Configuration Parameters listtopic Enable apcupsdenabled Enable APC UPS Daemon service. checkbox UPS Name upsname Use this to give your UPS a name in log files and such. input 60 true UPS Cable upscable
Possible generic choices for 'cable' are:
simple, smart, ether, usb

Or a specific cable model number may be used:
940-0119A, 940-0127A, 940-0128A, 940-0020B,
940-0020C, 940-0023A, 940-0024B, 940-0024C,
940-1524C, 940-0024G, 940-0095A, 940-0095B,
940-0095C, M-04-02-2000 ]]>
input 60 true
UPS Type / Device upstype For USB UPSes, please leave the DEVICE directive blank. For other UPS types, you must specify an appropriate port or address.

UPSTYPE DEVICE Description
apcsmart /dev/tty** Newer serial character device, appropriate for SmartUPS models using a serial cable (not USB).
usb BLANK Most new UPSes are USB. A blank DEVICE setting enables autodetection, which is the best choice for most installations.
net hostname:port Network link to a master apcupsd through apcupsd's Network Information Server. This is used if the  UPS powering your computer is connected to a different computer for monitoring.
snmp hostname:port:vendor:community SNMP network link to an SNMP-enabled UPS device. Hostname is the ip address or hostname of the UPS on the network.
Vendor can be can be "APC" or "APC_NOTRAP". "APC_NOTRAP" will disable SNMP trap catching; you usually want "APC".
Port is usually 161. Community is usually "private".
dumb /dev/tty** Old serial character device for use with simple-signaling UPSes.
pcnet ipaddr:username:passphrase:port PowerChute Network Shutdown protocol which can be used as an alternative to SNMP with the AP9617 family of smart slot cards.
ipaddr is the IP address of the UPS management card; username and passphrase are the credentials for which the card has been configured.
Port is the port number on which to listen for messages from the UPS, normally 3052. If this parameter is empty or missing, the default of 3052 will be used.
]]>
input 60 true
Device device input 60 Poll Time polltime Interval (in seconds) at which apcupsd polls the UPS for status. (Default: 60) input 10 60 Kill on Power Fail killonpowerfail Hibernate UPS on powerfail. checkbox Lock File lockfile Path for device lock file. (Default: /var/tmp) input 60 Configuration parameters used during power failures listtopic OnBattery Delay onbatterydelay Time in seconds from when a power failure is detected until we react to it with an onbattery event. (Default: 6) input 10 6 Battery Level batterylevel If during a power failure, the remaining battery percentage (as reported by the UPS) is below or equal to BATTERYLEVEL, apcupsd will initiate a system shutdown. (Default: 5) input 10 5 Minutes minutes If during a power failure, the remaining runtime in minutes (as calculated internally by the UPS) is below or equal to MINUTES, apcupsd, will initiate a system shutdown. (Default: 3) input 10 3 Timeout timeout If during a power failure, the UPS has run on batteries for TIMEOUT many seconds or longer, apcupsd will initiate a system shutdown. A value of 0 (default) disables this timer. input 10 0 Annoy annoy Time in seconds between annoying users to signoff prior to system shutdown. 0 disables. (Default: 300) input 10 300 Annoy Delay annoydelay Initial delay after power failure before warning users to get off the system. (Default: 60) input 10 60 Kill Delay killdelay This is for use on systems where apcupsd cannot regain control after a shutdown. 0 disables (default). ]]> input 10 0 Configuration statements for Network Information Server listtopic Net Server netserver If netstatus is on, a network information server process will be started for serving the STATUS and EVENT data over the network (used by CGI programs). select on NIS IP nisip Alternatively, you can configure this setting to any specific IP address of your server and NIS will listen for connections only on that interface.
Use the loopback address (127.0.0.1) to accept connections only from the local machine. ]]>
input 10 0.0.0.0
NIS Port nisport (Default is 3551 as registered with the IANA.) ]]> input 10 3551 UPS Sharing Configuration listtopic UPS Class upsclass Normally standalone unless you share an UPS using an APC ShareUPS card. select standalone UPS Mode upsmode Normally disable unless you share an UPS using an APC ShareUPS card. select disable Notifications listtopic E-mail notifications emailnotification
phpMailer - In order to receive e-mail notifications through phpMailer, you need to configure SMTP Email Notifications on Advanced/Notifications section,  and also install mailreport package.
This feature is currently broken on pfSense 2.2; for more info see pfSense forum: APCupsd package status for pfSense.

SMTP built-in - A simple SMTP mail client for apcupsd. It does not have smtp authentication of any kind. ]]>
select phpmailer
SMTP built-in settings listtopic SMTP Host smtphost input 20 SMTP Port smtpport input 5 From smtpfrom input 20 To smtpto input 20 Cc smtpcc input 20
php_install_apcupsd(); validate_input_apcupsd($_POST, $input_errors); sync_package_apcupsd(); php_deinstall_apcupsd();