Hello, Some time ago i bought 2 OPTI UPS devices, but was really sad to see the page about the OPTI protocol on the nut page. But i don't wanted to give up :) So i sniffed the serial communication using the windows application/driver and found out that these PS (PowerSeries) devices are different than the ES series mentioned on the Nut page. They use some kind of ASCII protocol, with the "F" and "Q1" queries, that many other models use. (i wonder what's the name of this protocol and where it originated?) Also it appers that they are rebranded Powercoms, because the 'hm' command returns "POWERCOM smk'. But unfortunately i was not able to make the powercom driver use them. So i began hacking a driver out of skel.c and got most of the stuff working but the battery voltage is giving me headaches :) here is a sample output of the 'Q1' query: (228.7 228.7 228.7 024 49.4 2.40 30.0 00000000 00011100 The first three values are input voltage, fail voltage(seems bogus, as it's always as the input voltage), output voltage, load percent, AC freq, battery voltage, and temperature (also they seem to have two status registers) The PROBLEM is that I can't really understand how to convert the battery value to something meaningfull, i.e. charge percent... it's 2.40 then the battery is full (it's 2.50 on the other OPTI ups i have, the first is model PS1000B-RM, and the second is PS1500B) Both of them have 3 batteries each, and battery voltage of 36 volts is returned from the 'F' query : #230.0 005 036.0 50.0 Any ideas or pointers are greatly appreciated! P.S.: These units have 8 outlets each, split into 3 groups that can be separately controlled(on/off), i wonder how exactly to implement this, as as it seems none of the drivers use this functionality. Thanks for reading my lenghty and non-understandable email :) -- --niki PGP KeyId: 0xF2DB7EB9 -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 187 bytes Desc: not available Url : http://lists.alioth.debian.org/pipermail/nut-upsdev/attachments/20051104/0620574b/attachment.pgp
On 11/4/05, Niki Denev <niki@totalterror.net> wrote:> P.S.: These units have 8 outlets each, split into 3 groups that > can be separately controlled(on/off), i wonder how exactly > to implement this, as as it seems none of the drivers use this functionality.Check out docs/new-names.txt, under the section titled "output: Smart outlet management (smart on/off switch, ...)". That describes how to present the outlets in the driver. MGE UPSes have this feature ("PowerShare", maybe?) and I am fairly certain it is implemented in one of mge-shut, mge-utalk or newhidups. As for the battery value, you could expose it as debug.battery.voltage or whatever your best guess is, and run upslog while draining the battery to see how it changes over time. -- - Charles Lepple
Carlos Rodrigues wrote:> > The "powermust" driver should support it (the driver is now named > "megatec" on the development branch of NUT). >It won't support it without some changes.(haven't looked at the dev branch though) For example the megatec driver expects one byte for status registers (eight ones or zeroes), and the OPTI ups returns two : "(228.7 228.7 228.7 024 49.4 2.40 30.0 00000000 00011100" But i agree that it will be better to add support for this UPS in this driver instead of writing a whole new one.> Hmmm. Ok, I guess the "megatec" driver will output bogus values for > "charge" as it calculates only for 12V and 24V batteries (as returned > by "F").As there are different models with different number of batteries, but mostly they are 12V each, do you think it's appropriate to set the "battery.packs" from this info? (i.e. 36 / 12 = 3 as in my case)> > You can start by measuring both the value for 100% charge and the > value when the UPS triggers the low-battery status.I think that i'll have problems here... I have just ran this test, and the results look very confusing. The UPS have an LCD display that has five bars that show the battery charge (20 percent each). At this point (100% charge) the battery voltage string returned from the Q1 query reads 2.40 (i have once noticed it to jump to 2.50 for a very short period) Then i have disconnected the power of the UPS. The battery voltage variable started to go down.. it went from 2.40 to 2.00 and shortly after this the UPS began beeping faster. (the LCD showed 40% charge) also i noticed one of the status registers to be flpped to On. The LCD then showed 20% charge... but the variable stayed at 2.00. And the other thing is that it went down in a very non-linear fashion, sometimes 2 bars on the LCD dissapeared without the value to change. I've attached the continous output of the Q1 query during a short power interruption. (also here : http://www.totalterror.net/src/opti/pwr_fail.txt)> As for controlling the outlets, "megatec" doesn't support it either. > However, the point of this driver is to consolidate all the diferent > drivers using variations of this very same protocol, so you're welcome > to add support for that functionality (and for calculating the charge) > to "megatec". > > If you go for this, send me a note.I'll see what i can do in the spare time, but since i own two of them at home probably i'll try to do something sooner than later :) --niki -------------- next part -------------- (228.7 228.7 228.7 025 50.0 2.40 31.0 00000000 00011100 (228.7 228.7 228.7 026 49.5 2.40 31.0 00000000 00011100 (228.7 228.7 228.7 025 49.4 2.40 31.0 00000000 00011100 (228.7 228.7 228.7 025 50.0 2.40 31.0 00000000 00011100 (228.7 228.7 228.7 025 50.0 2.40 31.0 00000000 00011100 (228.7 228.7 228.7 025 49.5 2.40 31.0 00000000 00011100 (228.7 228.7 228.7 025 50.0 2.40 31.0 00000000 00011100 (228.7 228.7 228.7 025 50.0 2.40 31.0 00000000 10010100 (017.4 017.4 230.0 026 00.0 2.40 31.0 10000000 10010100 (000.0 000.0 233.7 026 00.0 2.40 31.0 10000000 10010100 (000.0 000.0 234.9 026 00.0 2.40 31.0 10000000 10010100 (000.0 000.0 234.9 026 00.0 2.40 31.0 10000000 10010100 (000.0 000.0 234.9 025 00.0 2.40 31.0 10000000 10010100 (000.0 000.0 234.9 025 00.0 2.40 31.0 10000000 10010100 (000.0 000.0 233.7 026 00.0 2.40 31.0 10000000 10010100 (000.0 000.0 233.7 026 00.0 2.40 31.0 10000000 10010100 (000.0 000.0 233.7 025 00.0 2.40 31.0 10000000 10010100 (000.0 000.0 233.7 025 00.0 2.40 31.0 10000000 10010100 (000.0 000.0 233.7 026 00.0 2.30 31.0 10000000 10010100 (000.0 000.0 233.7 025 00.0 2.30 31.0 10000000 10010100 (000.0 000.0 233.7 026 00.0 2.30 31.0 10000000 10010100 (000.0 000.0 233.7 026 00.0 2.30 31.0 10000000 10010100 (000.0 000.0 233.7 026 00.0 2.30 31.0 10000000 10010100 (000.0 000.0 233.7 026 00.0 2.30 31.0 10000000 10010100 (000.0 000.0 233.7 026 00.0 2.30 31.0 10000000 10010100 (000.0 000.0 233.7 026 00.0 2.30 31.0 10000000 10010100 (000.0 000.0 233.7 026 00.0 2.30 31.0 10000000 10010100 (000.0 000.0 233.7 026 00.0 2.30 31.0 10000000 10010100 (000.0 000.0 233.7 026 00.0 2.30 31.0 10000000 10010100 (000.0 000.0 233.7 025 45.0 2.30 31.0 10000000 10010100 (225.0 225.0 233.7 026 50.0 2.30 31.0 10000000 10010100 (233.7 233.7 233.7 026 50.0 2.30 31.0 10000000 10010100 (233.7 233.7 233.7 025 50.0 2.30 31.0 10000000 10010100 (228.7 228.7 233.7 026 50.0 2.30 31.0 00000000 10010100 (228.7 228.7 233.7 026 50.0 2.30 31.0 00000000 10010100 (230.0 230.0 233.7 026 49.4 2.30 31.0 00000000 10010100 (230.0 230.0 233.7 025 50.0 2.20 31.0 00000000 10010100 (230.0 230.0 233.7 026 50.0 2.20 31.0 00000000 10010100 (230.0 230.0 233.7 025 50.0 2.20 31.0 00000000 10010100 (230.0 230.0 233.7 026 49.4 2.20 31.0 00000000 00011100 (228.7 228.7 228.7 025 50.0 2.20 31.0 00000000 00011100 (228.7 228.7 228.7 025 50.0 2.20 31.0 00000000 00011100 (228.7 228.7 228.7 026 50.2 2.20 31.0 00000000 00011100
On 11/4/05, Niki Denev <niki@totalterror.net> wrote:> They use some kind of ASCII protocol, > with the "F" and "Q1" queries, that many other models use. > (i wonder what's the name of this protocol and where it originated?) > Also it appers that they are rebranded Powercoms, > because the 'hm' command returns "POWERCOM smk'. > But unfortunately i was not able to make the powercom driver > use them.The "powermust" driver should support it (the driver is now named "megatec" on the development branch of NUT).> The PROBLEM is that I can't really understand how to convert the battery > value to something meaningfull, i.e. charge percent... it's 2.40 then the > battery is full (it's 2.50 on the other OPTI ups i have, the first is model > PS1000B-RM, and the > second is PS1500B) > Both of them have 3 batteries each, and battery voltage of 36 volts is > returned from the 'F' query : > #230.0 005 036.0 50.0 > > Any ideas or pointers are greatly appreciated! > > P.S.: These units have 8 outlets each, split into 3 groups that > can be separately controlled(on/off), i wonder how exactly > to implement this, as as it seems none of the drivers use this functionality. > > Thanks for reading my lenghty and non-understandable email :)Hmmm. Ok, I guess the "megatec" driver will output bogus values for "charge" as it calculates only for 12V and 24V batteries (as returned by "F"). You can start by measuring both the value for 100% charge and the value when the UPS triggers the low-battery status. As for controlling the outlets, "megatec" doesn't support it either. However, the point of this driver is to consolidate all the diferent drivers using variations of this very same protocol, so you're welcome to add support for that functionality (and for calculating the charge) to "megatec". If you go for this, send me a note. -- Carlos Rodrigues