<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">[forwarded without attachments, for real this time]<br class=""><div><br class=""><blockquote type="cite" class=""><div class="">Begin forwarded message:</div><br class="Apple-interchange-newline"><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px;" class=""><span class="" style="font-family: -webkit-system-font, "Helvetica Neue", Helvetica, sans-serif; color: rgb(127, 127, 127);"><b class="">From: </b></span><span class="" style="font-family: -webkit-system-font, "Helvetica Neue", Helvetica, sans-serif;">Gabriele TAORMINA <<a href="mailto:gabriele.taormina@legrand.com" class="">gabriele.taormina@legrand.com</a>></span></div><div class=""><div style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 14px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; margin: 0px;" class=""><span style="font-family: -webkit-system-font, "Helvetica Neue", Helvetica, sans-serif; color: rgb(127, 127, 127);" class=""><b class="">Subject:<span class="Apple-converted-space"> </span></b></span><span style="font-family: -webkit-system-font, "Helvetica Neue", Helvetica, sans-serif;" class=""><b class="">Re: [Nut-upsdev] Adding drivers to NUT?</b><br class=""></span></div><div style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 14px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; margin: 0px;" class=""><span style="font-family: -webkit-system-font, "Helvetica Neue", Helvetica, sans-serif; color: rgb(127, 127, 127);" class=""><b class="">Date:<span class="Apple-converted-space"> </span></b></span><span style="font-family: -webkit-system-font, "Helvetica Neue", Helvetica, sans-serif;" class="">August 27, 2018 at 6:03:55 AM EDT<br class=""></span></div><div style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 14px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; margin: 0px;" class=""><span style="font-family: -webkit-system-font, "Helvetica Neue", Helvetica, sans-serif; color: rgb(127, 127, 127);" class=""><b class="">To:<span class="Apple-converted-space"> </span></b></span><span style="font-family: -webkit-system-font, "Helvetica Neue", Helvetica, sans-serif;" class="">Daniele Pezzini <<a href="mailto:hyouko@gmail.com" class="">hyouko@gmail.com</a>><br class=""></span></div><div style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 14px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; margin: 0px;" class=""><span style="font-family: -webkit-system-font, "Helvetica Neue", Helvetica, sans-serif; color: rgb(127, 127, 127);" class=""><b class="">Cc:<span class="Apple-converted-space"> </span></b></span><span style="font-family: -webkit-system-font, "Helvetica Neue", Helvetica, sans-serif;" class="">"<a href="mailto:nut-upsdev@alioth-lists.debian.net" class="">nut-upsdev@alioth-lists.debian.net</a>" <<a href="mailto:nut-upsdev@alioth-lists.debian.net" class="">nut-upsdev@alioth-lists.debian.net</a>>, Stefano PONGILUPPI <<a href="mailto:stefano.pongiluppi@legrand.com" class="">stefano.pongiluppi@legrand.com</a>>, Thierry DESTRUEL <<a href="mailto:thierry.destruel@legrand.fr" class="">thierry.destruel@legrand.fr</a>><br class=""></span></div><br style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 14px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class=""><br style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 14px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class=""><div id="divtagdefaultwrapper" dir="ltr" style="caret-color: rgb(0, 0, 0); font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; font-size: 12pt; font-family: Calibri, Helvetica, sans-serif, EmojiFont, "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols;" class=""><div style="margin-top: 0px; margin-bottom: 0px;" class="">Dear Daniele,</div><div style="margin-top: 0px; margin-bottom: 0px;" class=""><span style="font-size: 12pt;" class="">sorry for the delay, I forgot to put the automatic response (I was on holiday), here's a description of what we made and the drivers we used to start from:</span><br class=""></div><div style="margin-top: 0px; margin-bottom: 0px;" class=""><br class=""></div><div style="margin-top: 0px; margin-bottom: 0px;" class="">- usbhid-ups --> we added legrand-hid subdriver to extend the support to our HID Devices (Keor SP and Keor PDU, following your dev guide)</div><div style="margin-top: 0px; margin-bottom: 0px;" class="">Added Source files: legrand-hid.c | legrand-hid.h</div><div style="margin-top: 0px; margin-bottom: 0px;" class=""><br class=""></div><div style="margin-top: 0px; margin-bottom: 0px;" class="">- metasys --> this driver should be replaced (if possible) with the new one we made called "Legrand_megawhad". This driver was for MetaSystem UPSs, but this company has been acquired by Legrand, so we prefer to replace the old driver with the new one, even because we solved some issue and added new models (Compatibility: Megaline and Whad / Whad HE Series)</div><p style="margin-top: 0px; margin-bottom: 0px;" class=""></p><div style="margin-top: 0px; margin-bottom: 0px; font-family: Calibri, Helvetica, sans-serif, EmojiFont, "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols; font-size: 16px;" class="">Added Source files: legrand_megawhad.c</div><div class=""><br class=""></div><p style="margin-top: 0px; margin-bottom: 0px;" class=""></p><div style="margin-top: 0px; margin-bottom: 0px;" class=""><span style="font-size: 12pt;" class="">- nutdrv_qx --> we added our VID:PID to Krauler subdriver (together with the patch you sent me last time)</span></div><p style="margin-top: 0px; margin-bottom: 0px;" class=""><span style="font-size: 12pt;" class=""></span></p><div style="margin-top: 0px; margin-bottom: 0px; font-family: Calibri, Helvetica, sans-serif, EmojiFont, "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols; font-size: 16px;" class="">Added Source files: none</div><div style="margin-top: 0px; margin-bottom: 0px; font-family: Calibri, Helvetica, sans-serif, EmojiFont, "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols; font-size: 16px;" class=""><br class=""></div><div style="margin-top: 0px; margin-bottom: 0px; font-family: Calibri, Helvetica, sans-serif, EmojiFont, "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols; font-size: 16px;" class="">if you need other files I'm here!</div><div style="margin-top: 0px; margin-bottom: 0px; font-family: Calibri, Helvetica, sans-serif, EmojiFont, "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols; font-size: 16px;" class="">I also attached  the Megaline / Whad UPSs communication protocol as requested.</div><p style="margin-top: 0px; margin-bottom: 0px;" class=""></p><div style="margin-top: 0px; margin-bottom: 0px;" class=""><span style="font-size: 12pt;" class="">  </span><br class=""></div><div style="margin-top: 0px; margin-bottom: 0px;" class=""><br class=""></div><div id="Signature" class=""><div id="divtagdefaultwrapper" dir="ltr" class=""><div style="margin-top: 0px; margin-bottom: 0px; font-family: Calibri, Helvetica, sans-serif; font-size: 12pt;" class="">Best Regards,</div><div style="margin-top: 0px; margin-bottom: 0px;" class=""><span style="font-size: 11pt;" class=""><u class="">Gabriele Taormina</u></span><span style="font-size: 11pt;" class=""> </span><span style="font-size: 11pt;" class=""> </span><span style="font-size: 11pt;" class=""></span></div><div style="margin-top: 0px; margin-bottom: 0px;" class=""><span style="font-size: 11pt;" class=""></span><span style="font-size: 11pt;" class="">UPS </span><span style="font-size: 11pt;" class="">Strategic Business Unit</span></div><div style="margin-top: 0px; margin-bottom: 0px;" class=""><span style="font-size: 11pt;" class=""></span><span style="font-size: 11pt;" class="">Field Application Engineer</span></div><div style="margin-top: 0px; margin-bottom: 0px;" class=""><span style="font-size: 11pt;" class=""></span><span style="font-size: 11pt;" class="">Phone:     +39 0522/207046</span></div><div style="margin-top: 0px; margin-bottom: 0px;" class=""><span style="font-size: 11pt;" class=""></span><span style="font-size: 11pt;" class="">Fax:           +39 0522/207005</span></div><div style="margin-top: 0px; margin-bottom: 0px;" class=""><span style="font-size: 11pt;" class=""></span><span style="font-size: 11pt;" class="">Address:  Via Rodano 1 - Reggio Emilia - 42124 - Italy</span></div><div style="margin-top: 0px; margin-bottom: 0px;" class=""><span style="font-size: 11pt;" class=""></span><span style="font-size: 11pt;" class="">Email:       </span><span style="font-size: 11pt;" class=""><a href="mailto:gabriele.taormina@legrand.com" class="OWAAutoLink" id="LPNoLP" style="font-size: 12pt;">gabriele.taormina@legrand.com</a></span></div><div style="margin-top: 0px; margin-bottom: 0px;" class=""><span style="font-size: 11pt;" class=""><a href="mailto:gabriele.taormina@legrand.com" class="OWAAutoLink" id="LPNoLP" style="font-size: 12pt;"></a></span><span style="font-size: 11pt;" class="">Website:  </span><span style="font-size: 11pt;" class=""><a href="http://www.ups.legrand.com/" target="_blank" rel="noopener noreferrer" class="x_OWAAutoLink" id="LPNoLP" style="font-size: 12pt;">www.ups.legrand.com</a></span></div><div style="margin-top: 0px; margin-bottom: 0px;" class=""><span style="font-size: 11pt;" class=""></span><span style="font-size: 11pt;" class="">Website:  </span><a href="http://www.legrand.com/" target="_blank" rel="noopener noreferrer" class="x_OWAAutoLink" id="LPNoLP" style="font-size: 12pt;"><span style="font-size: 11pt;" class="">www.legrand.com</span></a></div><span style="font-size: 11pt;" class=""></span><div style="font-family: Calibri, Arial, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;" class=""><span style="font-size: 11pt;" class=""></span><font size="2" style="font-family: Arial, Helvetica, sans-serif, serif, EmojiFont;" class=""><img class="EmojiInsert" alt="1506322600142_legrand-vector-logo.png" data-outlook-trace="F:1|T:1" apple-inline="yes" id="5E463364-86F7-4119-92A0-DF1F303D73DF" src="cid:a4320815-897c-4d67-b871-d95dd98ce67d"><br class=""></font></div><br class=""><p style="margin-top: 0px; margin-bottom: 0px; font-family: Calibri, Helvetica, sans-serif; font-size: 12pt;" class=""></p></div></div><br class=""><br class=""><div style="" class=""><hr tabindex="-1" style="display: inline-block; width: 1007.4375px;" class=""><div id="divRplyFwdMsg" dir="ltr" class=""><font face="Calibri, sans-serif" style="font-size: 11pt;" class=""><b class="">Da:</b><span class="Apple-converted-space"> </span>Daniele Pezzini <<a href="mailto:hyouko@gmail.com" class="">hyouko@gmail.com</a>><br class=""><b class="">Inviato:</b><span class="Apple-converted-space"> </span>venerdì 3 agosto 2018 02:15<br class=""><b class="">A:</b><span class="Apple-converted-space"> </span>Gabriele TAORMINA<br class=""><b class="">Cc:</b><span class="Apple-converted-space"> </span><a href="mailto:nut-upsdev@alioth-lists.debian.net" class="">nut-upsdev@alioth-lists.debian.net</a>; Stefano PONGILUPPI; Thierry DESTRUEL<br class=""><b class="">Oggetto:</b><span class="Apple-converted-space"> </span>Re: [Nut-upsdev] Adding drivers to NUT?</font><div class=""> </div></div><div class="BodyFragment"><font size="2" class=""><span style="font-size: 11pt;" class=""><div class="PlainText">> I have some news regarding the Driver: I applied the patch you sent me (<a href="https://github.com/zykh/nut/tree/issue-441" id="LPlnk13501" class="OWAAutoLink" previewremoved="true">https://github.com/zykh/nut/tree/issue-441</a>) and it works correctly (obviously in Level 5 of Debug I see "missing CR...etc..").<br class=""><br class="">Good to hear.<br class=""><br class="">> As for now there are 2 modification I'd like to suggest you:<br class="">><br class="">><br class="">> - 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).<br class=""><br class="">Right, thanks for pointing out (if only all devices strictly adhered<br class="">to the standard and reported it the right way...).<br class="">While we tend to avoid touching the values we get from the device if<br class="">not absolutely necessary, I think this can be done... it should not be<br class="">overly difficult.<br class=""><br class="">Anyone on the list against it?<br class=""><br class="">> - About battery low and high guesstimation the formula uses these values:<br class="">><br class="">> batt.volt.low = 104 * batt.volt.nom / 120   (for a 12V VRLA --> 10.4V batt.volt.low)<br class="">> batt.volt.high = 130 * batt.volt.nom / 120   (for a 12V VRLA --> 13V batt.volt.high).<br class="">> 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)<br class="">><br class="">> Instead I would suggest:<br class="">> batt.volt.low = 100 * batt.volt.nom / 120   (for a 12V VRLA --> 10V batt.volt.low)<br class="">> batt.volt.high = 135 * batt.volt.nom / 120   (for a 12V VRLA --> 13.5V batt.volt.high)<br class="">> 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.<br class=""><br class="">Seems reasonable to me.<br class="">I'll have to look at our DDL and lists (I vaguely remember a lot of<br class="">chit-chat about this kind of things in the heydays) for side effects,<br class="">though.<br class="">(Arno, where did you get those values from?)<br class=""><br class="">Hey list, thoughts on this?<br class=""><br class="">> 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).<br class=""><br class="">Sure (compressed), just tell us from what you started so that we can<br class="">generate a diff.<br class=""><br class="">As for the diff format, we use git as VCS, so `git format-patch` is a<br class="">natural candidate:<span class="Apple-converted-space"> </span><a href="https://git-scm.com/docs/git-format-patch" id="LPlnk439077" class="OWAAutoLink" previewremoved="true">https://git-scm.com/docs/git-format-patch</a><br class="">Actually, for small patches even `git diff` will do.<br class="">Otherwise, run `diff -u` on the files you modified against the<br class="">original ones:<span class="Apple-converted-space"> </span><a href="http://man7.org/linux/man-pages/man1/diff.1.html" id="LPlnk483315" class="OWAAutoLink" previewremoved="true">http://man7.org/linux/man-pages/man1/diff.1.html</a><br class=""><br class="">Also, we have some related chapters in our developer guide:<br class=""><a href="https://networkupstools.org/docs/developer-guide.chunked/ar01s03.html" id="LPlnk559083" class="OWAAutoLink" previewremoved="true">https://networkupstools.org/docs/developer-guide.chunked/ar01s03.html</a><br class=""></div></span></font></div></div></div><br style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 14px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class=""><hr style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 14px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class=""><font face="Tahoma" size="2" style="caret-color: rgb(0, 0, 0); font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class=""><div style="margin-top: 0px; margin-bottom: 0px;" class="">Ce message, ainsi que tous les fichiers joints à ce message, peuvent contenir des informations sensibles et/ ou confidentielles ne devant pas être divulguées. Si vous n'êtes pas le destinataire de ce message (ou que vous recevez ce message par erreur), nous vous remercions de le notifier immédiatement à son expéditeur, et de détruire ce message. Toute copie, divulgation, modification, utilisation ou diffusion, non autorisée, directe ou indirecte, de tout ou partie de ce message, est strictement interdite.</div><br class=""><div style="margin-top: 0px; margin-bottom: 0px;" class="">This e-mail, and any document attached hereby, may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error) please notify the sender immediately and destroy this e-mail. Any unauthorized, direct or indirect, copying, disclosure, distribution or other use of the material or parts thereof is strictly forbidden.</div></font><span style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 14px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; float: none; display: inline !important;" class=""><br class=""></span></div></blockquote></div><br class=""></body></html>