1sispmctl(1)                      User Manuals                      sispmctl(1)
2
3
4

NAME

6       sispmctl - Gembird Silver Shield PM ConTroL program
7
8

SYNOPSIS

10       sispmctl -s
11
12       sispmctl [ -q ] [ -n ] [ -d 0... ] [ -D ... ] -b <on|off>
13
14       sispmctl  [ -q ] [ -n ] [ -d 0... ] [ -D ... ] < -o | -f | -t | -g | -m
15       > <1..4|all>
16
17       sispmctl [ -q ] [ -n ] [ -d 0... ] [ -D ... ] < -a | -A > <1..4|all>  [
18       --Aat '...' ] [ --Aafter ... ] [ --Ado <on|off> ] ... [ --Aloop ... ]
19
20       sispmctl  [ -d 0... ] [ -D ... ] [ -i <ip> ] [ -p <#port> ] [ -u <path>
21       ] -l
22

DESCRIPTION

24       sispmctl is a tool to switch the USB controlled outlets of Gembird Sil‐
25       ver Shield PM.  It is known by many names, e.g. Revolt Power Switch.
26
27       It  is  coded  in  C  and uses the usb specific library (LibUSB).  This
28       allows you a portable and fast solution.
29
30

OPTIONS

32       -h     print usage information
33
34       -s     scan for supported GEMBIRD devices
35
36       -l     daemonize and start to listening  as  a  simple  http  webserver
37              (default port: 2638)
38
39       -p     IP  network  port  (default:  2638)  for  listener.  There is no
40              authentication implemented yet.
41
42       -u     give the  directory  path  where  pages  lay,  that  are  served
43              (default: /usr/local/httpd/sispmctl).  The Web path component is
44              completely ignored for security reasons.
45
46       -b     switch the buzzer on and off
47
48       -o     switch the given outlet(s) to "ON"
49
50       -f     switch the given outlet(s) to "OFF"
51
52       -t     toggle the state of the given outlet(s)
53
54       -g     show the status of the given outlet(s)
55
56       -m     get power supply status for the given outlet(s)
57
58       -d     Use not the first but  the  given  device  in  the  sequence  of
59              detected  devices,  starting  with "0" for the first device (see
60              scan option)
61
62       -D     Same as -d, but choose by serial number (see scan option)
63
64       -n     do not print "ON" and "OFF", but "1" and "0" instead
65
66       -q     do neither print  explanations  nor  disclaimers  except  it  is
67              requested
68
69       -a     get plannification for given outlet
70
71       -A     set plannification for given outlet
72               --Aat "date"   - sets an event time as a date '%Y-%m-%d %H:%M'
73               --Aafter N     - sets an event time as N minutes after the pre‐
74              vious one
75               --Ado <on|off> - sets the current event's action
76               --Aloop N      - loops to 1st event's action after N minutes
77
78       -v     print version & copyright
79
80

WEB INTERFACE

82       The sispmctl program provides a web interface when started with the  -l
83       option.  No additional http server is needed.  Each selected usb device
84       is blocked by sispmctl while running.
85
86       After installation, the first of two web-interfaces  is  selected.  The
87       default  location  of  the  HTML files is /usr/local/httpd/sispmctl/doc
88       which is a symbolic link to /usr/local/httpd/sispmctl/skin1.
89
90       The http capabilities of sispmctl are limited.   Technically  speaking,
91       only  the  first  line of each http request is parsed.  The terminating
92       path component, i.e. file name, is looked up in the  repository  direc‐
93       tory.   If  present  the  file  is  parsed  and  in  absence of control
94       sequences sent as is.  The files must include the http header portion.
95
96       Control sequences start and end with double dollar `$$'.  They  consist
97       of  a command portion separated by a question mark `?' from alternative
98       outputs which are separated by the first colon `:'.  The  command  por‐
99       tion is a token followed by an embraced number that references the out‐
100       let, e.g.  $$command(1)?positive:negative$$ while  command  is  one  of
101       status,  toggle,  on  or  off.   I  strongly  recommend  to  avoid  the
102       on/off/toggle commands in pages that may be reloaded.  Best is to redi‐
103       rect to other pages that only include status requests.
104
105
106

PLANNIFICATIONS

108       The  sispmctl  program provides plannifications, plannifications can be
109       used to turn given outlets of the device "ON" or "OFF" at  or  after  a
110       given  time. Plannifications can also be set to loop after a given num‐
111       ber of minutes.
112
113       To show the planned plannification for a given outlet use the option -a
114       and specify the wanted outlet(s). The option -A plus any of the options
115       --Aat , --Aafter , --Ado and --Aloop will create a  new  plannification
116       for  the given output. If only -A plus an outlet is called, the planni‐
117       fication for the outlet will be deleted.
118
119
120

EXAMPLES

122       Switch off the first outlet of the first SiS-PM and the third outlet of
123       the second SiS-PM:
124
125       sispmctl -f 1 -d 1 -f 3
126
127       Print the status of the forth outlet as zero or one:
128
129       sispmctl -nqg 4
130
131       Set a planification so outlet 2 on the first device gets turned "ON" on
132       the given date and time:
133
134       sispmctl -A 2 --Aat '2011-07-27 20:45' --Ado on
135
136       Set a planification so outlet 3 on the second device gets  turned  "ON"
137       after  2  minutes and "OFF" after another 10 minutes. The planification
138       will loop after 1 hour:
139
140       sispmctl -d 1 -A 3 --Aafter 2 --Ado on --Aafter 10 --Ado off --Aloop 60
141
142       Run sispmctl on the second device as a web-server:
143
144       sispmctl -d 1 -l
145
146       You  can  connect  to  it  from  the  same  machine  by   pointing   to
147       http://localhost:2638 with your webbrowser
148
149

AUTHOR

151       First version by Mondrian Nuessle, nuessle@uni-mannheim.de
152
153       Web integration and man page by Andreas Neuper, ANeuper-at-web-dot-de
154
155       Plannifications by Olivier Matheret
156
157
158
159Linux                              JUL 2011                        sispmctl(1)
Impressum