Menu

Tree [34d7f3] master /
 History

HTTPS access


File Date Author Commit
 artwork 2022-04-05 Heinrich Schuchardt Heinrich Schuchardt [30b925] Create folder with artwork
 doc 2020-04-08 Heinrich Schuchardt Heinrich Schuchardt [d8587a] Implement scheduling for EG-PMS2
 examples 2023-07-01 Heinrich Schuchardt Heinrich Schuchardt [ae8619] examples/passwordsetup.sh: create /etc/sispmctl/
 man 2024-05-04 Heinrich Schuchardt Heinrich Schuchardt [40100e] Prepare release-4.12
 metainfo 2024-07-19 Heinrich Schuchardt Heinrich Schuchardt [501690] Add AppStream metadata
 snap 2024-10-14 Heinrich Schuchardt Heinrich Schuchardt [ac4af6] snapcraft.yaml: use core24
 src 2024-11-15 Heinrich Schuchardt Heinrich Schuchardt [34d7f3] socket_init: avoid memory leak
 .gitignore 2011-01-27 Pete Hildebrandt Pete Hildebrandt [51537f] update .gitignore files (add compilation stuff)
 AUTHORS 2016-02-18 Pete Hildebrandt Pete Hildebrandt [b5747b] prepare for release 4.0
 COPYING 2015-03-14 Heinrich Schuchardt Heinrich Schuchardt [7a58cc] COPYING, LINCENCE: use original formatting
 ChangeLog 2024-05-04 Heinrich Schuchardt Heinrich Schuchardt [40100e] Prepare release-4.12
 Maintain 2024-05-04 Heinrich Schuchardt Heinrich Schuchardt [40100e] Prepare release-4.12
 Makefile.am 2024-07-19 Heinrich Schuchardt Heinrich Schuchardt [501690] Add AppStream metadata
 NEWS 2006-02-20 Mondrian Nuessle Mondrian Nuessle [e1d5ca] Initial revision
 README.md 2023-07-01 Heinrich Schuchardt Heinrich Schuchardt [9b6ef4] README.md: correct list of devices
 autogen.sh 2020-03-10 Heinrich Schuchardt Heinrich Schuchardt [47e37b] autogen.sh: stop on error
 configure.ac 2024-05-04 Heinrich Schuchardt Heinrich Schuchardt [40100e] Prepare release-4.12
 LICENSE 2016-02-21 Pete Hildebrandt Pete Hildebrandt [bca250] add symlink from COPYING to LICENSE, because so...
 README 2015-09-05 Heinrich Schuchardt Heinrich Schuchardt [fd1fe3] src/Makefile.am: do not redefine pkgdatadir

Read Me

SiS-PM Control for Linux

(c) 2015-2023, Heinrich Schuchardt <xypron.glpk@gmx.de>
(c) 2011-2016, Pete Hildebrandt <send2ph@gmail.de>
(c) 2005-2011, Mondrian Nuessle et al.

Overview

This project provides a management software for the following USB controlled
powerstrips:

  • Gembird SIS-PMS SilverShield
  • Gembird MSIS-PM
  • EnerGenie EG-PM
  • EnerGenie EG-PMS
  • EnerGenie EG-PM2
  • EnerGenie EG-PMS2

Installation

The installation is done by issueing the following commands

./autogen.sh # only needed after checkout of the Git repository
./configure
make
sudo make install
sudo ldconfig

See the file INSTALL for generic installation instructions.

The following configure options may be of interest:

  • --prefix=directory-prefix
    Set installation directory-prefix (default is /usr/local)

  • --enable-webless
    Disable the builtin webserver. It will not be compiled into
    the binary. The command line options for the web-interface will
    not be available.

  • --with-webdir=directory
    Install the web-interface file to subdirectories of the
    given directory. A symbolic link in this directory will point
    to skin2. And the path will be the default path compiled into
    the binary.
    The default without this option is /usr/local/share/doc/sispmctl/skin.

  • --with-bindaddr=ipaddress
    Give the IP address (in dotted decimal form, i.e. 127.0.0.1) for
    the default interface that the webserver accepts connections on.
    The default without this option is to use all available interfaces.

  • --with-default-port=portnumber
    Give the default port number the webserver is listening on.
    If you do not specify this option, the default is 2638.

Dependencies

  • libusb 0.1.9+ must be installed; libusb-config must be in $PATH

Command Line Interface

The command sispmctl can be used to

  • show the status of one or all outputs
  • switch on or off, or toggle an output
  • program a schedule according to which outputs shall be switched on and off
  • launch the web interface

You can display the man page with

man sispmctl

Web-Interface

The web interface may be started manually (i.e. sispmctl -l). The default
port is 2638.

The web interface does not recognize which device type is connected, so always
four outlets will be displayed.

The web server can be started automatically with systemd. This requires the
following steps:

Create user sispmctl in group sispmctl. The command on Debian and Ubuntu is

adduser sispmctl --system --group --disabled-login --no-create-home

Provide the necessary authorizations via udev (see below).

cp examples/60-sispmctl.rules /lib/udev/rules.d/60-sispmctl.rules
udevadm control --reload-rules

Adjust and copy the systemd service definition

cp examples/sispmctl.service /lib/systemd/system

Enable and start the service with

systemctl enable sispmctl.service
systemctl start sispmctl.service

The webserver supports basic authentication. To set the password create file
/etc/sispmctl/password. The first line must contain the colon separated and
base64 encoded user and password, e.g user:password is encoded as
dXNlcjpwYXNzd29yZA==. You can use the base64 command for encoding. Enter
CRTL+D twice after entering user:password.

mkdir /etc/sispmctl
base64 > /etc/sispmctl/password
chown sispmctl:sispmctl /etc/sispmctl/password
chmod 400 /etc/sispmctl/password

Or just use the bash script examples/passwordsetup.sh.

There are multiple skins between you might select:

  • src/web1/ - a classic skin
  • src/web2/ - a dark skin suitable for mobiles
  • src/web3/ - a light skin suitable for mobiles

The skins are installed under
$(PREFIX)/share/doc/sispmctl/httpd/skin1..3

The default skin is selected by the symbolic link
$(PREFIX)/share/doc/sispmctl/skin which points to skin2 after
installation. You can easily select a different skin by passing the directory
with parameter -u to sispmctl in the service definition.

It is quite easy to change one or write a new one. Try it.

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

Solaris Support

Solaris 10 and later come with sufficient libusb support; the ugen (generic USB)
driver needs to be associated with the SIS-PM devices by issueing the following
command before plugging in the device:

for SIS-PM:
update_drv -a -i '"usb4b4,fd11"' ugen
for mSIS-PM:
update_drv -a -i '"usb4b4,fd10"' ugen
update_drv -a -i '"usb4b4,fd12"' ugen
for energenie:
update_drv -a -i '"usb4b4,fd13"' ugen
for EG-PMS2:
update_drv -a -i '"usb4b4,fd15"' ugen

License

SiS-PM Control for Linux is published under the GNU Public License Version 2 or
(at your option) any later version.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.