Scroll to navigation

QCONTROL(1) QCONTROL(1)

NAME

qcontrol - Hardware control for QNAP Turbo Station
 

SYNOPSIS

qcontrol -d
qcontrol command value
 

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.
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.
Currently supported devices are the QNAP TS-109, QNAP TS-110, QNAP TS-119, QNAP TS-209, QNAP TS-210, QNAP TS-219, QNAP TS-219P, QNAP TS-409, QNAP TS-409U, QNAP TS-410, QNAP TS-410U, QNAP TS-419P and QNAP TS-419U but support for additional devices may be added in future releases.
 

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 -d option:
# qcontrol -d
Or, to start the control process in a pseudo daemon mode:
# qcontrol -d >/dev/null & disown
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>
Because the socket file is created in /var/run, all commands must be run as root.
 

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.
 
-d, --daemon
Daemon mode; starts the control process.
 
-?, --help
Print command help and info.
 
-V, --version
Print program version.
 

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.
 
powerled
Controls the power led (not available on TS-409 and TS-409U).
 
Values: off | on | 1hz | 2hz
 
statusled
Controls the status led.
 
Values:
off | greenon | redon |
green1hz | red1hz | greenred1hz |
green2hz | red2hz | greenred2hz
 
usbled
Controls the usb led.
 
Values: off | on | 8hz
 
buzzer
Sounds the buzzer.
 
Values: short | long
 
fanspeed
Controls the speed of the fan (if present).
 
Values: stop | silence | low | medium | high | full
 
autopower
Controls the automatic power mechanism.
 
Values: on | off
 

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'.
The solution is to remove the socket file and then try again:
# rm /var/run/qcontrol.sock
The program is not yet very robust against errors in the configuration file.
 

FILES

/etc/qcontrol.conf
LUA configuration file for qcontrol
/etc/default/qcontrol
Configuration file for qcontrol init script
/var/run/qcontrol.sock
Socket file for communication between daemon precess and client
 

SEE ALSO

/usr/share/doc/qcontrol/examples
Example LUA configuration file containing more advanced commands
 

AUTHOR

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