Net Pilgrim
Cadet
- Joined
- May 29, 2016
- Messages
- 1
Please help!
I'm having trouble getting my UPS service to run correctly, running under FreeNAS 11.3-U4.1 with a CyberPower (CST135XLU) UPS connected via USB. Basically, after configuring the UPS service in the GUI (using MASTER mode and the correct port: /dev/ugen0.4), saving configuration and starting the UPS service, going to the CLI (via SSH or Shell) I get the following errors when trying to determine the status of the UPS:
After reading through other threads and doing a bunch of detective work it seems to be an incorrect driver being used, I have determined that no matter what Driver option I try to set in the GUI and then save the change, it seems to always revert back to powerpanel (specifically: powerpanel$CPS1500AVR). I'm certain that the correct Driver should be usbhid-ups. I've attached a couple of screen shots of what I'm trying to select, vs. what the GUI always sets it back to.
The only way I've been able to get the UPS service to run is to disable it in the FreeNAS GUI, then manually edit the conf files in /etc/local/nut/ , with the most important change being the driver selection in ups.conf (changed from powerpanel to usbhid-ups), like so:
I'm then able to manually start the nut_upsmon service:
then the nut service:
Note: I have to use the 'onestart' directive instead of 'start', since I get an error stating that the service must be enabled in the /etc/rc.conf file. Of course, I tried this, but it gets overwritten on reboot of the server. So ... for now, I have just been using 'onestart' in order to debug my situation.
Now checking my UPS status:
So, it now seems to be working correctly. Until I reboot the server or restart the service from the GUI again ... all of conf files get overwritten, like so:
I understand that this is probably the expected behavior (GUI config overwrites any manual changes I made), however I am kind of stuck. I can't figure out how make my driver change actually stick, or force it to use usbhid-ups. The only thing I can guess is that it is somehow detecting the device name (CPS CST135XLU) from what is connecting to the USB Port ugen0.4 and trying to be smarter than me by changing it to what it thinks is the closest equivalent from CyberPower. From what I can tell (from NUT Website), all CyberPower UPS devices with USB connections (they don't have my exact model) use the usbhid-ups driver, whereas other models (like the CPS1500AVR it keeps thinking I have) use powerpanel.
By way of further debugging, I've tried making other changes to the FreeNAS GUI UPS Service options (like the Shutdown Timer period, MASTER -> SLAVE mode, etc.) and all of those settings do seem to get properly reflected and survive a settings save and reboot (I think). Therefore, I don't think something got messed up with my system configuratino db. However, once again - whenever I change back to MASTER mode and try to select anything other than the powerpanel driver it has shown by default, it doesn't last even when I try to save again.
I appreciate any help in correcting my issue. Thank you for any tips or solution to my problem! Cheers.
I'm having trouble getting my UPS service to run correctly, running under FreeNAS 11.3-U4.1 with a CyberPower (CST135XLU) UPS connected via USB. Basically, after configuring the UPS service in the GUI (using MASTER mode and the correct port: /dev/ugen0.4), saving configuration and starting the UPS service, going to the CLI (via SSH or Shell) I get the following errors when trying to determine the status of the UPS:
Code:
/etc/local/nut # upsc ups Error: Connection failure: Connection refused
After reading through other threads and doing a bunch of detective work it seems to be an incorrect driver being used, I have determined that no matter what Driver option I try to set in the GUI and then save the change, it seems to always revert back to powerpanel (specifically: powerpanel$CPS1500AVR). I'm certain that the correct Driver should be usbhid-ups. I've attached a couple of screen shots of what I'm trying to select, vs. what the GUI always sets it back to.
The only way I've been able to get the UPS service to run is to disable it in the FreeNAS GUI, then manually edit the conf files in /etc/local/nut/ , with the most important change being the driver selection in ups.conf (changed from powerpanel to usbhid-ups), like so:
Code:
/etc/local/nut # cat ups.conf [ups] driver = usbhid-ups port = /dev/ugen0.4 desc =
I'm then able to manually start the nut_upsmon service:
Code:
/etc/local/nut # service nut_upsmon onestart Starting nut_upsmon. Network UPS Tools upsmon 2.7.4 kill: No such process UPS: ups@localhost:3493 (master) (power value 1) Using power down flag file /etc/nokillpower
then the nut service:
Code:
/etc/local/nut # service nut onestart Network UPS Tools - UPS driver controller 2.7.4 Network UPS Tools - Generic HID driver 0.41 (2.7.4) USB communication driver 0.33 Using subdriver: CyberPower HID 0.4 libusb_get_interrupt: Unknown error Starting nut. Network UPS Tools upsd 2.7.4 fopen /var/db/nut/upsd.pid: No such file or directory listening on ::1 port 3493 listening on 127.0.0.1 port 3493 Connected to UPS [ups]: usbhid-ups-ups /usr/local/etc/nut/cmdvartab not found - disabling descriptions
Note: I have to use the 'onestart' directive instead of 'start', since I get an error stating that the service must be enabled in the /etc/rc.conf file. Of course, I tried this, but it gets overwritten on reboot of the server. So ... for now, I have just been using 'onestart' in order to debug my situation.
Now checking my UPS status:
Code:
/etc/local/nut # upsc ups battery.charge: 100 battery.charge.low: 10 battery.charge.warning: 20 battery.mfr.date: CPS battery.runtime: 3930 battery.runtime.low: 300 battery.type: PbAcid battery.voltage: 24.0 battery.voltage.nominal: 24 device.mfr: CPS device.model: CST135XLU device.serial: CR7EZxxxxxxx device.type: ups driver.name: usbhid-ups driver.parameter.pollfreq: 30 driver.parameter.pollinterval: 2 driver.parameter.port: /dev/ugen0.4 driver.parameter.synchronous: no driver.version: 2.7.4 driver.version.data: CyberPower HID 0.4 driver.version.internal: 0.41 input.voltage: 125.0 input.voltage.nominal: 120 output.voltage: 141.0 ups.beeper.status: enabled ups.delay.shutdown: 20 ups.delay.start: 30 ups.load: 12 ups.mfr: CPS ups.model: CST135XLU ups.productid: 0501 ups.realpower.nominal: 810 ups.serial: CR7EZxxxxxxx ups.status: OL ups.test.result: No test initiated ups.timer.shutdown: -60 ups.timer.start: -60 ups.vendorid: 0764
So, it now seems to be working correctly. Until I reboot the server or restart the service from the GUI again ... all of conf files get overwritten, like so:
Code:
~ # upsc ups Error: Connection failure: Connection refused root@freenas1:~ # cat /etc/local/nut/ups.conf [ups] driver = powerpanel port = /dev/ugen0.4 desc =
I understand that this is probably the expected behavior (GUI config overwrites any manual changes I made), however I am kind of stuck. I can't figure out how make my driver change actually stick, or force it to use usbhid-ups. The only thing I can guess is that it is somehow detecting the device name (CPS CST135XLU) from what is connecting to the USB Port ugen0.4 and trying to be smarter than me by changing it to what it thinks is the closest equivalent from CyberPower. From what I can tell (from NUT Website), all CyberPower UPS devices with USB connections (they don't have my exact model) use the usbhid-ups driver, whereas other models (like the CPS1500AVR it keeps thinking I have) use powerpanel.
/etc/local/nut # dmesg | grep ugen
ugen1.1: <Intel EHCI root HUB> at usbus1
ugen2.1: <Intel EHCI root HUB> at usbus2
ugen0.1: <0x8086 XHCI root HUB> at usbus0
ugen0.2: <vendor 0x05e3 USB2.0 Hub> at usbus0
ugen1.2: <vendor 0x8087 product 0x8008> at usbus1
ugen2.2: <vendor 0x8087 product 0x8000> at usbus2
ugen0.3: <Dell Dell USB Keyboard> at usbus0
ugen0.4: <CPS CST135XLU> at usbus0
ugen0.5: <vendor 0x0557 product 0x7000> at usbus0
ugen0.6: <vendor 0x0557 product 0x2419> at usbus0
ugen1.1: <Intel EHCI root HUB> at usbus1
ugen2.1: <Intel EHCI root HUB> at usbus2
ugen0.1: <0x8086 XHCI root HUB> at usbus0
ugen0.2: <vendor 0x05e3 USB2.0 Hub> at usbus0
ugen1.2: <vendor 0x8087 product 0x8008> at usbus1
ugen2.2: <vendor 0x8087 product 0x8000> at usbus2
ugen0.3: <Dell Dell USB Keyboard> at usbus0
ugen0.4: <CPS CST135XLU> at usbus0
ugen0.5: <vendor 0x0557 product 0x7000> at usbus0
ugen0.6: <vendor 0x0557 product 0x2419> at usbus0
I appreciate any help in correcting my issue. Thank you for any tips or solution to my problem! Cheers.