<< back to Download Station
Posted on November 2008

Superkaramba design for USB power outlet strip

Gembird's Silver Shield power outlet strip: to control with Linux (KDE) from the desktop. By means of the superkaramba design Steckdosen. Details are to be found in the README (German) or README (English) file. It is essential to be read before installation! The text of the README file is also displayed in English later on at this page.
... more [download as TAR.BZ2]
... more [download as ZIP]
Bild: Screenshot von Superkaramba

What is this design for?

The design "Steckdosen" allows you to click icons at the desktop to switch the sockets of your power outlet strip (Revolt INtelli-Plug, Gembird SIS-PM, 4 sockets) on and off. The icons show the states of the sockets (on/off).

You should have installed

  1. Linux, KDE --- the Design was developed on Debian Etch, KDE 3.5. Other distributions were not tested, but should work analogical.

  2. Outlet strip:
    • A USB power outlet strip (Revolt INtelli-Plug, Gembird SIS-PM).
    • The programm: sispmctl (http://sispmctl.sourceforge.net).
    • Both plugged and installed in a full functional way. For exemple, it should be possible to work in the terminal as root with
      sispmctl -o 1

  3. The programm/package: sudo.
    In /etc/sudoers (to edit only with the command "visudo", not in an ordinary editor!!! Read the man-page of visudo!!!) should be a line like:
    username ALL=NOPASSWD: /usr/bin/sispmctl
    Take care of writing this line behind other lines as for exemple
    root ALL=(ALL) ALL
    because order of the line is relevant in processing /etc/sudoers! After this it should be possible to run
    sudo sispmctl -o 1
    als non-root user in the terminal.

  4. Programs:
    • The program/package: superkaramba.
    • Therefor you need "phython" what is normally already installed.

To get the design work

  1. Unpack "steckdosen.tar.bz2" in the folder "steckdosen", e.g. run in the terminal in your home folder:
    tar -xjf steckdosen.tar.bz2
  2. Install "superkaramba", e.g. run in the terminal (as root):
    aptitude install superkaramba
  3. Open "superkaramba", e.g. run in the terminal (as non-root user):
    superkaramba
    Thereupon there will be a window asking: a) download new, b) open local designs
  4. Choose "open local design" and open in the folder "steckdosen" the file "steckdosen.theme"
  5. Then in the window "SuperKaramba Designs" click on "Add to work space" (or something similar).
  6. Note: If you close the window "SuperKaramba Designs", then superkaramba is still running in the background, and therefore the design at the desktop as well. There is an icon in the taskbar (near the clock at right bottom) which allows you to reopen the window "SuperKaramba Designs" as you wish. There you can also close superkaramba finally, which makes of course the design disappear from your desktop.
  7. Note: To make the transparency background of the design be a looker, you need a desktop background picture which can be setup in the KDE control center. If you have chosen only a desktop background color orpattern, there will be an ugly black background behind the theme. That's a superkaramba problem.

Problem solving

To use the design

  1. The icons show the state of evey socket of your power outlet strip, that means ON or OFF.
  2. Click at one icon, to switch the socket, that means OFF or ON.
  3. The button "Steckdosen updaten" fetches the current state of the sockets and updates the icons --- this can be necessary if you use other possibilities of controlling the sockets as well (e.g. via terminal, online or other programms). There is no automatical refresh and update!
  4. With the right mouse you can drop a menu where you can fix the position of the design on your desktop. In the fixed position you need only one click to switch the sockets. In the non-fixed poistion the design is movable on your desktop with drag & drop, therefore you nee a double click to switch the sockets. (The recent position is saved in and taken from ~/.superkaramba/steckdosen.rc.)

To customize the design

  1. If you need less sockets, because your outlet strip has less sockets:
    • Remove in steckdose.theme all needless groups, and adapt the X-Y-positions of the messages as well as of the update image (=Update-Bild).
    • Delete and adapt the needless objects and paragraphs in steckdosen.py:
      - delet/adapt the global variables
      - delet/adapt string of the socket (=Steckplatz)
      - delet/adapt the paths of the images
      - delet/adapt the position of the icons in the widget
      - delet the paragraph: ########### xy-Objekt ###################
      - adapt the function updateSteckdosen(widget)
      - adapt the function initWidget(widget)
      - adapt the funktion meterClicked(widget, meter, button)
      - adapt the funktion commandOutput(widget, pid, output)

  2. If you need to change the assignment:
    In steckdosen.py:
    - adapt the string of the socket (=Steckplatz)

  3. If you need to change the icons:
    In steckdosen.py:
    - adapt the paths of the icons
    Parameter of the icons: 100x100 pixel, resolution: 72x72 pixel/inch.
    If you wish to change these parameters, than you should do so with size and resolution of "trans.png" in steckdosen.theme.
    The images "trans.png" are transparent dummies, which serve as so called "meter" (=graphical objects) to handle clicks internally. In steckdosen.py there are the real icon displayed on top depending on the state of the socket (ON/OFF), and there they are removed and repainted. While "trans.png" is needed as a reference and is never removed.

  4. If you need to write other text above the icons:
    In steckdosen.theme:
    - e.g. change "text x=25 y=100 value="Verstärker"" to whatever you want.

Useful internet addresses for superkaramba und python

www.linux-user.de/ausgabe/2004/03/065-superkaramba/index.html
netdragon.sourceforge.net/ssuperkaramba.html

Author

The script steckdosen.py and steckdosen.theme was written by Annette Huck (annette at hopfenwiesen dot de). The pictures glaskugel-on.png, glaskugel-off.png, salz-on.png, salz-off.png, klavier-on.png, klavier-off.png, update.png, update-jetzt.png were drawed by Annette Huck (annette at hopfenwiesen dot de) with Gimp 2.2. This README was translated by Annette Huck.

License

Copyright 2007 Annette Huck.

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.