[Nut-upsuser] MGE ESV+ and Power Trim
Charles Lepple
clepple at gmail.com
Sun Mar 12 03:02:51 UTC 2017
On Sat, Mar 11, 2017 at 7:15 PM, David Baker <david at baker.im> wrote:
> 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)
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&arch=armhf&ver=2.7.4-4&stamp=1475019180&raw=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!
More information about the Nut-upsuser
mailing list