NUT / APC XS-1000 failed - Data stale

I have NUT setup and configured to work with an APC XS-1000 UPS. It works good for a while (something like 7 - 10 days) and then I stop getting data / get failed - Data stale. If I reboot my HA server (RPI4) it starts working again.

I tired searching for this issue, but could not find much.

TIA

In your upsd.conf bump up the maxage to something higher than default.

you might need to adjust the polling interval as well
Example:

[apc]
driver = usbhid-ups
port = auto
pollinterval = 15

I have already tried both of these with no luck. I still get the same stale data. Rebooting always fixes it (but that’s pretty brute force).

So in upsd.conf I have MAXAGE 25 at the bottom, this along with the pollinterval = 15 in ups.conf fixed the stale data issue for me.

This is what I just tried:

users:
  - username: ####
    password: ####
    instcmds:
      - all
    actions: []
devices:
  - name: APC_XS_1000
    driver: usbhid-ups
    port: auto
    config: []
mode: netserver
shutdown_host: 'false'
log_level: debug
maxage: 25
pollinterval: 15

And I’m still seeing the issue. This is running on a Raspberry PI4 connected to the UPS via an APC USB cable. I believe I have also tried it in the devices section (where I thought it belonged).

that’s not the ups.conf or upsd.conf format, is that an Addon for supervised?
If so, contact the author on how to add the entries to the config.

OK. That makes more sense now. I’m adding that to the wrong config file. I’ll give it a try tonight.

Did you find out how to add the entries in the nut config in hass?

No, I gave up and switched to apcupsd. It’s been running smoothly since I set it up.

@frenck, is there a chance the NUT add-on could get the ā€œpollintervalā€ configuration option? Based on what I saw while looking through a number of support boards mentioning similar issues, it seems that increasing values of maxage AND pollinterval helped a good a number of end users.

1 Like

I had serious problems with my Cyber Power unit after the 0.6.0 upgrade, opened a ticket and he did fix that issue int the edge version and 0.6.1. Here is my config, and it is stable.

devices:
  - name: DR_UPS
    alias: drups
    driver: usbhid-ups
    port: auto
    config:
      - vendorid = 0764*
      - pollinterval = 15
mode: netserver
shutdown_host: 'false'
list_usb_devices: true
upsd_maxage: 25
upsmon_deadtime: 25
1 Like

Thanks @mattlward! I’ll give it a try.

@lensherm You are welcome. I rely on Nut quite a bit as we have power issues in our small town. 2 units connected as remotes with Nut on RPi;s and 1 directly connected via USB on my Lenovo ā€œserverā€. The directly connected unit causes me the most heartburn and it is the only Cyber Power unit I have. When I replace it, it will be APC. I am so done with Cyber Power.

@mattlward, good to know re CyberPower. All I have online now are APCs. I also recently bought a couple of used double conversion Eatons, but I haven’t wired those up yet. I was about to get a CP unit I saw at Costco yesterday.

We likewise have frequent issues with the grid here. Overhead wires next to trees don’t mix well in inclement weather. Always have two generators tuned up and gassed up at the ready. The reason I got the double conversion units is because the main generator I use is not of the inverter variety. Hence, the frequency of the current it produces isn’t stable enough for conventional UPSes and they keep switching back and forth. I end up having to run a smaller inverter generator just for my network rack to go into the APC. Hoping to use the double conversion UPS, so I can use just one generator.

So today I really went to town exploring depths of NUT documentation I wished I never had to descend to. Anyhow, at least with my specific setup, I ended up having really good luck using the - nolock config option to reliably avoid the stale data issue. I didn’t care to explore too much further, yet it seems in certain scenarios there’s contention for the USB port. Didn’t really want to go through all the logs in the chain of macOS–>VirtualBox–>Home Assistant OS–>etc.

Hope this helps someone.

I’m having real problems with my CyberPower UPS. It goes down every few hours and I get the constant ā€˜Data Stale’ messages in the logs.

Is your config still working for you?

I’ve added the upsd_maxage and upsmon_deadtime options to mine but it hasn’t made any difference. I’ve read lots of other posts on Nut forums about setting the pollinterval to 15, which I already had set in my config.

Do we have any confirmation from anywhere that the pollinterval option is actually supported in the HA version of Nut, or is it being ignored by the add-on? I realise that its a valid option for Nut in general, but so was the upsmon_deadtime option and that has only just been added to the HA version.

Mine is still working great and the edge changes were all roll into the latest non-edge release. I know they were because I worked with the dev to get the updates working.

Very strange. Mine went down again last night. It seems to only last about two hours before spitting out all the Data Stale messages in the log. It works straight away when I restart the NUT Add-on. My configuration is identical to yours except for the user details.

I was just curious as to whether the pollinterval option was actually having any effect as it’s not listed anywhere in the documentation, although I appreciate that it is an option for the normal NUT server if you’re running elsewhere.

I may have to resort to spinning up an alternative OS in a VM just to run NUT server instead.

Poll interval does have an affect in the latest version. That is what fixed mine. Have you changed the values? You should open a ticket with the dev on github.