SiS-PM (Silver Shield PM) Control for Linux

(Silver Shield PM Control for Linux, (C) Mondrian Nuessle, et.al.)
To the sourceforge.net pages.
Overview
SIS-PM Control for Linux aka sispmctl is an
application enabling the use of the GEMBIRD (m)SiS-PM
device family under Linux.
The SiS-PM is an itelligent advanced surge protector with unique
features: four sockets are manageable from the PC via USB port (GEMBIRD LTD).
The SiS-PM is an itelligent advanced surge protector with unique
features: one socket is manageable from the PC via USB port (GEMBIRD LTD).
The software works on many different platforms. I would be glad to here
from you, on what platforms you are using this software. Also, send me
any Howto's etc on how you got it to work on your router box etc.
This software comes with ABSOLUTELY NO WARRANTY; for details see the LICENCE
file. This is free software, and you are welcome to redistribute it
under certain conditions; see the LICENCE
file
for details.
Thanks go out to Gembird
for the
kind support, the libusb
project, the USB
snoopy team, Andreas Neuper and the other contributors.
News
- version 4.1 released
- version 4.0 released
- version 3.1 released
- version 3.0 released
- version 2.7 released
- the german computer magazine c't published a review of the SIS-PM in 06/08. They also put a link to this project up http://www.heise.de/ct/08/06/links/079.shtml :-)
- version 2.2 released on sourceforge
- moved to subversion on sourceforge
- version 2.1 released on sourceforge
- Started CVS repository on sourceforge.net
- Started to move the project to Sourceforge.net. First version of the website available.
- Andreas Neuper contributed a lot of new stuff,
available in the current 2.1 version. Check it out!
- Wolfram Schlich added sispm_ctl to the Gentoo/Portage
tree. It is available there under sys-power/sispm_ctl
(marked unstable).
- Uwe Herman added sispm_ctl to the Debian/Unstable tree.
- A lot of people pointed bugs out to me, I hope I fixed them all :-)
Changelog
|
|
Initial Release |
|
|
Fixed
small error in configure script, relaxed dependency for libusb to
include version >=0.1.5, added new command line arguments -q and
-v,added Troubleshooting section,added sispm_http from Marius Konitzer |
|
|
Fixed type of variable c. Thanks to Michael
Holzt. |
|
|
new version with new functionality: multiple
devices, built-in web
interface, new options, man-page. Renamed to pmctl. Courtesy of Andreas
Neuper |
|
|
fixed several install/configure/make
problems, cleaned up code |
|
| added better control for the webinterface including
leaving it out of a compiled version, limiting it to a single network
interface, small other fixes |
- version 2.3a, 23 Mar 2006
| added experimental support for the mSiS-PM device, which
is a one socket version of the SiS-PM. If anybody has such a
device, please try the software, and contact me! |
- version 2.4a, 17 Aug 2006
|
dde fixed several bugs (thanks to Marius Konitzer);
patch to support Solaris 10 (thanks to Casper Dik); several other
fixes; added Python GUI script (see directory extra and there the README) |
- version 2.4b, 30 Oct 2006
| small fix, return value of the application |
|
| mSIS is supported, usb_close fd bug fix |
|
| added support for devices with device of 0xfd13 |
|
|
added power supply status, first serial implementation, sorting of devs, bugfixes |
|
|
added timer functionality, added gemplug script (see extras directory), added -D option to select device by serial number, several bugfixes and cleanups |
|
|
|
|
|
- add udev rules to allow non-root to access the Gembird devices
- code refactoring
|
|
|
- add support for Gembird EG-PMS2 with idVendor=04b4, idProduct=fd15
- add systemd service file
|
Supported Devices & identifying devices
Gembird
has produced a whole family of manageable surge protectors. The
following table simmarizes the devices that are known to work with this
software:
| Name | USB id | description |
| mSIS-PM | 04b4:fd10 | one socket, USB manageable |
| SIS-PM Silver Shield aka Revolt Intelliplug | 04b4:fd11 | four socket, USB manageable |
| mSIS-PM | 04b4:fd12 | one socket, USB manageable |
| SIS-PMS Silver Shield | 04b4:fd13 | 4 socket, USB manageable |
| Gembird EG-PMS2 | 04b4:fd15 | 4 socket, USB manageable |
So you may find this device sold
under
different names. You can identify it, though, without opening the case
by issuing the followin commands:
~ $ lsusb
[...]
Bus 001 Device 002: ID
04b4:fd11
Cypress Semiconductor Corp.
[...]
Of course, the Bus and Device number will be different, depending
on your setup. Different devices have different IDs, see table above.
Obtaining a device
In Germany you used to be able to buy a device from Pearl
(PE-3057-908, ~30 Euros) sold under the name
Revolt
"Intelli-Plug".
Today you can grab one for example from www.reichelt.de or www.conrad.com under the name Gembird SIS-PM.
In Denmark you can grab one for example from Elektronik Lavpris.
Anyone out there knows about other countries?
Supported OS
Generally all operating systems with support of libusb and that are POSIX compatible should work.
- Debian - package sispmctl
- Gentoo Linux - package sys-power/sispmctl
- openSUSE - community packages are availabe
- OpenWRT - package utils/sispmctl
- Ubuntu - package sispmctl
There have been reports that siscpmctl was successfully compiled and worked under:
- Solaris 10
- MacOS X 10.4 and MacOS X 10.5
If
you have gotten it to work on your box, and you use an OS/distro not
mentioned here, feel free to send me a mail with your experience!
Supported architectures
siispmctl
is mostly processor architecture agnostic. All 32-bit/64-bit related
bugs etc should be fixed by now. sispmctl has been reported to run on
- X86
- x86-64
- PowerPC G5 (iMac G5)
- several embedded MIPS, ARM etc
processors.
Several people mentioned they are using it on there broadband router
boxes at home, especially since a package is available for OpenWRT.
The following routers and NAS boxes have been reported to me to definetely work:
- ASUS WL500GP (running OpenWRT)
- Linksys NSLU2 (running Debian on ARM)
I
would really like to get an overview of boxes sispmctl is used on, so
please send me an email, if your box is not mentioned here (yet).
Reported Use-Cases
Reportedly sispmctl is used to control a host of different devices including
- Development machines for kernel level and BIOS level developments
- NAS devices
- Servers
- backup-disks
- flatbed document-scanner
- DLT tapeunit
- Printers
- even fish-tank related stuff...
Contributed Software
If you have software that uses sispm_ctl, mail me and I add it to the list below:
- SuperKaramba design to use your SiS-PM from the desktop: http://www.hopfenwiesen.de/projekte.php(only in German)
- dbus integration and GNOME applet for that. This is
currently targeted vs. Ubunutu 7.10 (Gutsy Gibbon), but hoperfully will
evolve also for other distros. See here for more info and download here.
- gemplug a wrapper script for sispmctl that is much more
comfortable. It allows saving and recalling of outlet
configuration, at controlled jobs and lots more. The gemplug script
comes with man page documentation, an install script and is available
in the extras directory of the sispmctl svn repository. Gemplug also
comes with udev rules to enable simple acess to the device as
non-priviliged user.
- a python module to access the sispm directly form your
python scripts. This module is contributed by Mikael Lindqvist and is
available in the extras directory within the sispmctl directory.
Download & Installation:
In short: Download latest sispm_ctl-XX.tar.gz
(~156kB) from the sourceforge.net pages, unpack & follow the README
file or see the release notes.
You need libusb-0.15 or newer installed on your system (if you have an
older version of libusb it MIGHT work, you'll have to
tweak configure.in though and call scripts/bootstrap. Nevermind if this
is just glibberish for you :-)).
sis_pmctl is only available as sourcecode distribution. To install on
your system run:
tar xzvf
sispm_ctl-2.1.tar.gz
cd sispm_ctl-2.1
./configure
make
make install
Note: The compiled
application is named sispmctl since 2.0 without the underscore!
This installs the applicationsis pmctl in
/usr/local/bin. If you want to install the
application to a different directory,
call ./configure --prefix=/your/preferred/dir.
The web-interface skins are installed under
$prefix/httpd/sispm_ctl/skin?; the default skin is pre-selected with
the doc symbolic link in the $prefix/httpd/sispm_ctl directory.
Documentation:
The sispmctl utility is called from the command line. The
following
documentation is from the man-page of sispmctl (included in distribution):
Somewhat outdated at the moment...
SYNOPSIS
sispmctl [ -u <path> ] [ -p <#port>
] -l
sispmctl -s
sispmctl [ -q ] [ -n ] [ -d 1... ] -b <on|off>
sispmctl [ -q ] [ -n ] [ -d 1... ] < -o | -f | -g >
<1..4|all>
DESCRIPTION
sispmctl is a tool to switch the USB controlled outlets of
Gembird
Silver Shield PM. It is known by many names, e.g. Revolt
Power
Switch.
It is coded in C and does use the usb specific library
(LibUSB). This allows you a portable and fast solution.
OPTIONS
-h Print usage information
-s Scan all universal serial
buses for devices with the ID 04B4:FD11.
-l stay listening on network
port for http protocol.
-p IP network port (default:
2638) for listener. There is no authentication implemented yet.
-u give the directory path
where pages lay,
that are served (default: /usr/local/httpd/pmctl ). The Web
path
component is completely ignored for security reasons.
-b switch the buzzer on and off
(I was not able to test it, mine does not hat it)
-o switch the named outlet to
"ON"
-f switch the named outlet to
"OFF"
-g show the status of the named
outlet
-d Choose not the first but the
named one in the sequence of detected devices (see scan option)
-n do not print "ON" and "OFF",
but "1" and "0" instead
-q do neither print
explanations nor disclaimers except it is requested
-v print version &
copyright
WEB INTERFACE
The sispmctl program provides a web interface when started with
the
-l option. No additional http server is needed. Each selected
usb
device is blocked by pmctl while running.
After installation, the first
of
three web-interfaces is
selected. The
default location of the
HTML files
is /usr/local/httpd/sispm_ctl/doc which is a symbolic link
to /usr/local/httpd/sispm_ctl/skin1.
The http capabilities of pmctl are limited. Technically
speaking,
only the first line of each http request is parsed. The
terminating path component, i.e. file name, is looked up in
the
repository directory. If present the file is parsed and in
absence of control sequences sent as is. The files must
include
the http header portion.
Control sequences start and end with double dollar
`$$'. They consist of a command portion separated by a
question
mark `?' from alternative outputs which are separated by the first
colon `:'. The command portion is a token followed by an
embraced
number that references the outlet, e.g.
$$command(1)?positive:negative$$ while command is one of status
,
toggle, off , on . I strongly recommend to avoid the
on/off/toggle commands in pages that may be reloaded. Best is
to
redirect to other pages that only include status requests.
EXAMPLES
Switch off the first outlet of the first SiS-PM and the
third outlet of the second SiS-PM:
$ sispmctl -f 1 -d 1 -f 3
Print the status of the forth outlet as zero or one:
$ sispmctl -nqg 4
Run pmctl on the second device as a web-server:
$ sispmctl -d 1 -l
You can connect to it from the same machine by pointing to
http://localhost:2638 with your webbrowser
Troubleshooting:
Question
- My kernel supports USB, I loaded all the correct
modules but when
I plug in the device,
it does not appear in the output of lsusb,
sispmctl
does not work,
the following output is added to the system log (output dmesg):
usb 1-2: new low speed USB device using address 2
usb 1-2: Product: Gembird Silver Shield PM
usb 1-2: Manufacturer: Gembird Electronics
drivers/usb/input/hid-core.c: couldn't find an input interrupt endpoint
hid: probe of 1-2:1.0 failed with error -5
(possible) Solution:
This may happen if you have not mounted usbfs.
Try "mount usbfs"
as root.
This could possibly fix your
problem.
(Thanks to Martin Koniczek for pointing this out to me).
Permissions
Per default, only root is allowed to use devices directly, therefore the SiS-PM
also only works as root.
To allow group sispmctl access create file /lib/udev/rules.d/60-sispmctl.rules
with the following content
SUBSYSTEM=="usb", ATTR{idVendor}=="04b4", ATTR{idProduct}=="fd10", GROUP="sispmctl", MODE="660"
SUBSYSTEM=="usb", ATTR{idVendor}=="04b4", ATTR{idProduct}=="fd11", GROUP="sispmctl", MODE="660"
SUBSYSTEM=="usb", ATTR{idVendor}=="04b4", ATTR{idProduct}=="fd12", GROUP="sispmctl", MODE="660"
SUBSYSTEM=="usb", ATTR{idVendor}=="04b4", ATTR{idProduct}=="fd13", GROUP="sispmctl", MODE="660"
SUBSYSTEM=="usb", ATTR{idVendor}=="04b4", ATTR{idProduct}=="fd15", GROUP="sispmctl", MODE="660"
Then reload the udev rules with
udevadm control --reload-rules
Contact
For questions, bug reports, remarks use the
forum
of sourceforge.net.

Last modified: 2018-11-18