Auxiliary Operations
XML Tags*
<totalreboots>
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
state.xml?relayState=0
state.xml?relayState=1
state.xml?relayState=2
state.xml?relayState=3
state.xml?relayState=4
state.xml?relayState=5
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
state.xml?totalReboots=0
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
state.xml?relayState=2
state.xml?relayState=2&pulseTime=5
state.xml?relayState=2&pulseTime=10
Page 60
Monitor Values
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.
Description
Turn Relay 1 OFF
Turn Relay 1 ON
Pulse Relay (Standard mode)
Reboot (Automatic Reboot mode)
Disable automatic reboot (Automatic Reboot
mode)
Toggle the state of the relay (Standard mode)
Description
Clears the reboot counter
Description
Pulse the relay for the preset time
Pulse the relay for 5 seconds
Pulse the relay for 10 seconds
WebRelay Users Manual
Xytronix Research & Design, Inc.
Need help?
Do you have a question about the WebRelay X-WR-1R12-1I5-5 and is the answer not in the manual?