Sis-PM image

Overview

SIS-PM Control for Linux (sispmctl) is an application for managing USB controlled powerstrips produced by GEMBIRD LTD. Newer devices are sold under the Energenie brand. The following devices are supported:

The software is licensed under The GNU General Public License (GPL) Version 2. This excludes any warranty but gives you the right to redistribute the software.

Identifying devices

The devices can be identified by their USB vendor and product IDS using the lsb command. Here is an example:

$ lsusb
Bus 001 Device 007: ID 04b4:fd13 Cypress Semiconductor Corp. Energenie EG-PMS

Devices with the following vendor and product IDs are currently supported.

NameVendor ID, Product IDNumber of Sockets
Gembird MSIS-PM04b4:fd101
Gembird SIS-PM04b4:fd114
Gembird MSIS-PM04b4:fd121
Gembird SIS-PMS, Energenie EG-PMS04b4:fd134
Energenie EG-PMS204b4:fd154

Supported Operating Systems

Generally all POSIX compatible operating systems with support of libusb should work, e.g.

There have been reports that siscpmctl was successfully compiled and worked under:

Sispmctl is mostly processor architecture agnostic. It has been reported to run on

Download and Installation

Many Linux distribution package sispmctl. E.g on Debian and Ubuntu you can install sispmctl using
sudo apt-get update
sudo apt-get install sispmctl
Sispmctl is also available as a snap. If you have the snapd daemon installed, you can install the snap with
sudo snap install sispmctl
If you want to use the most current code download the source from Sourceforge and build it yourself: Either download a release tarball sispm_ctl-XX.tar.gz or clone the git repository:
git clone https://git.code.sf.net/p/sispmctl/git sispmctl
Then build with
./autogen.sh # only needed after checkout of the Git repository
./configure
make
sudo make install
sudo ldconfig
You need libusb-0.15 or newer installed on your system.

Usage

The sispmctl utility is called from the command line. The following documentation is an excerpt from the man-page of sispmctl (included in distribution):

SYNOPSIS

OPTIONS

WEB INTERFACE

Sispmctl 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 sispmctl 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 sispmctl 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 . It is strongly recommended 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

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.