An HTML attachment was scrubbed... URL: http://lists.alioth.debian.org/pipermail/nut-upsdev/attachments/20090120/ffb91e55/attachment.htm
Citeren Marian Ciobanu <ciobi at inbox.com>:> 1) I was hoping for upsc to show more values, e.g. battery charge, or > input/output current. I understand this is not a top-of-the-line UPS, > but I wonder if the values currently returned by upsc are all that one > could get, or maybe some fiddling with the code can produce additional > values. For one thing, the Windows software shows a "battery capacity" > that is close to 100% for a fully charged battery. I wonder if this > information is provided by the UPS or if it is calculated based on > battery voltage. What do you think?I think you need to read 'man 8 blazer'.> 2) I installed KNutClient and it works OK but if I close it or change > the variables that are displayed, upsd keeps my CPU 100% busy for 1 > minute (I have a single core Athlon64 first generation). Is this > normal? Where can I change it?I don't know. I can't see *what* it is doing at that time. You might want to run 'upsd' with debugging enabled to see if this reveals more information. Best regards, Arjen PS Don't post HTML only message on this list. -- Eindhoven - The Netherlands Key fingerprint - 66 4E 03 2C 9D B5 CB 9B 7A FE 7E C1 EE 88 BC 57
>> information is provided by the UPS or if it is calculated based on >> battery voltage. What do you think?> I think you need to read 'man 8 blazer'.Arjen, I did look at blazer's man before my first post, but my question was not really answered there. Since this UPS got supported so recently, and no Mustek appears in the man page, it seems possible to me that MAYBE it would report the charge status, if asked nicely. Perhaps there's some code that can be added to do this, some new commands. I wanted to look at this, but before wasting my time getting familiar with the code only to find out that reading the charge was not possible, I wanted to check if you are quite confident that all the information that can be sent by the UPS is actually passed on by uspc, and the only way to get some idea about charge status is to look at the voltage. (As for setting battery.voltage.high and battery.voltage.low to have the driver guess the charge - I got that. I just wonder if the claim that "no UPSs compatible with the blazer driver can ever possibly report charge or currents" is really true. From your answer, it seems true; but I had to check.)>> the variables that are displayed, upsd keeps my CPU 100% busy for 1> I don't know. I can't see *what* it is doing at that time. You might > want to run 'upsd' with debugging enabled to see if this reveals more > information.Well, I started upsd in debug mode and here's what I saw: when KNutClient is not running the output is mostly "mainloop: polling 2 filedescriptors" and "mainloop: no data available", with some Ping/Pong messages. When KNutClient is running, there are "mainloop: polling 3 filedescriptors", "mainloop: no data available" and Ping/Pong messages, and then "write: [destfd=6] [len=35] [VAR mustek battery.voltage "13.70"]" and similar messages. Once KNutClient is stopped, millions of "mainloop: polling 3 filedescriptors" are generated and after a minute there's a "Disconnect from 127.0.0.1", followed by messages like the ones before starting KNutClient ("mainloop: polling 2 filedescriptors" + "mainloop: no data available" + some Ping/Pong messages.) It looks like KNutClient forgot to disconnect. Or maybe I messed up something. Thanks, Ciobi
> Although the 'blazer' driver is able to talk to your UPS, I have no > information on it. You may be right that the UPS is able to report[...] OK, I started Windows and unplugged the UPS (I know I'm not supposed to do that), then I wrote down the reported voltage and battery charge, and then I put the results in a spreadsheet and created a chart. The linear relation between charge and voltage is obvious, so I'm quite confident that the charge as reported by the Windows app is voltage-based. There's still a slim chance that the UPS might be able to report the actual charge, as the software is generic (WinPower) and might not be aware of all the capabilities of a particular UPS, but I'm not going to pursue this any further; it looks pointless. I believe the voltage-based charge calculation can be improved, though; the main idea is to use different limits for high and low voltage, depending on whether there is AC power or not. When I pulled the plug, the voltage dropped from 13.7V to 11.8V and the charge from 97.3% to 47.3%. I let it run on battery until it hit 11.3V and 34.2% and the UPS started to beep more frequently. After I plugged it back in, the voltage went up to 12.4V and the charge to 63%. While what happened with the voltage makes sense, the same can't be said about charge. So I'm going to run some experiments and then I'll probably make some code changes to have different limits (or perhaps different formulas) used for charge in these 2 cases. (The main thing that I'd like to check is whether the voltage decreases linearly with time for a constant load.) Now concerning battery.voltage.high/low: this didn't work for me. I wonder if I made a mistake in the config file. Here's my ups.conf: [mustek] driver = blazer_usb battery.voltage.high = 13.8 battery.voltage.low = 10 port = auto desc = mustek With these settings, upsdrvctl doesn't even start. I eventually got it working, but only after making changes to blazer_makevartable() and blazer_battery(). Did I misunderstand something in the manual? -------------------- [...]>> It looks like KNutClient forgot to disconnect. Or maybe I messed up >> something. > > Try the latest version from the trunk. It indeed looks like KNutClient > forgot to disconnect, so this version will now force disconnect the > client if it appears to have data available, but doesn't respond when > we ask for it. This should probably solve this problem.I tried. It fixes the issue. Thanks, Ciobi
> Mark the note about BATTERY CHARGE in the blazer man page. What you're > attempting may appear to work for *one* load condition and the battery > capacity you have now, but it *will* fail if the either load or > battery capacity changes. Please familiarize yourself with the Peukert > equation before attempting to 'improve' the calculation and find that > this can't be done with the values that are reported by the UPS.The blazer manual warns that using a linear approximation based on voltage is quite inaccurate. So I think it is improvable. True, it's not going to get very accurate, but is the current implementation the best that can possibly be done? The UPS reports a "load", which is related to current. I think it should be used when determining a charge. (A calibration program would be nice too.) Anyway, I have to run my experiments first. My goal is to have a variable that goes from 100, when the battery is fully charged and the AC power is lost, to 0, when the UPS starts to warn that it has reached the "low battery" level. This should work for dynamic loads, decreasing faster as the load increases. If I make significant progress, I'll report back sometime next week. ------------------>> Did I misunderstand something in the manual? > > Absolutely. See what is written under EXTRA ARGUMENTS.Well, the BATTERY CHARGE section doesn't mention "default.battery.voltage.high", only "battery.voltage.high". True, you find the "default" thing in EXTRA ARGUMENTS, but why look there if BATTERY CHARGE tells you clearly what to do and if you are a simple user, and not the developer who knows that there are "default" variables, which are treated slightly differently from the rest. I think it would be a good idea to replace "battery.voltage.high" with "default.battery.voltage.high" in blazer's manual. Best regards, Ciobi