Finally I have bought an UPS. Its the MGE Pulsar Ellipse 1200. I have chosen MGE because of their support to the open source community (mge opensource). You can connect up to four standard computers to this UPS, it’s perfect for my home network.

A promotional picture of a MGE Ellipse 1200 UPS

What I want to do is to be able to shut down my computers when de charge of the UPS is below a certain level. So I have spent some time this afternoon configuring nut (network UPS tools).

From their website:

The primary goal of the Network UPS Tools (NUT) project is to provide reliable monitoring of UPS hardware and ensure safe shutdowns of the systems which are connected.

So it’s perfect for our purposes. It hasn’t be the first time that I have tried to configure nut, but It has been the one that I have finally managed to do it. It was as easy as finding mge and nut how-to.

In this first article I am going to explain how to configure nut to detect your pulsar ellipse ups. maybe someday I will explain how to set up the safe shutdown proccess.

The steps to make nut work are as follows:

  1. identify the NUT driver needed: go to supported upss and find what driver you should use for your ups. newhidups does the job for my ellipse 1200
  2. install NUT packages: apt-get install nut-usb usbutils. Once dependencies are resolved you end up installing also nut and hotplug packages.
  3. configure NUT: see below.
  4. test your configuration: issue upsc ellipse@localhost if no error message is returned, you are done.

You have to do a few tricks in order to set up the configuration files of nut. Create a copy of the configuration files from the examples dir: cp /usr/share/doc/nut/examples/* /etc/nut.

Then modify /etc/default/nut to look like this:

# start upsd
START_UPSD=yes

# start upsmon
START_UPSMON=yes

You have to configure /etc/nut/ups.conf, adding something like this:

[ellipse]
        driver = newhidups
        port = auto

Nothing to be done with /etc/nut/upsd.conf.

Add the following lines to /etc/nut/upsd.users file:

# Supervision user
[admin]
        password = mypass
        allowfrom = localhost
        actions = SET
        instcmds = ALL

# Protection user
        [monuser]
        password  = mypass
        allowfrom = localhost
        upsmon master

Reload the diferent services: invoke-rc.d hotplug restart and invoke-rc.d nut restart

Please take care to change the passwords given here because of obvious security reasons.

And as usual, don’t forget to google on it, browse through man, and read the official how-to.

Share and Enjoy: These icons link to social bookmarking sites where readers can share and discover new web pages.
  • Digg
  • del.icio.us
  • Slashdot
  • Technorati