Configure Cyber Power System, Inc. CP1500 AVR UPS in CentOS 8
Get list of USB device
Connect USB cable from UPS to CentOS host and run following command
lsusb
UPS Vendor and Product
Capture Vendor : XXXX and Product: YYYY
...
Bus 003 Device 002: ID 0764:0501 Cyber Power System, Inc. CP1500 AVR UPS
XXXX:YYYY
...
Create udev rule
For consistent naming let us create a udev rule
Create or Modify /etc/udev/rules.d/50-ups.rules
(Update 0764 and 0501 with your Vendor and Product id)
SUBSYSTEM=="usb", ATTR{idVendor}=="0764", ATTR{idProduct}=="0501", SYMLINK+="ups0", GROUP="nut"
Notify udev of changes
udevadm control --reload-rules && udevadm trigger
Setup LISTEN address
Modify /etc/ups/upsd.conf
and add following
LISTEN 192.168.101.253 3493
LISTEN 127.0.0.1 3493
LISTEN ::1 3493
Create UPS entry
Modify /etc/ups/ups.conf
and add following
[cybersmart]
driver = usbhid-ups
port = /dev/ups0
Create user for UPS
Modify /etc/ups/upsd.users
and add following (set you password)
[upsuser]
password = myups123
upsmon master
actions = SET
instcmds = ALL
Enable monitoring
Modify /etc/ups/upsmon.conf
(user correct ups name, ups user and password)
MONITOR cybersmart@localhost 1 upsmon myups123 master
Enable and Start NUT services
systemctl enable nut-monitor nut-driver nut-server
systemctl start nut-monitor nut-driver nut-server
Check UPS status
upsc cybersmart
Here is output:
Init SSL without certificate database
battery.charge: 100
battery.charge.low: 10
battery.charge.warning: 20
battery.mfr.date: CPS
battery.runtime: 2961
battery.runtime.low: 300
battery.type: PbAcid
battery.voltage: 13.8
battery.voltage.nominal: 12
device.mfr: CPS
device.model: CP 1500C
device.type: ups
driver.name: usbhid-ups
driver.parameter.pollfreq: 30
driver.parameter.pollinterval: 2
driver.parameter.port: /dev/ups0
driver.parameter.synchronous: no
driver.version: 2.7.4
driver.version.data: CyberPower HID 0.4
driver.version.internal: 0.41
input.transfer.high: 140
input.transfer.low: 90
input.voltage: 119.0
input.voltage.nominal: 120
output.voltage: 119.0
ups.beeper.status: enabled
ups.delay.shutdown: 20
ups.delay.start: 30
ups.load: 11
ups.mfr: CPS
ups.model: CP 1500C
ups.productid: 0501
ups.realpower.nominal: 388
ups.status: OL
ups.test.result: Done and passed
ups.timer.shutdown: -60
ups.timer.start: 0
ups.vendorid: 0764