Home > Slackware > Slackware 12.2 and MGE Ellipse MAX 600

Slackware 12.2 and MGE Ellipse MAX 600

In case you got the geeky   MGE Ellipse MAX 600 , you have two cables, one usb and one serial
use the USB one, in my cause I used one spare USB extender 5 m long, because the slack box i use atm is a bit far from the MGE
anyway, I use the UPS to power the phone line, the ADSL WiFi modem and one dd-wrt powered Linksys WRT54GL

will skip the reason why, but I added one slack box to the circuit.
the box controls one 37′ LG LCD TV, sound, RGB input, power off power on, everything. anyway, in short.

install network_ups_tools-2.4.1-i486-1an
edit /etc/ups.conf:
[mge]
driver = usbhid-ups
port = auto
vendorid = 0463
desc = “MGE UPS Systems UPS”
edit /etc/upsd.conf
MAXAGE 15
LISTEN 127.0.0.1 3493
MAXCONN 1024
edit /etc/upsmon.conf
RUN_AS_USER root
MONITOR mge 1 upsmon s31k master
MINSUPPLIES 1
SHUTDOWNCMD “/sbin/shutdown -h +0”
POLLFREQ 5
POLLFREQALERT 5
HOSTSYNC 15
DEADTIME 15
POWERDOWNFLAG /etc/killpower
NOTIFYFLAG ONLINE       SYSLOG
NOTIFYFLAG ONBATT       SYSLOG
NOTIFYFLAG LOWBATT      SYSLOG
NOTIFYFLAG FSD  SYSLOG
NOTIFYFLAG COMMOK       SYSLOG
NOTIFYFLAG COMMBAD      SYSLOG
NOTIFYFLAG SHUTDOWN     SYSLOG
NOTIFYFLAG REPLBATT     SYSLOG
NOTIFYFLAG NOCOMM       SYSLOG
NOTIFYFLAG NOPARENT     SYSLOG
RBWARNTIME 43200
NOCOMMWARNTIME 300
FINALDELAY 5
edit /etc/upsd.users
[root]
password = pass
actions = SET
instcmds = ALL
[upsmon]
password  = pass
upsmon master
—————————————-
touch /etc/rc.d/rc.upsd
chmod 0700 /etc/rc.d/rc.upsd
edit /etc/rc.d/rc.upsd :
checkMGE=”$(/sbin/lsusb | grep “MGE UPS Systems UPS” | grep -v grep)”
if [ “${checkMGE}” != “” -a “$(ps ax | grep /usr/bin/usbhid-ups | grep -v grep)” == “” ]
then
/usr/bin/upsdrvctl start mge
if [ -f /var/state/ups/usbhid-ups-mge.pid ]
then
if [ “$(file /var/state/ups/usbhid-ups-mge | grep socket | grep -v grep)” != “” -a “$(ps ax | grep /usr/sbin/upsd | grep -v grep)” == “”  ]
then
/usr/sbin/upsd
fi
fi
elif [ “${checkMGE}” != “” -a “$(ps ax | grep /usr/bin/usbhid-ups | grep -v grep)” != “” ]
then
if [ -f /var/state/ups/usbhid-ups-mge.pid ]
then
if [ “$(file /var/state/ups/usbhid-ups-mge | grep socket | grep -v grep)” != “” -a “$(ps ax | grep /usr/sbin/upsd | grep -v grep)” == “”  ]
then
/usr/sbin/upsd
fi
fi
else
echo “No need to start anything …”
fi

/usr/bin/upslog -s mge -l /var/log/ups.log -f “%TIME @Y-@m-@d @H:@M:@S% %VAR battery.charge% %VAR input.voltage% %VAR ups.load% [%VAR ups.status%] %VAR ups.temperature% %VAR input.frequency%”
/usr/sbin/upsmon -p

then add this at the end of the rc.local:
upsdctl=”/etc/rc.d/rc.upsd”
if [ -x “${upsdctl}” ]
then
${upsdctl}
fi
————————————————————————
this is all, you will have the logs updated every 30 seconds :
==> ups.log <==
2009-04-03 03:08:57 92 NA 11 [OL CHRG] NA NA
in a view to check the current MGE status just run:
upsc mge
example:
root@burgas-mol:[Fri Apr 03 03:09:38]:[/var/adm]$ upsc mge
battery.charge: 92
battery.charge.low: 20
battery.runtime: 1914
battery.type: PbAc
driver.name: usbhid-ups
driver.parameter.pollfreq: 30
driver.parameter.pollinterval: 2
driver.parameter.port: auto
driver.parameter.vendorid: 0463
driver.version: 2.4.1
driver.version.data: MGE HID 1.12
driver.version.internal: 0.34
input.sensitivity: normal
input.transfer.boost.low: 185
input.transfer.high: 285
input.transfer.low: 165
input.transfer.trim.high: 265
input.voltage.extended: no
outlet.1.desc: PowerShare Outlet 1
outlet.1.id: 2
outlet.1.status: on
outlet.1.switchable: no
outlet.desc: Main Outlet
outlet.id: 1
outlet.switchable: no
output.frequency.nominal: 50
output.voltage: 230.0
output.voltage.nominal: 230
ups.beeper.status: enabled
ups.delay.shutdown: 20
ups.delay.start: 30
ups.firmware: 1.01
ups.load: 11
ups.mfr: MGE UPS SYSTEMS
ups.model: Ellipse MAX 600
ups.power.nominal: 600
ups.productid: ffff
ups.serial: PbAc
ups.status: OL CHRG
ups.timer.shutdown: -1
ups.timer.start: -1
ups.vendorid: 0463

Advertisements
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: