Listed on

Wierd behaviour of Cyberpower UPS

After finally getting sick of watching RAID rebuilds I bit the bullet and installed a Cyberpower BR850ELCD UPS on my FreeBSD monitoring box. Given I bought what I could find at the instant - there was an immediate threat to the stability of my power - and there were no available serial ports on the monitoring server we took the best available compromise especially as there we could also detect power failures via the network. Naturally, things did not go smoothly...
The good news is that NUT (Network UPS Tools) from http://www.networkupstools.org recognised the UPS using its usbhid-ups driver. The bad news is that usb device would constantly connect and disconnect:

dmesg:


ugen1.3: <CPS> at usbus1 (disconnected)
ugen1.3: <CPS> at usbus1
ugen1.3: <CPS> at usbus1 (disconnected)
ugen1.3: <CPS> at usbus1


Fortunately this behaviour stops once the driver connects to the ups. I managed to persuade this to happen using the ddvd daemon by creating /usr/local/etc/devd/nut.conf:

attach 100 {
   match "vendor" "0x0764”;
   match "product" "0x0501”;
   action "/usr/sbin/chown -R -L uucp: /dev/$device-name; /usr/local/etc/rc.d/nut start”;
};



which both sets the permissions on the device and starts nut (upsd and the usbhid-ups driver). A fussy involved process but one that will save a lot of problems later on.