The eSwitchpad is the php layer over sispmctl formerly known as php_sispm. Originally geared toward the GEMBIRD Silvershield SiS-PM; an intelligent & advanced surge protector with 4 USB manageable sockets.
- Easy device status overview.
- Per device status page.
- Fully customisable device definitions with name, image, description and Simple/Scripted shutdown
- Skin architecture in place (Quite undocumented though the basic skin should be quite helpfull)
- Simple Device Shutdown – Simply cut the power on the device
- Scripted Device Shutdown – Run a custom script to shut down the device before cutting the power. (Experimental)
- Uses the sispmctl project.
- Extensive TODO list (or doesnt that count as a feature these days 😉 )
- Published under the aGPL license.
- Version 1 is now available for download. Download eSwitchpad.1.tgz.
The .tgz contains several text info files; namely the INSTALL and TODO file; after the jump!
Anyone interested in helping out is free to check out the Todo file, although the todo file is certainly not complete, so please dont feel restricted by it 🙂 I will be glad (and honoured) to add any patches to the code! Please post any bugs in the comments or email them!
And in the end, I simply hope anyone can enjoy the project 😉
I’m afraid the Todo file is already quite big..
This file contains the todo list for the project.
* Move sispmctl specific parameters out of the code into the config file or device module
* Alter code to make it possible to configure outlet 1, 2 and 4; skipping outlet 3 by only configuring the necessary outlets
* add css style sheets
* Limit sispmctl requests to lower network access for sispmctl over ssh
* Scripted Power On
* Tweak the Scripted Power Off function
* Human readable config file; so no PHP code but a standard linux config style file.
* Timed shutdown (shutdown in x minutes; at time; ..)
* Timed reset (Power off; WaitÂ x time; Power on)
* Tastefull ajax
* More aesthetic interface
* Project logo
* In site Configuration Editor
* Flexible Widgets for easy embedding. With configurable shown # interfaces
* Device modules to enable different devices (by requesting the module to fill in the yes/no status in the array.) in devices map. Load this before the config so that config settings can overload the device module settings (like the location for the executable)
* Do something meaningfull with the shutdown/start command output
The INSTALL document was quickly thrown together and needs to be cleaned up thoroughly. None the less..
This is a short install file; a decent one should follow later.
* Extract the archive into your webserver directory.
* edit the conf.php config file to reflect your specific setup (this should speak for itself at this time)
* navigate to the directory on your webserver.
This should basically do the trick.
* sispmctl rights *
The sispmctl command probably requires root rights. The easiest and more secure way to achieve this is to use sudo for the necessary rights escalation. Sudo requires a password; though this can be circumvented by adding the following line to the /etc/sudoers file.
www-data server = NOPASSWD: /usr/bin/sispmctl
www-data should be your fileserver user; server your servername; check the sispmctl path.
This sudo explenation is terribly short and more of a pointer than a manual. Please check the sudo manpage before using this code.
* Remarks *
There are some details you should keep in mind; most of them involving the Scripted Device Shutdown
* The Scripted Device Shutdown is still experimental. The code needs some tweaking to be fully reliable and comfortable.
* You might not want to shutdown some running devices by pulling the plug. For these devices there is the possibility to use a script.
* When using the scripted device shutdown, you will probably want to include a full path to the file.
* When choosing where to put the script file; keep in mind that any scripts you put in your webserver directories will be readable by anyone visiting the server; unless you take extra precautions.
Please post any bugs in the comments or email them!