Auxiliary Operations WebRelay Users Manual
XML Tags* Monitor Values
<totalreboots> This field indicates the number of times WebRelay has automatically rebooted the
device that it is controlling.
Note: This counter only increments when reboots are initiated by the automatic
reboot controller.
This value can be cleared by sending a clear command or is automatically cleared
whenever WebRelay loses power.
5.1.2 XML Control
Commands can be sent to the WebRelay to control the relay. Commands are sent using a variable
called relayState. A few examples of using relayState are given here.
Note: The IP address of the device would be included on all the following commands.
Example: http://192.168.1.2/state.xml?relayState=1
Turn the relay ‘off’: http://192.168.1.2/state.xml?relayState=0
Turn the relay ‘on’: http://192.168.1.2/state.xml?relayState=1
Command Description
state.xml?relayState=0 Turn Relay 1 OFF
state.xml?relayState=1 Turn Relay 1 ON
state.xml?relayState=2 Pulse Relay (Standard mode)
state.xml?relayState=3 Reboot (Automatic Reboot mode)
state.xml?relayState=4 Disable automatic reboot (Automatic Reboot
mode)
state.xml?relayState=5 Toggle the state of the relay (Standard mode)
In addition to the relayState command, there is a command to clear the totalreboots counter. To clear
the counter, send the following command (note that 0 is the only valid number for this command).
Command Description
state.xml?totalReboots=0 Clears the reboot counter
When WebRelay is in Standard mode and the pulse command is sent, the relay will pulse for the time
specified in the setup page. It is possible however to specify a pulse time that is different than the pulse
time configured in the setup page. This is done by sending an additional variable called pulseTime and
the desired pulse time.
Command Description
state.xml?relayState=2 Pulse the relay for the preset time
state.xml?relayState=2&pulseTime=5 Pulse the relay for 5 seconds
state.xml?relayState=2&pulseTime=10 Pulse the relay for 10 seconds
Page 60 Xytronix Research & Design, Inc.