Fred's Home Page

Main
About me
Crumble
csh is bad
Debian
FredCam
Guppy
Hardware
Help out
Java-glossary
Job-control
KRoC/Linux (old)
Lambda
Life-stuff
Links
Linux
Mesh
Misc
Music
occam
occam upgrades
occam tutorial
OpenUPSd
Pictures
Programming
Projects (PhD)
Publications
Quick gdb
RAPP
RMoX
Software
UNIX crashcourse
UWG
UWGBuilder
WG / WGBuilder
XDM-Choose
XHPD

OpenUPSd -- A UPS daemon

[ about | bugs | output | download ]

Latest is 0.3.1

About OpenUPSd

OpenUPSd is a UPS daemon, pretty specific to those Belkin serial-connected UPS's that speak the "regulator pro smart protocol", as documented on this handy web-page. I've got a device that reports itself to be a "F6C625-220V" and it's working with the software quite happily :-). That UPS may now have done its last dance, so I've now got an APC smart UPS. Currently investigating adding support for this; found some handy protocol documentation for it.

This daemon is monitoring only, at the moment anyway. If you want to configure your UPS I suggest using the Belkin tools -- that worked for me. I did this once, a long time ago, and haven't needed to use their tools again since. The daemon supports two types of device:

  • serial: locally connected serial devices.
  • remote: TCP connection to a remote openupsd, that has devices and is listening.

The configuration file is pretty verbose, and the example one supplied (in the tarball) covers what's currently supported. The distribution contains a changelog.

Bugs/Deficiencies

Hupping the daemon to reload the configuration doesn't work either yet. This is likely to be slightly trickier, so will be dealt with later. Manually stopping and restarting the daemon works tho.

There's not much documentation, like, no man-page. At some point I'll get around to writing some nice concise documentation, but until then it's this web-page, the README and the example config file.

What it outputs

The "traditional" method of data grabbing is with the ``OUTPUT'' config directive. This can be generated for both local and remote devices. For my desktop, that's powered (via a long bit of wire) off teddy's UPS, this output was recently:

    teddyUPS.model: F6C625-220V
    teddyUPS.battery-condition: normal
    teddyUPS.battery-is: charging
    teddyUPS.battery-voltage: 13.0
    teddyUPS.battery-temperature: 46
    teddyUPS.battery-charge: 86
    teddyUPS.input-frequency: 49.9
    teddyUPS.input-voltage: 232.0
    teddyUPS.output-from: utility
    teddyUPS.output-frequency: 49.9
    teddyUPS.output-voltage: 231.0
    teddyUPS.output-load: 82
    teddyUPS.status-field: on-line buzzer-alarm-on

If network servers are setup, and clients connected, data is sent to clients (asynchronously). The name of a device can change with each hop, if it helps identify stuff. The UPS on teddy is known as ``UPS1'' to it. The data that flies over the network is pure plain-text (and looks pretty much like the above, but framed a bit), so you can sit back and watch with telnet ;-).

Download it!

See the README file in the distribution for specifics about compiling. As usual, GPL license. You might also want some of these, that may need fiddling slightly to suit your needs:

  • INITD-openupsd init script (rename as /etc/init.d/openupsd, chmod +x if not and update-rc.d it)
Last modified: 2006-11-01 17:55:54.000000000 +0000 by Fred Barnes [ds] [plain]
Page generated: Sun Apr 28 11:39:33 2013
Valid XHTML 1.0! Valid CSS!