
TCW210-TH-R1.16- November 2022
Page 27
•
Copy the post.php file on a public web server with PHP support. To verify that the script is
working properly, you can type the URL in your web browser (for example
www.yourserverURL.com/post.php). If
all is OK, a web page with “The PHP script is
working!” will be shown.
•
Set the controller to send an HTTP/HTTPS POST to your web server. Enter the address
(yourserverURL.com/post.php) in the URL f
ield. Click on “Test
HTTP Post
” button.
•
If the HTTP/HTTPS POST is received and processed,
“OK” will be shown close to the button.
Along with this, an XML file will be created in the same directory, where post.php is located.
The file name will contain time information and looks like 20171120103318_status.xml.
8.2.2.
HTTP Get
HTTP Get can be used to monitor TCW210-TH via XML or JSON files. The format is as follows:
http://device.ip.address/status.xml
http://device.ip.address/status.json
See sections
8.2.4 XML file structure
and
8.2.5 JSON file structure
for details of files.
HTTP Get can be sent at any time to TCW210-TH if it is on the same network or it has appropriate
routing.
If there isn’t direct access to the device, HTTP Get can be sent immediately after H
TTP Post
receiving from the same device.
8.2.2.1.
Commands
All command used with HTTP Post can be used also with HTTP Get. The right format is:
http://device.ip.address/status.xml?yyy=xxx
Where:
yyy is the command;
xxx is the parameter.
Example:
http://device.ip.address/status.xml?pper=120 will set post period of 120 sec.
8.2.2.2.
HTTP GET authentication
If HTTP API authentication is enabled, basic access authentication is required to access the
status.xml file. The format of the command is shown in the table below:
XML/HTTP API authentication Format
enabled
http://device.ip.address/status.xml?a=uuuu:pppp
disabled
http://device.ip.address/status.xml
Example:
http://device.ip.address/status.xml?a=admin:admin&pper=120 will set post period of 120
sec in case the username=admin and pass=admin
8.2.3.
List of HTTP API commands
Command
Description
sn
pt
=30.0
Set Min of sensor
to 30.0
(
p
is 1,2,3,4,5,6,7 or 8 for the respective sensor
t
is 1 or 2 for the respective parameter of sensor)
sn12=30.0 will set Min for sensor 1, parameter 2
sx
pt
=40.0
Set Max of sensor
to 40.0
(
p
is 1,2,3,4,5,6,7 or 8 for the respective sensor
t
is 1 or 2 for the respective parameter of sensor)
sx42=40.0 will set Min for sensor 4, parameter 2
Summary of Contents for TCW210-TH
Page 1: ......
Page 43: ...TCW210 TH R1 16 November 2022 Page 42 Appendix A Fig 1...