Hello, I have a Best Ferrups 3.1KVA and I noticed that the percent battery voltage reported from upsc never gets above 69.9%. I believe there is a mistake in the driver. The battery percentage is calculated based on the High Battery Alarm Setpoint (59.6V) instead of the Ideal Voltage which is about 54V (4 batteries x 13.6V). I examined the source code and found that the variable fc.fullvolts is the result of querying parameter 67 from the UPS. This parameter is defined per Ferrups Tip 503 as: "The battery voltage at which the UPS sound a High Battery alarm" A better value to use in determining the percent battery voltage would be fc.idealbvolts which is calculated in the driver source... I propose the following patch to fix the battery.charge (% battery full) reading. --- bestfcom.c.orig 2012-07-31 12:38:59.000000000 -0500 +++ bestfcom.c 2013-05-11 09:39:52.155279710 -0500 @@ -332,7 +332,7 @@ /* Compute battery percent left based on battery voltages. */ battpercent = ((vbatt - fc.emptyvolts) - / (fc.fullvolts - fc.emptyvolts) * 100.0); + / (fc.idealbvolts - fc.emptyvolts) * 100.0); if (battpercent < 0.0) battpercent = 0.0; else if (battpercent > 100.0) The patch is based on version 2.6.5 Thanks for your consideration. I know this is an old UPS (1995) but it still works and I'd like to keep using it :) -- Bo Kersey VirCIO - managed network solutions If it is free, you are the product.
On May 11, 2013, at 12:04 PM, Bo Kersey wrote:> I propose the following patch to fix the battery.charge (% battery full) reading.Committed. Thank you for an easy-to-apply patch with a helpful explanation.> Thanks for your consideration. I know this is an old UPS (1995) but it still works and I'd like to keep using it :)Agreed, we don't want to make a working UPS obsolete. Honestly, part of the reason why this project takes a more conservative approach to change is that we know there are a lot of older yet reliable serial UPSes out there that don't require as much "care and feeding" on the software side as the USB UPSes do. If we ever inadvertently break support for one of the serial models, please let us know. -- Charles Lepple clepple at gmail