QCONTROL(1) | QCONTROL(1) |
qcontrol - Hardware control for QNAP Turbo Station
qcontrol -d
qcontrol command value
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-11x, QNAP TS-12x, QNAP TS-209, QNAP HS-210, QNAP TS-21x, QNAP TS-22x, QNAP TS-409, QNAP TS-409U, QNAP TS-41x, QNAP TS-42x and Synology Diskstation and Rackstation. Support for additional devices may be added in future releases.
Normally a control process will be started when the system is booted. This control process opens a socket through which the actual commands can be passed. A control proces is started using either the --daemon or --foreground options.
After that, the actual commands to control devices can be entered:
# qcontrol <command> <value>
Because the socket file is created in /var/run, all commands must be run as root.
This program follows the usual GNU command line syntax, with long options starting with two dashes (`-'). An overview of supported options is included below.
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.
Values: off | on | 1hz | 2hz
Values:
off | greenon | redon |
green1hz | red1hz | greenred1hz |
green2hz | red2hz | greenred2hz
Values: off | on | 8hz
Values: short | long
Values: stop | silence | low | medium | high | full
Values: on | off
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.
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).
2009-12-07 | Debian Project |