APCUPSD poll time too long

Hi all

The github issue #15383 deals with this but was closed automatically for lack of response.

APCUPSD integration provides access to sensors in APC UPS devices (or some other brands).
The problem is that the sensors only update every 60 seconds. This is too long for something as time critical as shutting down equipment and monitoring battery capacity during a power outage and makes it ineffective.

Adding scan interval to the sensor in the config does not help as 60 seconds seems to be hard coded in the integration.

It would be great to be able to adjust this or at the very least have the default set lower.

I agree, the defult time is too long. Every 10s would prob suffice but if it was user configurable that would be ideal.

I would like the pooling interval be shorter as well. At least once per 10sec.
BTW how can I find out what “sensors” are implemented for particular UPS? I have SMT750I and seems apcusbd does not return line voltage, frequency, load and some others which would be nice to see.

It seems that the basic issue is not that the polling interval is too long, but that it’s poll not push.

I wrote a hacky shell script for nut integration, where nut calls it on transfer to battery, and it posts to an MQTT topic. So I’m not sure what the interval is in nut (2s?), but I get notifications quite quickly. So quickly that I wait 15s before reporting/acting, because it’s fairly frequent to transfer to battery and then back to line 5s later.

So I would suggest figuring out how to modify apcupsd to post to MQTT, and then have HA watch that, or some other push mechanism.

1 Like

I use the exec node for this on Node red. Which get the infos from the shell.

I have 5 metrics of interest . So it is not that hard to implement.

The trigger is set to 15 secs. I sent those values to my Homeseer system.

I agree, wish it was a parameter so I didn’t have to think about doing it another way, would be much easier… The developer is still active, someone could open a PR and he might take it and try to get it merged into a future HA release

Hi all, in the meanwhile i found a workarond using the “USV NUT Wrapper” bash script from Martin Lang, wich can be found here: https://www.reddit.com/r/homelab/comments/ar0h9l/apcupsd_nut_wrapper_script_apcupsd_and_nut_on_the/

It works great for me, I can expose data from apcupsd via a NUT emulation, so that i can throw away the HA ACPUPSD integration and use NUT platform instead, where i can choose freely the refresh rate.

HTH