On Mar 3, 2017, at 8:21 AM, Charles Lepple <clepple at gmail.com> wrote:> > On Mar 2, 2017, at 3:38 PM, David Baker <david at baker.im> wrote: >> >> I?ve read the documentation, and it would appear that this can be set by the U-Talk protocol (page 34 of http://networkupstools.org/protocols/mge/9261zwfa.pdf) but I can?t seem to figure out how to send the device the command, or manage to terminal into the unit (once disabling NUT services) and send the command. >> >> I think the command would be Lv 24000. >> > In theory, you could change the following line: > > https://github.com/networkupstools/nut/blob/v2.7.4/drivers/mge-utalk.h#L220 > > from "{ "output.voltage", 0, 0, "Lv", "%05.1f", VOLT, TRUE }," > > to "{ "output.voltage", ST_FLAG_RW | ST_FLAG_STRING, 5, "Lv", "%05.1f", VOLT, TRUE }," > > This would allow you to use the "upsrw" command to set the voltage (with appropriate scaling). > > Do you have a development environment set up for the Raspberry Pi?Sorry, I think I read the protocol document too quickly. Is it maybe "Iv 24000" (inverter voltage)? It doesn't look like the current driver reads or writes the inverter settings. Arnaud, do you have any additional insight on the difference between setting output voltage and inverter voltage?
Hi David and Charles Le 3 mars 2017 2:35 PM, "Charles Lepple" <clepple at gmail.com> a ?crit :> On Mar 3, 2017, at 8:21 AM, Charles Lepple <clepple at gmail.com> wrote: > > > > On Mar 2, 2017, at 3:38 PM, David Baker <david at baker.im> wrote: > >> > >> I?ve read the documentation, and it would appear that this can be set > by the U-Talk protocol (page 34 of http://networkupstools.org/pro > tocols/mge/9261zwfa.pdf) but I can?t seem to figure out how to send the > device the command, or manage to terminal into the unit (once disabling NUT > services) and send the command. > >> > >> I think the command would be Lv 24000. > >> > > In theory, you could change the following line: > > > > https://github.com/networkupstools/nut/blob/v2.7.4/drivers/ > mge-utalk.h#L220 > > > > from "{ "output.voltage", 0, 0, "Lv", "%05.1f", VOLT, TRUE }," > > > > to "{ "output.voltage", ST_FLAG_RW | ST_FLAG_STRING, 5, "Lv", "%05.1f", > VOLT, TRUE }," > > > > This would allow you to use the "upsrw" command to set the voltage (with > appropriate scaling). > > > > Do you have a development environment set up for the Raspberry Pi? > > Sorry, I think I read the protocol document too quickly. > > Is it maybe "Iv 24000" (inverter voltage)? It doesn't look like the > current driver reads or writes the inverter settings. > > Arnaud, do you have any additional insight on the difference between > setting output voltage and inverter voltage?It's a long time since I've not dive into the UTalk code and devices. The last time was more than a decade ago.Happy to see some ESV+ alive :) Then, even reading the spec, I'm not sure what was the exact difference between Lv and Iv, at least for a small UPS like ESV+. So you can add the following line after "output.voltage in mge-utalk.h: "{ "output.voltage.nominal", ST_FLAG_RW | ST_FLAG_STRING, 5, "Lv ?", "%05.1f", VOLT, TRUE }," By adding the above, you'll be able to have the nominal output voltage reading and report (Lv ?) and to use upsrw to set nominal output voltage (Lv 24000). Please tell us back if the above works fine for you, so that we can update the driver. Otherwise, simply test by replacing the "Lv ?" with "Iv ?". thanks and cheers, Arno -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.alioth.debian.org/pipermail/nut-upsuser/attachments/20170309/0569cb53/attachment.html>
Hi Arnaud & Charles, You?ll have to forgive my low level of Linux Understanding here?. I downloaded the source files, modified the appropriate driver file, re-compiled it (all of this was a lot of research and learning!) When I use the new driver I get ? Network UPS Tools - UPS driver controller 2.7.2 Network UPS Tools - MGE UPS SYSTEMS/U-Talk driver 0.93 (2.7.4.1) Can't chdir to /var/state/ups: No such file or directory Driver failed to start (exit status=1) The new .h file reads as this ? /* Output page */ { "output.voltage", 0, 0, "Lv", "%05.1f", VOLT, TRUE }, { "output.voltage.nominal", ST_FLAG_RW | ST_FLAG_STRING, 5, "Lv ?", "%05.1f", VOLT, TRUE }, { "output.current", 0, 0, "Lc", "%05.1f", AMPERE, TRUE }, If I copy the old driver back, it works fine ? so I?m guessing I?ve got something wrong with the compile or syntax! Welcome your thoughts ? the ESV22+ was a beast I came across which didn?t work ? I managed to pick up some replacement batteries and it?s now protecting a load of audio and comms equipment in a charitable community centre in Northern Romania! Thanks again Dave It's a long time since I've not dive into the UTalk code and devices. The last time was more than a decade ago.Happy to see some ESV+ alive :) Then, even reading the spec, I'm not sure what was the exact difference between Lv and Iv, at least for a small UPS like ESV+. So you can add the following line after "output.voltage in mge-utalk.h: "{ "output.voltage.nominal", ST_FLAG_RW | ST_FLAG_STRING, 5, "Lv ?", "%05.1f", VOLT, TRUE }," By adding the above, you'll be able to have the nominal output voltage reading and report (Lv ?) and to use upsrw to set nominal output voltage (Lv 24000). Please tell us back if the above works fine for you, so that we can update the driver. Otherwise, simply test by replacing the "Lv ?" with "Iv ?". thanks and cheers, Arno -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.alioth.debian.org/pipermail/nut-upsuser/attachments/20170312/84a01baf/attachment-0001.html>