11
RF11iQ Warranty and User Manual
Given that the device has an HTML interface which displays status and provides a user interface
for this cpan.cgi command interface, the URL is not especially useful on its own. When, however, it
is combined with the cURL utility (available for Linux, Mac and Windows) it means that any of these
functions on the unit may be operated from the command line on any application.
NOTE: These methods all rely on the address being valid permanently. It is recommended
that you configure your RF11 with a static IP address if you are going to rely on the address
remaining valid, as your DHCP server may change the address periodically.
The syntax required for using cURL in this manner is as follows:
curl --user admin:<pass> “http://<address>/cpan.
cgi?param=<p>&value=<v>”
<address>, <p> and <v> are the same as above.
<pass> is your currently configured admin password for the unit.
Make sure you wrap the url in double quotes.
cURL is a built-in command on Linux, BSD and the Mac. There are several implementations
available for Windows and a simple search will reveal them.
Once this is configured, you can use other applications or utilities to drive (for example) the
outputs of the RF11 units based on a schedule or other network management alarms and so on.
A classic example – some devices may only be required during the day. By using the task
scheduler (Windows), cron (linux/BSD) or launchd (Mac) you can power up your rack in the morning
and shut it down in the evening to conserve power.
NOTE: Obviously, you will need to ensure that the appropriate shut-down of any equipment
powered off the controlled circuit has been performed or that the equipment is tolerant of
repetitive, unexpected power outages before using this procedure.
Linux Example
From a terminal type:
export EDITOR=<editor>
<editor> could be vi, nano, whatever your favourite text editor is.
sudo crontab -e
You’ll need to enter your password, and be an admin on the machine. Add the following lines:
0 9 * * 1-5 curl --user admin:THORRF11 “http://10.1.1.58/cpan.
cgi?param=p1&value=0”
0 17 * * 1-5 curl --user admin:THORRF11 “http://10.1.1.58/cpan.
cgi?param=p1&value=1”
Save and exit.
Now, at 0 minutes past 9am, every day of the month and every month, on days of week 1-5
(Monday to Friday), the output of circuit 1 will be switched on. Similarly, at 5pm on these days it will
be powered down.