Differences
This shows you the differences between the selected revision and the current version of the page.
howto:nut_ups 2009/04/08 05:42 | howto:nut_ups 2023/09/07 21:19 current | ||
---|---|---|---|
Line 90: | Line 90: | ||
cp /ffp/etc/examples/nut/ups.conf.sample /ffp/etc/ups.conf | cp /ffp/etc/examples/nut/ups.conf.sample /ffp/etc/ups.conf | ||
+ | |||
==== Add Driver Configuration Detail ==== | ==== Add Driver Configuration Detail ==== | ||
- | Prior to modifying the ups.conf file you'll need to determine which driver is used with your specific UPS. A UPS hardware compatibility list is located on the [[http://www.networkupstools.org/compat/stable.html|Network UPS Tools]] website. Review this list to determine which driver is required for your specific application. Please note these instructions pertain specifically to USB connected UPS. | + | Prior to modifying the ups.conf file you'll need to determine which driver is used with your specific UPS. A UPS hardware compatibility list is located on the [[https://networkupstools.org/stable-hcl.html]] website. Review this list to determine which driver is required for your specific application. Please note these instructions pertain specifically to USB connected UPS. |
Use your favourite editor (I use Notepad++) to open the ups.conf file, enter and subsequently save your specific settings. | Use your favourite editor (I use Notepad++) to open the ups.conf file, enter and subsequently save your specific settings. | ||
Line 163: | Line 164: | ||
The Network Server can be stopped by issuing an ''upsd -c stop'' command. | The Network Server can be stopped by issuing an ''upsd -c stop'' command. | ||
+ | |||
Line 184: | Line 186: | ||
battery.date: 2001/09/25 | battery.date: 2001/09/25 | ||
battery.mfr.date: 2008/06/05 | battery.mfr.date: 2008/06/05 | ||
- | battery.runtime: 2235 | + | battery.runtime: 2535 |
battery.runtime.low: 120 | battery.runtime.low: 120 | ||
battery.temperature: 29.2 | battery.temperature: 29.2 | ||
Line 190: | Line 192: | ||
battery.voltage: 27.8 | battery.voltage: 27.8 | ||
battery.voltage.nominal: 24.0 | battery.voltage.nominal: 24.0 | ||
+ | device.mfr: American Power Conversion | ||
+ | device.model: Back-UPS RS 900 | ||
+ | device.serial: 5B0743U08220 | ||
+ | device.type: ups | ||
driver.name: usbhid-ups | driver.name: usbhid-ups | ||
driver.parameter.pollfreq: 30 | driver.parameter.pollfreq: 30 | ||
Line 197: | Line 203: | ||
driver.version.data: APC HID 0.93 | driver.version.data: APC HID 0.93 | ||
driver.version.internal: 0.34 | driver.version.internal: 0.34 | ||
- | input.voltage: 121.0 | + | input.voltage: 122.0 |
input.voltage.nominal: 120 | input.voltage.nominal: 120 | ||
output.voltage: 120.0 | output.voltage: 120.0 | ||
Line 205: | Line 211: | ||
ups.firmware: 9.o2 .D | ups.firmware: 9.o2 .D | ||
ups.firmware.aux: o2 | ups.firmware.aux: o2 | ||
- | ups.load: 22.0 | + | ups.load: 18.0 |
ups.mfr: American Power Conversion | ups.mfr: American Power Conversion | ||
ups.mfr.date: 2007/10/24 | ups.mfr.date: 2007/10/24 | ||
Line 214: | Line 220: | ||
ups.test.result: No test initiated | ups.test.result: No test initiated | ||
ups.timer.reboot: 0 | ups.timer.reboot: 0 | ||
- | vups.timer.shutdown: -1 | + | ups.timer.shutdown: -1 |
ups.vendorid: 051d | ups.vendorid: 051d | ||
Line 261: | Line 267: | ||
chown root:nut /ffp/var/state/ups | chown root:nut /ffp/var/state/ups | ||
chmod 0770 /ffp/var/state/ups | chmod 0770 /ffp/var/state/ups | ||
+ | |||
Line 267: | Line 274: | ||
====== Automating the Startup Process ====== | ====== Automating the Startup Process ====== | ||
You can Telnet to the DNS323 each time you want to start NUT or use a startup script. The following can be added to a nut.sh script file and stored in the /ffp/start directory by copying the content of the code box into your favourite editor then saving the resultant file as /ffp/start/nut.sh. | You can Telnet to the DNS323 each time you want to start NUT or use a startup script. The following can be added to a nut.sh script file and stored in the /ffp/start directory by copying the content of the code box into your favourite editor then saving the resultant file as /ffp/start/nut.sh. | ||
+ | |||
+ | Use this script for DNS323 firmware versions prior to 1.07. | ||
#!/ffp/bin/sh | #!/ffp/bin/sh | ||
Line 280: | Line 289: | ||
nut_start() | nut_start() | ||
{ | { | ||
+ | # Start NUT driver for UPS hardware. | ||
+ | /ffp/bin/upsdrvctl start | ||
+ | |||
+ | # Start NUT Network Server | ||
+ | /ffp/sbin/upsd | ||
+ | |||
+ | # Start NUT monitor agent | ||
+ | /ffp/sbin/upsmon -u monuser | ||
+ | } | ||
+ | |||
+ | nut_stop() | ||
+ | { | ||
+ | # Stop NUT monitor agent | ||
+ | /ffp/sbin/upsmon -c stop | ||
+ | |||
+ | # Stop NUT Network Server | ||
+ | /ffp/sbin/upsd -c stop | ||
+ | |||
+ | # Stop NUT driver for UPS hardware. | ||
+ | /ffp/bin/upsdrvctl stop | ||
+ | } | ||
+ | |||
+ | run_rc_command "$1" | ||
+ | |||
+ | |||
+ | Use this script for DNS323 firmware version 1.07. | ||
+ | |||
+ | #!/ffp/bin/sh | ||
+ | |||
+ | # PROVIDE: nut | ||
+ | |||
+ | . /ffp/etc/ffp.subr | ||
+ | |||
+ | name="nut" | ||
+ | start_cmd="nut_start" | ||
+ | stop_cmd="nut_stop" | ||
+ | |||
+ | nut_start() | ||
+ | { | ||
+ | ##################### | ||
+ | # We're using NUT UPS from ffp; # | ||
+ | ##################### | ||
+ | |||
+ | ############################################ | ||
+ | # Stop built in NUT UPS deamons in preparation for starting ffp NUT UPS # | ||
+ | ############################################ | ||
+ | if ps | grep /usr/local/ups/bin/usbhid-ups | grep -v grep | ||
+ | then | ||
+ | echo "* Stopping Default UPS Services" | ||
+ | # Stop NUT Network Server | ||
+ | /sys/crfs/sbin/upsd -c stop | ||
+ | |||
+ | # Stop NUT driver for UPS hardware. | ||
+ | /sys/crfs/sbin/upsdrvctl stop | ||
+ | fi | ||
+ | |||
+ | sleep 2 | ||
+ | |||
+ | ############## | ||
+ | # Start ffp NUT UPS # | ||
+ | ############## | ||
# Start NUT driver for UPS hardware. | # Start NUT driver for UPS hardware. | ||
/ffp/bin/upsdrvctl start | /ffp/bin/upsdrvctl start |