Home Assistant Community

APCUPSD (apcaccess) refresh rate

#1

I have power blips and want to know about them. I get the console output from apcupsd that status has changed, but Home Assistant does not see it. I can see that the battery percentage will go down and it takes minutes for Home Assistant to see it, maybe 2 minutes.

If I unplug power and let my UPS sit for a couple of minutes my automation works, but that means I won’t get a push on power blips.

What is the frequency it calls apcaccess to update status? Can you increase that rate or make it event driven somehow?

#2

I’m curious about this as well. I noticed just last week that APCUPSD showed on battery for 8 seconds, but HA reported much longer than that because of the delay in seeing the back on line status change.

#3

I’m using the component for a remote daemon (ie over the network).

After noticing my sensor hadn’t updated after taking down (for other reasons) the apcupsd daemon elsewhere, I wanted to know the same about the refresh speed. Apparently there is a key:

scan_interval: 10

You could try that to force it, but the default of 30 seconds should be more than appropriate. I suspect then that something else is happening.

Restarting HA with the daemon down means that the enitity doesn’t load at all. This is a bit unfortunate - I would otherwise have expected an COMLOST status using apcaccess. More worrying is that the entity won’t be available going forward (until another restart).

In fact, taking down the daemon any time after HA has successfully loaded it will cease any further updates until a restart.

It seems like the component fails to start or loses updates once the apcups connection goes down. Any tips on how to confirm that?