Operation
WebRelay-10 Users Manual
the following commands:
Command
Description
state.xml?relay1State=2
Pulse Relay 1 for the preset time (1.5 seconds).
state.xml?relay1State=2&pulseTime1=5
Pulse Relay 1 for 5 seconds.
state.xml?relay1State=2&pulseTime1=5
Pulse Relay 1 for 5 seconds.
state.xml?relay1State=2&pulseTime1=5
Pulse Relay 1 for 5 seconds.
state.xml?relay1State=2
Pulse Relay 1 for the preset time (1.5 seconds).
Message Acknowledgment
By default, when commands are sent to WebRelay-10, the state.xml page is returned. The xml reply can
be disabled by adding the
noReply
field as follows:
Command
Description
state.xml?relay1State=1&noReply=1
Turn Relay 1
ON
without returning state
state.xml?relay1State=0&noReply=1
Turn Relay 1
OFF
without returning state
Password
If the Control Password is enabled on WebRelay-10 and the state.xml page is requested through a
browser, the user will be prompted for a password. If the XML request is sent from an XML application,
the html request will need to contain the password, encoded as Base64. The following is an html request
header without the password:
GET /state.xml?relay1State=1&noReply=1 HTTP/1.1
(Terminated w/ two
\r\n
.)
The following example adds the password:
GET /state.xml?relay1State=1&noReply=1 HTTP/1.1
(Terminated with
\r\n
.)
Authorization: Basic bm9uZTp3ZWJyZWxheQ==
(Terminated with two
\r\n
.)
bm9uZTp3ZWJyZWxheQ==
is the Base64 encoded version of the user “name:password,”
none:webrelay.
A utility is provided at http://www.controlbyweb.com/encoder to encode the password. Simply type the
string username:password into the website and press 'Encode'.
page 58
Xytronix Research & Design, Inc.