TCW242-S_R1.0 – July 2021
Page 32
9.2.3.
List of HTTP API commands
Command
Description
dataf=x
Data format XML/JSON for HHTP Post – 0 XML, 1 JSON
pushtls=x
HTTP(S) protocol, where x is 0 for HTTP and 1 for HTTPS
purl1=yyy
URL for HTTP Post to Server 1, where yyy is a full path to the
PHP file. Example:
purl=212.25.45.120:30181/xampp/test/posttest1.php
purl2=yyy
URL for HTTP Post to Server 1, where yyy is a full path to the
PHP file. Example:
purl=212.25.45.120:30181/xampp/test/posttest2.php
purl3=yyy
URL for HTTP Post to Server 1, where yyy is a full path to the
PHP file. Example:
purl=212.25.45.120:30181/xampp/test/posttest3.php
pper=x
HTTP Post period in seconds
(x is between 10 and 14400)
dk=xxx
HTTP Post key – xxx is up to 17 characters
ron=
n
Turn relay
m
ON
(
m
is 1,2,3 or 4)
(
n
is 1,2,4 or 8)
ron=1 - will turn ON relay 1
ron=2 - will turn ON relay 2
ron=4 - will turn ON relay 3
ron=8 - will turn ON relay 4
ron=1&ron=2&ron=4&ron=8
Turn four relays ON
rof=
n
Turn relay
m
OFF
(
m
is 1,2,3 or 4)
(
n
is 1,2,4 or 8 )
rof=1 - will turn OFF relay 1
rof=2 - will turn OFF relay 2
rof=4 - will turn OFF relay 3
rof=8 - will turn OFF relay 4
rof=1&rof=2&rof=4&rof=8
Turn four relays OFF
rtg=
n
Toggle relay
m
state
(
m
is 1,2,3 or 4)
(
n
is 1,2,4 or 8)
rtg=1 - will toggle relay 1 state
rtg=2 - will toggle relay 2 state
rtg=4 - will toggle relay 3 state
rtg=8 - will toggle relay 4 state
save
Save all previous changes (except relays’ one) in the
FLASH memory.
As every save reflects the FLASH cycles (endurance),
this
command should be used very carefully.
pper=120&save – will set Post period to 120 seconds
and
save it
FIN
Terminate session
(i
t works with HTTP/HTTPS Post, but not with HTTP Get.
)
Summary of Contents for TCW242-S
Page 1: ......
Page 52: ...TCW242 S_R1 0 July 2021 Page 52 Appendix A Fig 1 Fig 2...