5

I've got upsmon (nut-client) and upsd (nut-server) set up and almost fully working on an RPi3.

Connected is a CP1500PFCLCD UPS via USB. upsd and upsmon start up perfectly every time. However, given about 2-20 hours of uptime, a "data stale" error will creep in. The specific error is:

raspberrypi upsd[14612]: Data for UPS [cyberpower] is stale - check driver

Followed by many, many more errors resulting from that one, specifically:

raspberrypi upsmon[9318]: Poll UPS [cyberpower@localhost] failed - Data stale

Unlike some others, mine does not appear to reconnect on its own.

If I restart the nut-server service, then the ~2-20 hour cycle repeats. How do I "check driver" as it suggests? I need to get rid of that error, as it is causing other processes to fail.

I run "usb-devices" and the CP1500PFCLCD does show up in the list

8

Found this fix on another site, working so far for me.

It turns out that many CyberPower products reset the USB interface if a driver has not connected for 20s.

After some more fiddling I noticed that NUT was set to consider an UPS “stale” (e.g.: “Hey Mr. UPS, you haven’t spoke to me for a while. You know what? I’ll just silently assume that you’re dead and not tell anyone about that.”) after 15 seconds by default.

In order to get a CyberPower USB UPS to stay connected for more than a couple of minutes, you have to change the staleness settings in NUT to give them some headroom and the polling interval in the definition of the UPS itself.

https://nmaggioni.xyz/2017/03/14/NUT-CyberPower-UPS/

Specifically, you need to add a pollinterval = 15 line to your UPS definition in /etc/nut/ups.conf (below your [my-ups-name] line), and the two lines DEADTIME 25 and MAXAGE 25 to /etc/nut/upsmon.conf.

For example:

/etc/nut/ups.conf:

[cyber1]
        driver = "usbhid-ups"
        port = "auto"
        desc = "CyberPower CP900EPFCLCD"
        pollinterval = 15

/etc/nut/upsmon.conf:

DEADTIME 25
MAXAGE 25

(These config options taken directly from the above-linked page.)

Note: MAXAGE appears to be deprecated on the newest versions of nut so it may not be applicable to your config.

1
  • While this may answer the question, it would be preferable if you included the important bits from the answer in case their website goes down. – PNDA Sep 25 '17 at 2:40
1

I restart driver

sudo upsdrvctl start

You can do it in Cron

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.