Rory Jaffe
2017-Aug-12 16:00 UTC
[Nut-upsuser] Keep on losing communication: Raspberry Pi, CyberPower PR1500LCD
Everything runs fine for several hours, then communication is lost and nut doesn't reestablish communication on its own. Running sudo upsdrvctl stop then sudo upsdrvctl start reestablishes communication. OS Version: Linux piaware 4.9.35-v7+ #1014 SMP Fri Jun 30 14:47:43 BST 2017 armv7l GNU/Linux Nut Version: 2.7.2-4 Nut Installation Method: apt Device: CyberPower PR1500LCD Uses ? ? Generic HID driver 0.38 (2.7.2) Configuration files ?===============? ? #nut.conf MODE=netserver ?==============? #ups.conf maxretry = 3 [MainUPS] driver = usbhid-ups port = auto desc = "CyberPower PR1500LCD" ?==========? #upsd.conf LISTEN 127.0.0.1 3493 LISTEN ::1 3493 LISTEN 192.168.1.101 ?===========? #upsd.users [testuser] password = passwordhidden instcmds = test.battery.start.deep instcmds = test.battery.start.quick instcmds = test.battery.stop [upsmonitor] password = passwordhidden upsmon master [monuser] password = passwordhidden upsmon slave ?========? #upsmon.conf MONITOR MainUPS at localhost 1 upsmonitor passwordhidden master MINSUPPLIES 1 SHUTDOWNCMD "/sbin/shutdown -h +0" POLLFREQ 5 POLLFREQALERT 5 HOSTSYNC 15 DEADTIME 15 POWERDOWNFLAG /etc/killpower RBWARNTIME 43200 NOCOMMWARNTIME 300 FINALDELAY 5 ?================? #upssched.conf CMDSCRIPT /bin/upssched-cmd =================? l ?susb output Bus 001 Device 006: ID 0bda:2832 Realtek Semiconductor Corp. RTL2832U DVB-T Bus 001 Device 005: ID 24c0:0003 Bus 001 Device 004: ID 0764:0601 Cyber Power System, Inc. Bus 001 Device 003: ID 0424:ec00 Standard Microsystems Corp. SMSC9512/9514 Fast Ethernet Adapter Bus 001 Device 002: ID 0424:9514 Standard Microsystems Corp. Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub ==============upsc output battery.charge: 100 battery.charge.low: 10 battery.charge.warning: 20 battery.mfr.date: CPS battery.runtime: 15030 battery.runtime.low: 300 battery.type: PbAcid battery.voltage: 24.0 battery.voltage.nominal: 24 device.mfr: CPS device.model: PR1500LCD device.serial: PQ8DV2000482 device.type: ups driver.name: usbhid-ups driver.parameter.pollfreq: 30 driver.parameter.pollinterval: 2 driver.parameter.port: auto driver.version: 2.7.2 driver.version.data: CyberPower HID 0.3 driver.version.internal: 0.38 input.voltage: 123.0 input.voltage.nominal: 120 output.voltage: 127.0 ups.beeper.status: disabled ups.delay.shutdown: 20 ups.delay.start: 30 ups.load: 5 ups.mfr: CPS ups.model: PR1500LCD ups.productid: 0601 ups.realpower.nominal: 1050 ups.serial: PQ8DV2000482 ups.status: OL ups.test.result: Done and passed ups.timer.shutdown: -60 ups.timer.start: -60 ups.vendorid: 0764 ? -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.alioth.debian.org/pipermail/nut-upsuser/attachments/20170812/23218782/attachment.html>
Charles Lepple
2017-Aug-15 13:01 UTC
[Nut-upsuser] Keep on losing communication: Raspberry Pi, CyberPower PR1500LCD
On Aug 12, 2017, at 12:00 PM, Rory Jaffe <rsjaffe at gmail.com> wrote:> > OS Version: Linux piaware 4.9.35-v7+ #1014 SMP Fri Jun 30 14:47:43 BST 2017 armv7l GNU/Linux > Nut Version: 2.7.2-4 > Nut Installation Method: apt > Device: CyberPower PR1500LCD > Uses? ?Generic HID driver 0.38 (2.7.2)Is this stock Raspbian or another variant? If it is Raspbian, I think it might be affected by a Debian issue with libusb-0.1. It is possible to rebuild from source and use libusb-1.0 instead - let us know if that sounds reasonable. You can also check the list archives for previous discussions (although I think we were seeing issues with Tripp-Lite hardware more frequently). Also, sometimes swapping out the USB cable can help.
Rory Jaffe
2017-Aug-29 00:58 UTC
[Nut-upsuser] Keep on losing communication: Raspberry Pi, CyberPower PR1500LCD
?Found a way of addressing this without rebuilding nut. The following restarts upsdrvctl when communications are lost (COMMBAD). I added NOCOMM as a condition just in case. I've monitored this, and it successfully reconnects when connection is lost. Added to upsmon.conf NOTIFYCMD /etc/nut/notify.sh NOTIFYFLAG NOCOMM SYSLOG+WALL+EXEC NOTIFYFLAG COMMBAD SYSLOG+WALL+EXEC? Then, /etc/nut/notify.sh is marked executable and contains: #!/bin/bash case "$NOTIFYTYPE" in COMMBAD|NOCOMM) /sbin/upsdrvctl stop; /sbin/upsdrvctl start; echo 'Restarted upsdrvctl' | systemd-cat -p notice -t upsd ;; *) ;; esac On Tue, Aug 15, 2017 at 6:01 AM, Charles Lepple <clepple at gmail.com> wrote:> On Aug 12, 2017, at 12:00 PM, Rory Jaffe <rsjaffe at gmail.com> wrote: > > > > OS Version: Linux piaware 4.9.35-v7+ #1014 SMP Fri Jun 30 14:47:43 BST > 2017 armv7l GNU/Linux > > Nut Version: 2.7.2-4 > > Nut Installation Method: apt > > Device: CyberPower PR1500LCD > > Uses? ?Generic HID driver 0.38 (2.7.2) > > Is this stock Raspbian or another variant? > > If it is Raspbian, I think it might be affected by a Debian issue with > libusb-0.1. It is possible to rebuild from source and use libusb-1.0 > instead - let us know if that sounds reasonable. You can also check the > list archives for previous discussions (although I think we were seeing > issues with Tripp-Lite hardware more frequently). > > Also, sometimes swapping out the USB cable can help.-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.alioth.debian.org/pipermail/nut-upsuser/attachments/20170828/3a15d5ee/attachment.html>