UPS configuration Cyberpower 1325VA

Joined
Jul 13, 2013
Messages
286
This ought to be really simple, but partly I don't know how to *test* it.

I've got a Cyberpower 1325VA (or LX1325G). It's connected via USB directly to my TrueNAS server. I've had it working before I think, but not sure the server sees it properly now.

The list of supported UPS hardware doesn't list this model. Since I think I had it working before, maybe I found the right driver somehow? The driver I have had configured is usbhid-ups$CP1350AVRLCD, and the port/hostname is set to auto (which seems right for a direct USB connect). Not sure where that driver name came from, can't find it on the site today.

Is there some way short of pulling the UPS plug from the wall and then seeing if I get notified, or if anything shows up in the logs, to test that the UPS config is correct? (Oh, I also checked that the username and password for UPS monitor matched the account config.)

(The batteries needed replacing, and since I was messing anyway I had a note to get the UPS interface working right.)
 
Joined
Jun 2, 2019
Messages
591
TrueNAS uses NUT. https://networkupstools.org/stable-hcl.html

All Cyberpower USB models use the usbhid-ups driver.

You can check your config using the upsc command. If you use the default "upsmon" name

upsc upsmon@localhost

Which should produce an output similar to this

Code:
battery.charge: 97
battery.charge.low: 10
battery.charge.warning: 50
battery.date: 2001/09/25
battery.mfr.date: 2021/06/23
battery.runtime: 2502
battery.runtime.low: 120
battery.type: PbAc
battery.voltage: 26.9
battery.voltage.nominal: 24.0
device.mfr: American Power Conversion
device.model: Back-UPS XS 1500M
device.serial: 3B2125X60993
device.type: ups
driver.name: usbhid-ups
driver.parameter.pollfreq: 30
driver.parameter.pollinterval: 2
driver.parameter.port: auto
driver.parameter.synchronous: no
driver.version: 2.7.4
driver.version.data: APC HID 0.96
driver.version.internal: 0.41
input.sensitivity: medium
input.transfer.high: 139
input.transfer.low: 88
input.voltage: 122.0
input.voltage.nominal: 120
ups.beeper.status: enabled
ups.delay.shutdown: 20
ups.firmware: 947.d11 .D
ups.firmware.aux: d11    
ups.load: 16
ups.mfr: American Power Conversion
ups.mfr.date: 2021/06/23
ups.model: Back-UPS XS 1500M
ups.productid: 0002
ups.realpower.nominal: 900
ups.serial: 3B2125X60993
ups.status: OL CHRG
ups.test.result: No test initiated
ups.timer.reboot: 0
ups.timer.shutdown: -1
ups.vendorid: 051d
 
Joined
Jul 13, 2013
Messages
286
Ah, the test command is already being useful! It shows what I have configured is clearly wrong ("ERROR: Unknown UPS").

It does not appear possible to configure the driver as "usbhid-ups"; the drop-down has no such entry and it doesn't let me save it if I just type that in.

And the entries in the drop-down are wider than the drop-down itself so I can't read any of them (dozens of identical truncated initial segments in various parts of the list).

I'll look into NUT, probably something there will help.
 
Last edited:
Joined
Jun 2, 2019
Messages
591
Just pick any one of the "Cyber Power Systems ups 2" or "3"

Most UPSs from the same manufacturer use the same common "usbhid-ups" driver. Unfortunately, (usbhid-ups) is listed at the end of the description, so you will need a higher resolution monitor or maybe a browser that you can zoom in/out

Screenshot 2022-07-05 at 4.16.57 AM.png



Another option is to connect the UPS to another client that has NUT already installed or can be installed, then configure TrueNAS as a UPS Slave to monitor the UPS over the network. I connect my UPS to my pfSense firewall as a Master and all my TrueNAS clients as Slaves
 
Last edited:
Joined
Jul 13, 2013
Messages
286
Multiple examples of lines that say they use usbhid-ups for CyberPower systems all produce the same "Error: unknown UPS" message. Is it possible that the port/hostname needs to be set to something other than "auto"? The list of devices offered there means nothing to me.

Oh, this is interesting. Lurking in /var/log/ups.log from last night, there are lines from upsmon saying ups@localhost went on battery, and then on line power. That's about the right time for that to have actually happened, which means that at 20:02 yesterday it was successfully communicating with the UPS. (No other UPS connected to this box.) But when I set the same UPS model as was set then, the upsc test tells me "unknown UPS" today. I suppose I could try configuring that and then unplug the UPS again, see if I get another log line for going on battery.

Or else, the old setting for port/hostname worked and "auto" doesn't. Is there a way to figure out what actual device I need to set by searching logs for USB activity by the UPS or something? I don't have a memory of what the old *port* setting was, just the UPS model.

No other Linux or FreeBSD box anywhere near that I could have do the UPS monitoring. I suppose in desperation I could burn a Raspberry Pi for the job, but in desperation I might look at messing with NUT enough to make it understand this UPS. Oh, the other thing nobody said is that if I had *temporary* spare system, I could play with direct NUT configuration on that, maybe learn more than configuring NUT through the TrueNAS GUI, and might then be able to apply what was learned back through the GUI?
 
Joined
Jul 13, 2013
Messages
286
I think the upsc test command I was given is wrong; "upsc upsmon@localhost" gives the "unknown UPS" error, but "upsc -l" lists 1 ups named ups, and "upsc ups" lists a bunch of values.

So...maybe nothing is wrong at all? At least I've got plenty to go off and muck about in, see how much trouble I can get into. I don't want much, I just want shutdown towards the end of the battery capacity really.
 
Joined
Jul 13, 2013
Messages
286
Okay, information about power to the UPS is appearing in the logs, so I've found a configration that works. No doubt I'll need to play with the details to make sure shutdown happens right and such, but the basic problem is solved.

Thanks for the help! looking at NUT more closely is what let me work this through.
 
Joined
Jul 13, 2013
Messages
286
Finally took the time to let the UPS run down and verify that my server shut down properly before it lost power, and it did. Lasted almost an hour before shutting down, too, which is good (I think more than any of the other UPSs will manage, so this won't be the limiting factor).

My UPS is a CyberPower 1325VA: LX1325G (according to the sticker on the bottom of the unit). I set the driver in the GUI to "Cyber Power Systems ups 3 CP825AVR-G / LE825G USB (usbhid-ups)" (but I suspect that earlier advice is right, that any of the "ups3 ... usbhid..ups" would work). I've got the "port or hostname" field set to "auto" (examination of /var/log/messages shows that the UPS is on /dev/ugen2.1: "Jul 7 18:35:15 fsfs ugen1.2: <CPS CP 1350C> at usbus1", but leaving it on "auto" means it won't break if it ends up in a different USB port next time I have to take the case down off the shelf). (This detail is for people in the future looking for details about this precise UPS with TrueNAS).
 

ninthturtle1034

Dabbler
Joined
Jan 7, 2023
Messages
20
Finally took the time to let the UPS run down and verify that my server shut down properly before it lost power, and it did. Lasted almost an hour before shutting down, too, which is good (I think more than any of the other UPSs will manage, so this won't be the limiting factor).

My UPS is a CyberPower 1325VA: LX1325G (according to the sticker on the bottom of the unit). I set the driver in the GUI to "Cyber Power Systems ups 3 CP825AVR-G / LE825G USB (usbhid-ups)" (but I suspect that earlier advice is right, that any of the "ups3 ... usbhid..ups" would work). I've got the "port or hostname" field set to "auto" (examination of /var/log/messages shows that the UPS is on /dev/ugen2.1: "Jul 7 18:35:15 fsfs ugen1.2: <CPS CP 1350C> at usbus1", but leaving it on "auto" means it won't break if it ends up in a different USB port next time I have to take the case down off the shelf). (This detail is for people in the future looking for details about this precise UPS with TrueNAS).
Hi David, Thank you for your in-depth info here, Really helped me out when setting up my `CP1500EPFCLCD' UPS.
 

Jri-TechYes

Cadet
Joined
Mar 3, 2023
Messages
1
Finally took the time to let the UPS run down and verify that my server shut down properly before it lost power, and it did. Lasted almost an hour before shutting down, too, which is good (I think more than any of the other UPSs will manage, so this won't be the limiting factor).

My UPS is a CyberPower 1325VA: LX1325G (according to the sticker on the bottom of the unit). I set the driver in the GUI to "Cyber Power Systems ups 3 CP825AVR-G / LE825G USB (usbhid-ups)" (but I suspect that earlier advice is right, that any of the "ups3 ... usbhid..ups" would work). I've got the "port or hostname" field set to "auto" (examination of /var/log/messages shows that the UPS is on /dev/ugen2.1: "Jul 7 18:35:15 fsfs ugen1.2: <CPS CP 1350C> at usbus1", but leaving it on "auto" means it won't break if it ends up in a different USB port next time I have to take the case down off the shelf). (This detail is for people in the future looking for details about this precise UPS with TrueNAS).
Thanks for your post David. I had to chose a different driver for mine to be recognized as well. I have a CPS SL700U hooked to my camera DVR and currently only 1 of my NAS systems (the other is a core system downstairs that runs my plex server and Adguard) one an old OPtiplex i5 only used for Cloudflare tunneling. I switched it from Auto to dev\uhid\ and used "Cyber Power Systems ups 2 Value 800E USB (usbhid-ups)" and it popped right into webNUT list.
I agree, I think any of the usbhid-ups drivers should work and using a Application like webNUT will show you details in a GUI so you can see exactly what you have going on.
 
Top