[Nut-upsdev] new variable

Kiss Gabor (Bitman) kissg at ssg.ki.iif.hu
Thu Oct 1 04:51:15 UTC 2009


> > Eeeer... I don't agree.
> > Tipically charge current and discharge current differ by
> > an order of magnitude. After 25 minutes of discharge
> > batteries are charged for 24 hours or so.
> 
> The magnitude is irrelevant. Allow for changing of the variable and you'd be
> able to charge/discharge the 'battery' by adjusting only that variable. At the
> same time, you could use the sign of the value to indicate the line status
> (negative for discharging, positive and zero for charging).

Sure. Let's see an example.

Battery is fully charged. Suddenly Utility power breaks.
In the modell the battery.current parameter is set to -42 amper.
After half an hour battery is empty. battery.current=0.
Then power returns. +1.3 A is assigned to the variable. 
Battery is slowly recharged (in 16 hours).

The question is: how could I tune the above values (42 and 1.3)
instead of wiring hard into the program code?
I though I need some config file that contains this:
battery.current: 42.0
battery.current.recharge: 1.3
etc.

Actually battery.current.recharge would not be advertised by the driver.
So it is my own business what name I use. I just want to be "NUT conform" :)

What about this?
config.battery.current.discharge: 42.0
config.battery.current.recharge: 1.3

Gabor



More information about the Nut-upsdev mailing list