Re: [Nut-upsuser] MGE ESV+ and Power Trim

2017-05-01 Thread David Baker
Hi,

I never did manage to sort the driver out – I suspect it’s to do with my lack 
of ability than anything else – if anyone wants to try compiling it I’ll 
happily test it for you.

I did log in to the box tonight to try and sort it out once and for all – 
however the UPS seems to have self calibrated – and now is putting out the 
right voltage and not in ‘trim’ mode permanently – no idea why!

Thanks again for all the support – it’s an excellent little product!

Dave

battery.charge: 100.0
battery.charge.low: 20
battery.runtime: 04320
battery.voltage: 054.7
battery.voltage.nominal: 048.0
device.mfr: MGE UPS SYSTEMS
device.model: Pulsar ESV 22+
device.type: ups
driver.name: mge-utalk
driver.parameter.pollinterval: 20
driver.parameter.port: /dev/ttyUSB0
driver.version: 2.7.2
driver.version.internal: 0.93
input.frequency: 50.00
input.transfer.boost.high: 212.0
input.transfer.boost.low: 204.0
input.transfer.high: 248.0
input.transfer.low: 204.0
input.transfer.trim.high: 248.0
input.transfer.trim.low: 240.0
input.voltage: 244.2
output.current: 000.2
output.voltage: 243.0
ups.delay.shutdown: 120
ups.delay.start: 000
ups.firmware: 1
ups.id: Pulsar ESV22+ 1
ups.load: 001.0
ups.mfr: MGE UPS SYSTEMS
ups.model: Pulsar ESV 22+
ups.status: OL
ups.test.interval: 10080
___
Nut-upsuser mailing list
Nut-upsuser@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/nut-upsuser

Re: [Nut-upsuser] MGE ESV+ and Power Trim

2017-03-22 Thread Arnaud Quette
Hi David,

2017-03-21 20:06 GMT+01:00 David Baker <da...@baker.im>:

> Hi,
>
>
> Thanks for checking in – I managed to re-compile it but was getting the
> same error – I then had other things to do so didn’t get further in my
> investigation.
>

same error being "Can't chdir to /var/state/ups: No such file or directory"?
if so, ensure that you use Charles' provided "configure" directives, and
then make && make install.


> I’m going to delete the installation and the re-make / install it to see
> if that sorts it.
>
>
>
> I’ll let you know how I get on!
>

thanks,

cheers,
Arno
-- 
Eaton Data Center Automation Solutions - Opensource Leader -
http://42ity.org
NUT (Network UPS Tools) Project Leader - http://www.networkupstools.org
Debian Developer - http://www.debian.org
Free Software Developer - http://arnaud.quette.fr


> Dave
>
>
>
> *From:* Arnaud Quette [mailto:aquette@gmail.com]
> *Sent:* 21 March 2017 15:10
> *To:* Charles Lepple
> *Cc:* David Baker; NUT Users
> *Subject:* Re: [Nut-upsuser] MGE ESV+ and Power Trim
>
>
>
>
>
>
>
> 2017-03-12 4:02 GMT+01:00 Charles Lepple <clep...@gmail.com>:
>
> On Sat, Mar 11, 2017 at 7:15 PM, David Baker <da...@baker.im> wrote:
> > Hi Arnaud & Charles,
> >
>
>
>
> Hi Dave,
>
> any news on your side from this venerable ESV+?
>
>
>
___
Nut-upsuser mailing list
Nut-upsuser@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/nut-upsuser

Re: [Nut-upsuser] MGE ESV+ and Power Trim

2017-03-21 Thread David Baker
Hi,

Thanks for checking in – I managed to re-compile it but was getting the same 
error – I then had other things to do so didn’t get further in my investigation.

I’m going to delete the installation and the re-make / install it to see if 
that sorts it.

I’ll let you know how I get on!

Dave

From: Arnaud Quette [mailto:aquette@gmail.com]
Sent: 21 March 2017 15:10
To: Charles Lepple
Cc: David Baker; NUT Users
Subject: Re: [Nut-upsuser] MGE ESV+ and Power Trim



2017-03-12 4:02 GMT+01:00 Charles Lepple 
<clep...@gmail.com<mailto:clep...@gmail.com>>:
On Sat, Mar 11, 2017 at 7:15 PM, David Baker 
<da...@baker.im<mailto:da...@baker.im>> wrote:
> Hi Arnaud & Charles,
>

Hi Dave,
any news on your side from this venerable ESV+?

___
Nut-upsuser mailing list
Nut-upsuser@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/nut-upsuser

Re: [Nut-upsuser] MGE ESV+ and Power Trim

2017-03-21 Thread Arnaud Quette
2017-03-12 4:02 GMT+01:00 Charles Lepple :

> On Sat, Mar 11, 2017 at 7:15 PM, David Baker  wrote:
> > Hi Arnaud & Charles,
> >
>

Hi Dave,

any news on your side from this venerable ESV+?

-- Arno

> 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)
>
> To match the Raspbian build, I think the configure parameters should
> look like this:
>
> ./configure --build=arm-linux-gnueabihf --prefix=
> --includedir=/usr/include \
>--mandir=/usr/share/man --infodir="\${prefix}/share/info"
> --sysconfdir=/etc/nut \
>--localstatedir=/var --libexecdir="\${prefix}/lib/nut"
> --enable-maintainer-mode \
>--libdir=\${prefix}/lib/arm-linux-gnueabihf --with-ssl --with-nss
> --with-cgi --with-dev \
>--enable-static --with-statepath=/var/run/nut
> --with-altpidpath=/var/run/nut \
>--with-drvpath=/lib/nut --with-cgipath=/usr/lib/cgi-bin/nut \
>--with-htmlpath=/usr/share/nut/www --with-pidpath=/var/run/nut
> --datadir=/usr/share/nut \
>--with-pkgconfig-dir=/usr/lib/arm-linux-gnueabihf/pkgconfig \
>--with-user=nut --with-group=nut --with-udev-dir=/lib/udev \
>--with-systemdsystemunitdir=/lib/systemd/system
>
> Source: https://buildd.debian.org/status/fetch.php?pkg=nut=
> armhf=2.7.4-4=1475019180=0
> (so if the paths are slightly different, it's because the log is from
> stock Debian vs. Raspbian)
>
> You might not need all of those options for just one driver, but it
> should save some trial-and-error to just copy-and-paste everything,
> then rebuild.
>
> > 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!
>
> The .h file looks good, as far as I can tell.
>
> > 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!
>
> Always good to hear about equipment being saved from the dump, and put
> to good use!
>
___
Nut-upsuser mailing list
Nut-upsuser@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/nut-upsuser

Re: [Nut-upsuser] MGE ESV+ and Power Trim

2017-03-09 Thread Arnaud Quette
Hi David and Charles

Le 3 mars 2017 2:35 PM, "Charles Lepple"  a écrit :

> On Mar 3, 2017, at 8:21 AM, Charles Lepple  wrote:
> >
> > On Mar 2, 2017, at 3:38 PM, David Baker  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
___
Nut-upsuser mailing list
Nut-upsuser@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/nut-upsuser

Re: [Nut-upsuser] MGE ESV+ and Power Trim

2017-03-03 Thread Charles Lepple
On Mar 3, 2017, at 8:21 AM, Charles Lepple  wrote:
> 
> On Mar 2, 2017, at 3:38 PM, David Baker  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?
___
Nut-upsuser mailing list
Nut-upsuser@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/nut-upsuser

Re: [Nut-upsuser] MGE ESV+ and Power Trim

2017-03-03 Thread Charles Lepple
On Mar 2, 2017, at 3:38 PM, David Baker  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?
___
Nut-upsuser mailing list
Nut-upsuser@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/nut-upsuser