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

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

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

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 exempleroot ALL=(ALL) ALL
because order of the line is relevant in processing /etc/sudoers!
After this it should be possible to runsudo sispmctl -o 1
als non-root user in the terminal.

Programs:

The program/package: superkaramba.

Therefor you need "phython" what is normally already installed.

To get the design work

Unpack "steckdosen.tar.bz2" in the folder "steckdosen", e.g. run in the terminal in your home folder:
tar -xjf steckdosen.tar.bz2

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

Choose "open local design" and open in the folder "steckdosen" the file "steckdosen.theme"

Then in the window "SuperKaramba Designs" click on "Add to work space" (or something similar).

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.

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

Problem: "Script doas not run"
Solution: Possibly you use UTF8 font encoding and these files are written in Latin-9. Try to replace or get rid of all ä/ö/ü special characters.

Problem: "Icons are loaded not every time or only partially."
Solution: Try higher values in line 31 in file steckdosen.py for:
sleepTime=3
For exemple:
sleepTime=4 or sleepTime=5

To use the design

The icons show the state of evey socket of your power outlet strip, that means ON or OFF.

Click at one icon, to switch the socket, that means OFF or ON.

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!

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

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)

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

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.

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

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/.