News
Requirements
- Libusb (debian & co: apt-get install libusb libusb-dev)
- GEMBIRD SIS-PM Device USB-ID: 04b4:fd13
- root or access to the usb GEMBIRD device !important
- Web server with cgi-bin directory, if you want to use the web-frontend
- PC,MAC,ARM,...
Install
After downloading and extracting the sispwctrl package via "tar -xvfz ...." you need to compile SiSPwCtrl with the following commands:
- ./configure
- make
- make install
What
The application controls your GEMBIRD SIS-PM device. Currently only the quad multiple socket outlet is supported (USB-ID: 04b4:fd13). You can check the id of your USB device with the command lsusb or run SiSPwCtrl with the "-l" option.
Running lsusb results in:
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 001 Device 002: ID 04b4:fd13 Cypress Semiconductor Corp.
Bus 001 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Running SiSPwCtrl -l results in:
Device: 0
Vendor: fd13
Id: 04b4
Manufacturer: Gembird Electronics
Product: Gembird Silver Shield PM
Usb-Device: 002
Bus: 001
How
You can run the application using the command line or using the web-frontend in connection with CGI.
Command line:
Command line help:
Usage:
sisctrl [-h|-i|-l|-v]
sisctrl [-w|-t|-x] [-s|-o|-f] [all|1|2|3|4]
The application comes with ABSOLUTELY NO WARRANTY.
-h Prints this help
-s Shows the status of all or a specific outlet
-o Switches all or a specific outlet on
-f Switches all or a specific outlet off
-x, --xml Enables XML output
-d Defines the used Device
-i,-l Dists all detected SiS devices
-t, --html-header Print an additional html header at the beginning of the output
-w Enables addition output
-v Shows version
Copyright (c) 2009 Florian Becher
All Rights Reserved
This product is protected by copyright and distributed under
licenses restricting copying, distribution and decompilation.
Exit status is 0 if OK, negative if trouble
Report bugs to me.
Via filename:
SiSPwCtrl provides the possibility to set several options via the filename. As a result a symlink with an option chain can be linked to the SiSPwCtrl application and you do not have to set the options. The commands are detected by parsing the name. If an option is followed by an underscore a value can be associated with the option. The following options are supported:
- xml
- same as -x
-
- html-header
-
- same as -t or --html-header
- status
- same as -s
- on
- same as -o
- off
- same as -f
-
- info
- same as -i or -l
Examples can be seen in the next paragraph, links are created by the provided bash script for CGI usage.
Web-frontend:
Using the application and the web-frontend requries some pre-installation steps. Those steps are also explained in the README file located in the addon folder. The web-frontend uses javscript,css,jquery framework and ajax to provide a fast and easy controlling via a html browser. In addition to the standard version of the web-frontend is the panel version available, which is compact web solution for controlling the SiS device.
- Copy the executable to your famous cgi-bin directory
- Copy the bash script located in addons/scripts into the cgi-bin folder
- run the bash script to generate the links:
ls of cgi-bin:
lrwxrwxrwx 1 root root 7 2009-06-13 14:52 info-xml-html-header -> sispwctrl
lrwxrwxrwx 1 root root 7 2009-06-11 18:13 off_1-xml-html-header -> sispwctrl
lrwxrwxrwx 1 root root 7 2009-06-11 18:13 off_2-xml-html-header -> sispwctrl
lrwxrwxrwx 1 root root 7 2009-06-11 18:13 off_3-xml-html-header -> sispwctrl
lrwxrwxrwx 1 root root 7 2009-06-11 18:13 off_4-xml-html-header -> sispwctrl
lrwxrwxrwx 1 root root 7 2009-06-11 18:36 off_all-xml-html-header -> sispwctrl
lrwxrwxrwx 1 root root 7 2009-06-11 18:13 on_1-xml-html-header -> sispwctrl
lrwxrwxrwx 1 root root 7 2009-06-11 18:13 on_2-xml-html-header -> sispwctrl
lrwxrwxrwx 1 root root 7 2009-06-11 18:13 on_3-xml-html-header -> sispwctrl
lrwxrwxrwx 1 root root 7 2009-06-11 18:13 on_4-xml-html-header -> sispwctrl
lrwxrwxrwx 1 root root 7 2009-06-11 18:35 on_all-xml-html-header -> sispwctrl
lrwxrwxrwx 1 root root 7 2009-06-10 12:12 status-xml-html-header -> sispwctrl
-rwsr-xr-x 1 root root 527046 2009-06-23 00:46 sispwctrl
- Remove the bash script
- Set the suid bit for the script or allow the web user to access the usb bus
-
- Suid bit: chmod u+s sispwctrl
- Allow usb bus access: edit resmgr.conf (location differs in each distribution) and add the following line add usb:vendor=0x04b4,product=0xfd11 usb
- Copy the entire content of the www to your web server and setup the cgi-bin directy inside the js/config.js
Screenshots of the web-frontend:
Download
Source code for this project may be available as
Download or through the CVS or Subversion SVN repository used by the project, as accessible from the
project summary page.
Problems, Features and Bugs
Yes, there is one in the website. If you wonder about the screenshots are displayed at the top of the page with Internet Explorer 8, it is a bug in the thickbox plugin and until now i found no solution to solve it.
For help and discussions please use the
Sourceforge Forums. For Bugs, Feature Requests, Patches, Support Requests use the
Sourceforge Tracker. If nothing of those options helps or do you have some realy urgent request you can mail to ascat(the famous at sign)users.sourceforge.net.
Thanks
Thanks to the following persons/projects:
- GEMBIRD for the nice and easy to understand API ;)
- Mondrian Nuessle, his project sispmctl inspired me to program SiSPwCtrl.
Donate
If you want to support me, you can donate
here
Last modified: 17/10/2009