Latest News:
*New 11.2 series Release:
2019-06-20: XigmaNAS 11.2.0.4.6766 - released!

*New 12.0 series Release:
2019-06-20: XigmaNAS 12.0.0.4.6766 - 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

cyberpower UPS USB Always on Battery

Uninterruptable Power Supply service using NUT.
Forum rules
Set-Up GuideFAQsForum Rules
Post Reply
joe_louis
NewUser
NewUser
Posts: 8
Joined: 07 Nov 2014 03:12
Status: Offline

cyberpower UPS USB Always on Battery

#1

Post by joe_louis » 20 Sep 2015 03:01

I am new to FreeBSD so be gentle here. I am running the latest nas4free 10 version. I am trying to make it a NUT Master. My problem is that when I enable the ups function, It finds the UPS but always says that it is on battery. If I leave it alone, cause I know it is not, it will eventually shutdown the NAS. This will take my plex and email servers with it. Is there any settings I can change or add to auxiliary parameters section to get it to read the ups properly? I was able to get my CentOS box to read the ups properly with nut as master. So i know NUT will work. The concern is that I would rather have the CentOS box shutdown first and let the NAS shutdown last. That way all of the virtual machines disconnect before the NAS goes off line.The ups I have is a PR1500LCDRT2U. Below is the raw output from the web interface for the UPS. Thank you in advance.

Code: Select all

 	

device.mfr: CPS
device.type: ups
driver.name: usbhid-ups
driver.parameter.pollfreq: 30
driver.parameter.pollinterval: 2
driver.parameter.port: /dev/ugen4.2
driver.parameter.synchronous: no
driver.version: 2.7.3
driver.version.data: CyberPower HID 0.4
driver.version.internal: 0.39
ups.mfr: CPS
ups.productid: 0601
ups.status: OB
ups.vendorid: 0764
Current NAS: Nas4Free 10.2(2332) - ZFS RaidZ1 - 4 x 4TB - 3 x 2TB | SuperMicro X8DTH-IF - Intel XEON E5540 - 24GB ECC Ram
UPS: Cyberpower PR1500LCDRT2U
Extensions: Extended GUI
Extra HW: 2 x RocketRaid 2760 | Intel DP 1Gbps

daniel_m
NewUser
NewUser
Posts: 9
Joined: 07 Jul 2012 20:40
Status: Offline

Re: cyberpower UPS USB Always on Battery

#2

Post by daniel_m » 21 Sep 2015 06:51

Have you tried the powerpanel driver instead of the usbhid-ups ?

Cheers
Daniel

joe_louis
NewUser
NewUser
Posts: 8
Joined: 07 Nov 2014 03:12
Status: Offline

Re: cyberpower UPS USB Always on Battery

#3

Post by joe_louis » 21 Sep 2015 21:24

I have and it comes up with the data stale error instead. After talking to cyberpower, It sounds like the pr line powers everything off battery and and only uses the house power to charge them. (hopefully i described it correctly) Not sure if their is a setting that i can change through the aux parameters to account for this or not. Again, any help will be much appreciated.
Current NAS: Nas4Free 10.2(2332) - ZFS RaidZ1 - 4 x 4TB - 3 x 2TB | SuperMicro X8DTH-IF - Intel XEON E5540 - 24GB ECC Ram
UPS: Cyberpower PR1500LCDRT2U
Extensions: Extended GUI
Extra HW: 2 x RocketRaid 2760 | Intel DP 1Gbps

daniel_m
NewUser
NewUser
Posts: 9
Joined: 07 Jul 2012 20:40
Status: Offline

Re: cyberpower UPS USB Always on Battery

#4

Post by daniel_m » 22 Sep 2015 20:54

Hi

I use same ups, but with rmcard203 and the snmp-ups driver. I didn't try the usb cable at all.
This works without troubles with auxiliary parameters set to 'mibs=ietf' without this option you wan't get correct readings.

But this will not really help with your problem...

kenZ71
Advanced User
Advanced User
Posts: 403
Joined: 27 Jun 2012 20:18
Location: Northeast, USA
Status: Offline

Re: cyberpower UPS USB Always on Battery

#5

Post by kenZ71 » 30 Sep 2015 05:25

Try apcupsd?

It is a command line utility that works quite well. A nice alternative to nut
11.2-RELEASE-p3 | ZFS Mirror - 2 x 8TB WD Red | 28GB ECC Ram
HP ML10v2 x64-embedded on Intel(R) Core(TM) i3-4150 CPU @ 3.50GHz

Extra memory so I can host a couple VMs
1) Unifi Controller on Ubuntu
2) Librenms on Ubuntu

daniel_m
NewUser
NewUser
Posts: 9
Joined: 07 Jul 2012 20:40
Status: Offline

Re: cyberpower UPS USB Always on Battery

#6

Post by daniel_m » 06 Oct 2015 20:49

Just for your Info

I connected the USB cable to my UPS to see if I get the same results.
Using usbhid-ups driver I get the same results as you...

joe_louis
NewUser
NewUser
Posts: 8
Joined: 07 Nov 2014 03:12
Status: Offline

Re: cyberpower UPS USB Always on Battery

#7

Post by joe_louis » 12 Oct 2015 16:14

Daniel_m,

I have tested this on both FreeBSD 10.2 and CentOS 6.7 with the folks over at the NUT project. They have pointed out to me that it is the USBHID-UPS that is causing the issue. There is something funky that NAS4Free is doing with the results. I have already opened bug 240 for this. What it is doing is adding a extra byte in hex to the output after the valid byte. So it ends up being every other byte that should be there. I pasted an example below for you to see what I am talking about. I unfortunately do not have the snmp card like you do. If you have any pointers for fixing this, I would appreciate it. Thank you.

Code: Select all

NAS4Free HID
0.157417 Report Descriptor: (656 bytes) => 05 00 84 00 09 00 04 00 a1 00 01 00 09 00
0.157431 24 00 a1 00 00 00 85 00 01 00 09 00 fe 00 75 00 08 00 95 00 01 00 15 00 00

FreeBSD HID
0.127729 Report Descriptor: (656 bytes) => 05 84 09 04 a1 01 09 24 a1 00 85 01 09 fe
0.127772 75 08 95 01 15 00 26 ff 00 b1 22 85 02 09 ff b1 22 85 03 05 85 09 8f b1 22
Current NAS: Nas4Free 10.2(2332) - ZFS RaidZ1 - 4 x 4TB - 3 x 2TB | SuperMicro X8DTH-IF - Intel XEON E5540 - 24GB ECC Ram
UPS: Cyberpower PR1500LCDRT2U
Extensions: Extended GUI
Extra HW: 2 x RocketRaid 2760 | Intel DP 1Gbps

joe_louis
NewUser
NewUser
Posts: 8
Joined: 07 Nov 2014 03:12
Status: Offline

Re: cyberpower UPS USB Always on Battery

#8

Post by joe_louis » 12 Oct 2015 16:17

kenZ71,

I was not aware that APCUPSD was compatible with Cyberpower UPS's. I thought that one was for APC devices only. If i am wrong, Please let me know. thank you.
Current NAS: Nas4Free 10.2(2332) - ZFS RaidZ1 - 4 x 4TB - 3 x 2TB | SuperMicro X8DTH-IF - Intel XEON E5540 - 24GB ECC Ram
UPS: Cyberpower PR1500LCDRT2U
Extensions: Extended GUI
Extra HW: 2 x RocketRaid 2760 | Intel DP 1Gbps

kenZ71
Advanced User
Advanced User
Posts: 403
Joined: 27 Jun 2012 20:18
Location: Northeast, USA
Status: Offline

Re: cyberpower UPS USB Always on Battery

#9

Post by kenZ71 » 12 Oct 2015 20:12

Apcupsd advertises themselves as multi vendor / multi devices. Give it a go, I had good luck with it a few years ago when using a cyber power ups.
11.2-RELEASE-p3 | ZFS Mirror - 2 x 8TB WD Red | 28GB ECC Ram
HP ML10v2 x64-embedded on Intel(R) Core(TM) i3-4150 CPU @ 3.50GHz

Extra memory so I can host a couple VMs
1) Unifi Controller on Ubuntu
2) Librenms on Ubuntu

joe_louis
NewUser
NewUser
Posts: 8
Joined: 07 Nov 2014 03:12
Status: Offline

Re: cyberpower UPS USB Always on Battery

#10

Post by joe_louis » 12 Oct 2015 20:53

kenZ71 wrote:Apcupsd advertises themselves as multi vendor / multi devices. Give it a go, I had good luck with it a few years ago when using a cyber power ups.
KenZ71,

Thank you for the response. I was hoping to use NUT since I have 2 other boxes to slave off of this one. That and I am also currently running the embedded version of N4F. If this can't get resolved soon, I will try APCUPSD.
Current NAS: Nas4Free 10.2(2332) - ZFS RaidZ1 - 4 x 4TB - 3 x 2TB | SuperMicro X8DTH-IF - Intel XEON E5540 - 24GB ECC Ram
UPS: Cyberpower PR1500LCDRT2U
Extensions: Extended GUI
Extra HW: 2 x RocketRaid 2760 | Intel DP 1Gbps

joe_louis
NewUser
NewUser
Posts: 8
Joined: 07 Nov 2014 03:12
Status: Offline

Re: cyberpower UPS USB Always on Battery

#11

Post by joe_louis » 05 Mar 2016 19:49

Hello Everyone,

I know it has been a while since i posted on this thread. I think I got around my main issue. Now i need to solve a minor one. What i did was use my CentOS KVM host to control the UPS and slaved the Nas box off of it. The minor problem now is i need to set the shutdown timer to something like 8 minutes when the host gets ready to turn off. This is to give the CentOS box time to properly shutdown the guests and turn off before the nas shuts down. The reason is, I am using the nas to back some of the virtual machines. If the storage goes offline before the VM's get a chance to cleanly shutdown, there lies a chance for data corruption. Any suggestions on how to change upsmon.conf permanently? I would be looking to change the line below. I understand i would have to do this every time i take an upgrade. That is not a problem. I just need the change to survive reboots. Thank you in advance.

SHUTDOWNCMD "/sbin/shutdown -h +0" to SHUTDOWNCMD "/sbin/shutdown -h +8"
Current NAS: Nas4Free 10.2(2332) - ZFS RaidZ1 - 4 x 4TB - 3 x 2TB | SuperMicro X8DTH-IF - Intel XEON E5540 - 24GB ECC Ram
UPS: Cyberpower PR1500LCDRT2U
Extensions: Extended GUI
Extra HW: 2 x RocketRaid 2760 | Intel DP 1Gbps

LayneFelix
NewUser
NewUser
Posts: 1
Joined: 14 Jun 2016 18:24
Status: Offline

Re: cyberpower UPS USB Always on Battery

#12

Post by LayneFelix » 14 Jun 2016 18:54

Hi....i am new to this forum. As per my experience there is something funky that NAS4Free is doing with the results. I have already opened bug 240 for this. What it is doing is adding a extra byte in hex to the output after the valid byte. So it ends up being every other byte that should be there. I pasted an example below for you to see what I am talking about. I unfortunately do not have the snmp card like you do.

full turnkey assembly

Post Reply

Return to “UPS”