summaryrefslogtreecommitdiff
blob: 81538348efcdfb721d9a66a76835347d40e2149a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
.TH QCONTROL 1 "2008-08-10" "Debian Project" ""

.SH NAME
qcontrol \- Hardware control for QNAP TS-109, TS-209 and TS-409

.SH SYNOPSIS
\fBqcontrol\fB -d
.PP
\fBqcontrol\fB \fIcommand\fP \fIvalue\fP

.SH DESCRIPTION
The utility can be used to control leds or fan speed, or sound the buzzer.
As a daemon it can monitor the device for example for button presses or
temperature values and trigger actions defined in the LUA configuration
file, for example to power off the system or to modify the fan speed.
.PP
Note: the current version does not have a real daemon mode. Caution is
therefore advised when using qcontrol as a real daemon to monitor and
control a device.
.PP
Currently supported devices are the QNAP TS-109, QNAP TS-209 and QNAP
TS-409, but support for additional devices may be added in future releases.

.SH BASIC USAGE
First a control process needs to be started that opens a socket through
which the actual commands can be passed. The control proces is be started
using the \fB\-d\fP option:
    # qcontrol \-d
.PP
Or, to start the control process in a pseudo daemon mode:
    # qcontrol \-d >/dev/null & disown
.PP
After that, the actual commands to control devices can be entered (if the
first syntax to start the control process was used, this should be done
from a separate console):
    # qcontrol <command> <value>
.PP
Because the socket file is created in /var/run, all commands must be run
as root.

.SH OPTIONS
This program follows the usual GNU command line syntax, with long options
starting with two dashes (`-').
An overview of supported options is included below.

.IP "\fB\-d\fP, \fB\-\-daemon\fP"
Daemon mode; starts the control process.

.IP "\fB\-?\fP, \fB\-\-help\fP"
Print command help and info.

.IP "\fB\-V\fP, \fB\-\-version\fP"
Print program version.

.SH SUPPORTED CLIENT COMMANDS
Below an overview of the supported commands that can be sent using the
program in client mode, and the allowed values for each.

Commands (these and others) can also be programmed in response to events
using the LUA configuration file.

For the leds, values including `1hz' and `2hz' will result in the led
flashing on/off in the default or specified color, with the `hz' value
determining the speed of the flashes. In the case of `greenred', the led
will alternate between green and red instead of on and off.

.IP "\fBpowerled\fP"
Controls the power led (not available on TS-409).

Values: off | on | 1hz | 2hz

.IP "\fBstatusled\fP"
Controls the status led.

Values:
   off | greenon | redon |
   green1hz | red1hz | greenred1hz |
   green2hz | red2hz | greenred2hz

.IP "\fBusbled\fP"
Controls the usb led.

Values: off | on | 8hz

.IP "\fBbuzzer\fP"
Sounds the buzzer.

Values: short | long

.IP "\fBfanspeed\fP"
Controls the speed of the fan (if present).

Values: stop | silence | low | medium | high | full

.SH KNOWN ISSUES
After running the control process and killing it, the socket file will still
exist. This will cause the following error when the control process is started
again: `Error binding to socket: Address already in use'.
.PP
The solution is to remove the socket file and then try again:
    # rm /var/run/qcontrol.sock
.PP
The program is not yet very robust against errors in the configuration file.

.SH FILES
.IP \fB/etc/qcontrol.conf\fP
LUA configuration file for qcontrol
.IP \fB/etc/default/qcontrol\fP
Configuration file for qcontrol init script
.IP \fB/var/run/qcontrol.sock\fP
Socket file for communication between daemon precess and client

.SH SEE ALSO
.IP \fB/usr/share/doc/qcontrol/examples\fP
Example LUA configuration file containing more advanced commands

.SH AUTHOR
qcontrol was written by Byron Bradley <byron.bbradley@gmail.com>.
.PP
This manual page was written by Frans Pop <fjp@debian.org>
for the Debian project (but may be used by others).