APC SmartUPS Status Device

No . These changes are just an attempt to avoid an error if someone enters minutes > 59 or a decimal value. Something i noticed.during testing. Been there all along.

1 Like

I have this driver installed for several APC SmartUPSOnline (double conversion) with AP9631 interface cards. Even though I have debug level logging DISABLED in the devices, I get a ton of debug level logging. Is this a known bug?

What are the debug messages? Do you have some examples?

That's by design you will get 3-4 lines of output on each run:
Battery percentage, runtime and next runtime

The telnet warning is generated by the system and has been reported as an issue and ignored and there is nothing i can do about that. Sounds like you are not running the latest version.

There is no disabled for logging in my driver ...off is the lowest level.

My point is they are debug level messages and debug level logging is disabled. That seems incorrect. They should be info level if they can't be disabled by turning off debug logging.

No there not debugging messages there informational messages and 3 messages is not a ton so not sure what your talking about.

These log statements are showing up at DEBUG level.

Here is the configuration of that specific UPS

Yours is coming out with duplicate lines for some reason. Mine is not with the same card. You would need to post full debug logs if you want me to figure out why. Or try to upgrade the fw in your card to latest.

I will start with firmware. Not sure how old the firmware on the 9631 is ...

Looks like 6.2.1 and 7.0.8 is available if I read APC website correctly ...

I added code to work around it.. still 4 lines come out you can comment them out if you want.

new version 3.9
v 3.9 in order to get all output some were repeatedly coming out more than once, there was no way around this so added variabled to not put out more than once.

  • also change messages that cannot be turned off to info instead of debug.
    */

this is what should come out every run

If that shows up in package manager, I will update.

I got my C7 for Christmas this year, so still have a lot to learn.
I used to use NUT on a Linux box to see the state of the UPSs in my house.

If you haven't looked at it, look at this link. It will help prevent some gotchas.

Will do, don't want to sidetrack the APC-UPS thread.

Thanks for the update. One big thing, is you are logging the password in plaintext when the preferences are saved. Probably shouldn't have that as the default behavior.

Suggested enhancement, use the device ID (2391 in your case above) with a modulo 10 to get the offset min to start your refreshes. That way if I have 3 UPSs (which I do) with 5 min refresh they won't all happen at the same time. Or something like that to prevent updates from happening in bunches. I tweaked my update rate to 5, 6, 7 to spread things out. But something automated based on a unique device attribute would be a good enhancement for multi-UPS situations.

1 Like

ya good idea.. to get around it on mine i have it run like every 15 20 and 25 minutes when not on battery so that they are not all coming out at once. for mine 1500 ups 5 minutes unless on battery is overkill so i dont set it that low... and on battery they last 3-5 hours so it does not need to poll that often when on power..

I actually picked 11, 13, 17 min for mine. Prime numbers should overlap less.

I can do you one better added an offset field to parameters so you can have all run at say x minutes but offset by so many minutes past the hour..

ie

new version on github

  • v 4.0 add minute offset for runtime, so with multiple device say you schedule every 15 minutes with offset 2, it will run at 2 past the hour then 17 past the hour etc
  • in this way you can have multiple ups's and have them run every x minutes but stagger them so they dont all run at the same time.

quite a few lines change so let me know if you see any issues especially when switching to on battery runtime and them back to normal, as I am not home where my ups are so cannot test the switch over.

I suppose i could force the ups on battery but dont want to risk mucking with that when i am not home.

I have one I can unplug to force battery. It is only running a switch an AP.

I just tweaked a preference, and I noticed that you are logging the password of the UPS login in the logs. You might want to remove that plain text security hole.

I believe it only comes out during debugging which is helpful at times. Debugging is not meant to be left on.