[Nut-upsdev] Adding drivers to NUT?
Daniele Pezzini
hyouko at gmail.com
Fri Aug 3 01:15:42 BST 2018
> I have some news regarding the Driver: I applied the patch you sent me (https://github.com/zykh/nut/tree/issue-441) and it works correctly (obviously in Level 5 of Debug I see "missing CR...etc..").
Good to hear.
> As for now there are 2 modification I'd like to suggest you:
>
>
> - For Online Type UPSs the Megatec protocol describes that the battery voltage is provided in the form of V per Cell, not V per block, but the driver doesn't care because I see 2.21V instead of 36V in UPSC (Battery.voltage). I think that this should be corrected so the customer can see the string voltage and not the single Cell voltage (Megatec 0.06).
Right, thanks for pointing out (if only all devices strictly adhered
to the standard and reported it the right way...).
While we tend to avoid touching the values we get from the device if
not absolutely necessary, I think this can be done... it should not be
overly difficult.
Anyone on the list against it?
> - About battery low and high guesstimation the formula uses these values:
>
> batt.volt.low = 104 * batt.volt.nom / 120 (for a 12V VRLA --> 10.4V batt.volt.low)
> batt.volt.high = 130 * batt.volt.nom / 120 (for a 12V VRLA --> 13V batt.volt.high).
> In my opinion these values are not correct (a 12V lead acid battery can be charged up to 13.8V while discharged to 9.6V)
>
> Instead I would suggest:
> batt.volt.low = 100 * batt.volt.nom / 120 (for a 12V VRLA --> 10V batt.volt.low)
> batt.volt.high = 135 * batt.volt.nom / 120 (for a 12V VRLA --> 13.5V batt.volt.high)
> with this correction we have also some "Safe Margin", I mean that more or less all the UPS I tested will charge and discharge the batteries at those values.
Seems reasonable to me.
I'll have to look at our DDL and lists (I vaguely remember a lot of
chit-chat about this kind of things in the heydays) for side effects,
though.
(Arno, where did you get those values from?)
Hey list, thoughts on this?
> I would like also to ask you if for this first time we can send you the sources instead of the Diff patch and for the future we will study how to send it in the format required (if you have any link explaining the diff, etc. please send it, it will be useful for me).
Sure (compressed), just tell us from what you started so that we can
generate a diff.
As for the diff format, we use git as VCS, so `git format-patch` is a
natural candidate: https://git-scm.com/docs/git-format-patch
Actually, for small patches even `git diff` will do.
Otherwise, run `diff -u` on the files you modified against the
original ones: http://man7.org/linux/man-pages/man1/diff.1.html
Also, we have some related chapters in our developer guide:
https://networkupstools.org/docs/developer-guide.chunked/ar01s03.html
More information about the Nut-upsdev
mailing list