Skip to content

CurrentcostTrayMonitor

Floppy edited this page Sep 13, 2010 · 5 revisions

The currentcost-ruby gem includes the ‘currentcost_tray_monitor.rb’ application. This is a program which will sit in your system tray and display a coloured icon based on the power usage read from your CurrentCost meter. It is currently only working on Linux systems due to restrictions in the RB232 gem.

To install the program, see the currentcost-ruby installation instructions. To use the program, run:

> currentcost_tray_monitor.rb -p /dev/ttyS0

Replace /dev/ttyS0 with the name of the serial port connected to your CurrentCost.

The program requires the Gtk2 libraries for Ruby.

The program will display an icon with varying colours depending on your power usage:

  • grey: waiting for data
  • green: under 350W
  • yellow: under 1KW
  • red: over 1KW

If the EEML gem is installed, the app can also serve your power usage data over an HTTP connection to a system like Pachube. To enable this feature, pass the -h option on the command line with the port number you want to serve requests on. For instance:

> currentcost_tray_monitor.rb -p /dev/ttyS0 -h 50000

Your power consumption in EEML format will now be available at http://localhost:50000/index.eeml.

Clone this wiki locally