*New 11.3 series Release:
2019-10-05: XigmaNAS 11.3.0.4.6928 - released, 11.2 series are soon unsupported!

*New 12.0 series Release:
2019-10-05: XigmaNAS 12.0.0.4.6928 - released!

*New 11.2 series Release:
2019-09-23: XigmaNAS 11.2.0.4.6881 - released!

We really need "Your" help on XigmaNAS https://translations.launchpad.net/xigmanas translations. Please help today!

Producing and hosting XigmaNAS costs money. Please consider donating for our project so that we can continue to offer you the best.
We need your support! eg: PAYPAL

APC Pro BX1500G Setup

Uninterruptable Power Supply service using NUT.
Forum rules
Set-Up GuideFAQsForum Rules
Post Reply
Tjm2005
NewUser
NewUser
Posts: 3
Joined: 14 Jul 2017 05:12
Status: Offline

APC Pro BX1500G Setup

#1

Post by Tjm2005 » 15 Jul 2017 01:13

Running 11.0.0.4 - Sayyadina (revision 4383)

Services > UPS
Mode: Master
Identifier: ApcPro
Driver: usbhid-ups
Port: auto

Additional Parameters:
override.battery.charge.low = 25

Shutdown Mode: UPS goes on battery
Shutdown Timer: 30 sec

I have this working part way how I want. If I pull the power coed to the UPS and wait 30 seconds, the server will start shutting down, but after the server shuts off, the UPS never cycles into shutdown, it stays running and the battery keeps going down slowly. I would like to see the UPS shutdown till power comes back on, then have the ups come back online.

Diagnostics > Information > UPS
Interval to wait after shutdown with delay command: 20 seconds
Time before the load will be shutdown: -1 seconds

Not sure where to start trouble shooting this, it is my first time setting up a UPS with NAS.
/usr/local/libexec/nut/upsdrvctl -t shutdown
says /usr/local/libexec/nut/usbhid-ups -a ApcPro -k is the command it runs

If I run /usr/local/libexec/nut/usbhid-ups -a ApcPro -k
with the ups still plugged in, it will cause it to shutdown then after a few seconds it will come back online.
usbhid-ups manual
upsdrvctl manual

Any info would be great, Thanks

User avatar
tony1
Moderator
Moderator
Posts: 172
Joined: 14 Jul 2016 19:04
Status: Offline

Re: APC Pro BX1500G Setup

#2

Post by tony1 » 16 Jul 2017 22:00

I would think that the ups will keep running until the battery reaches 25% capacity and then it will turn off?
I never really timed it.
it works well for my needs even with remotes,

Tjm2005
NewUser
NewUser
Posts: 3
Joined: 14 Jul 2017 05:12
Status: Offline

Re: APC Pro BX1500G Setup

#3

Post by Tjm2005 » 17 Jul 2017 05:42

I think you would be correct, if the Shutdown Mode is set to UPS reaches low battery.
After playing around with it most of the day today, I found
/var/etc/upsmon.conf
SHUTDOWNCMD "/sbin/shutdown -p now"
POWERDOWNFLAG /var/etc/killpower

Now like I said I'm new to this and could be wrong, but I would think that with the SHUTDOWNCMD and the POWERDOWNFLAG being in the same conf file, that when the shutdown command is issued the killpower file should be created at the same time? if that is the case I ran a script looking for that file right before shutdown and it wasn't there. There also should be a script somewhere, that during shutdown test for the killpower file, and if the file is there ,would run /usr/local/libexec/nut/upsdrvctl shutdown ,the command that starts the UPS shutdown timer. So I then tried creating the /var/etc/killpower file manually and shutting down the system to see if any scripts picked up on this file and I got nothing. I am stuck at this point on knowing how to trouble shoot the killpower file not being created, and I dont know if there is a built in script to check for the killpower file on shutdown, or if it is missing.

for now I made a cheap work around that seems to work adding this to a script.

Code: Select all

#!/bin/sh

#chmod +x before running this script
UpsIdentifier="ApcPro" # Your UPS Identifier Name

var=$(/usr/local/bin/upsc $UpsIdentifier ups.status)
	
                echo "****Testing UPS****"
		echo "$var"
				
if [ "$var" == "OB DISCHRG" ] || [ "$var" == "OB LB" ]
	then
	echo "----UPS On Battery Kill UPS----"
	/usr/local/libexec/nut/upsdrvctl shutdown
	
	else 
	echo "----UPS On Main Power UPS stays on----"
fi
Then running it with a command script, set to shutdown.
I also learned that in shell scripts if["$var"] and if ["Svar"] are not the same, we wont talk about how long that took to figure out lol.

User avatar
tony1
Moderator
Moderator
Posts: 172
Joined: 14 Jul 2016 19:04
Status: Offline

Re: APC Pro BX1500G Setup

#4

Post by tony1 » 17 Jul 2017 16:18

I am happy with the way my ups is working and I need to learn more about it but my guess you are probably missing a setting to achieve you desired operation. maybe "ups.timer.shutdown" will work? just a thought. I also believe that needs to be set using the apc software. I think override sets values that are wrong it does not modify the ups settings.

as an example in Diagnostics > Information > UPS the value for my ups in "Time before the load will be shutdown" is -1 (disabled) so it will never shutdown unless I use the apc software to modify the value internally on the ups. thats my understanding and I could be wrong.

Tjm2005
NewUser
NewUser
Posts: 3
Joined: 14 Jul 2017 05:12
Status: Offline

Re: APC Pro BX1500G Setup

#5

Post by Tjm2005 » 17 Jul 2017 23:19

Yes, I remember reading on one of the pages, that and override commands only take place in the software, and the UPS runs on its default settings, so unless the software monitors for a change, and then does something with it, the UPS wont act any different. You could set override.input.voltage = 240 , and the Diagnostics > Information > UPS will tell you, that you are running on 240v, even if the UPS is really running on 120v.

With my ups only being the Apc Pro version and not a Smart version, the windows software is pretty useless, unless you wanted to shutoff a windows machine, I think the only settings available are, Beeper control, Self Test, Line Voltage Sensitivity Adjustment, and Master - Slave Outlet Switching, I might have missed something, but I think that was about it.

I'm happy with the way it is working now, as long as the server gets the command to shutdown, and keeps the system from crashing in the middle of an Rsync, and having people calling me about how they can't get their encrypted drives to mount, I'll be happy. I didn't actually set the system up, I was asked to help, after the the original person told them he would no longer be coming to work on it, so when I get there and say well it should be on a battery back up, I get the look of it never had one before, i'm not paying for one of those. Well, after a few months of trying to talk them into it, I finally won :lol:

Most of it was just aggravating me, because it seemed like the support should already be there, and somewhere there should be an easy setting to change and it would work, and after hours of playing with settings I wasn't getting anywhere, and I was starting to fell like it was getting the better of me, and we just cant have that :roll: Unix systems are not my strong point, it takes me a lot of reading before I can start tinkering, but you learn something new everyday.

Post Reply

Return to “UPS”