TCG140_R1.1 – May 2018
Page 34
If the HTTP 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 as 20171020103318_status.xml.
9.1.1.
XML file structure
Please see the Appendix A.
9.1.2.
JSON file structure
Please see the Appendix B.
9.2.
HTTP commands
TCG140 supports following commands, sent with HTTP Post:
Command
Description
set r1=on
Turn Relay 1 ON
set r2=on
Turn Relay 2 ON
set r3=on
Turn Relay 3 ON
set r4=on
Turn Relay 4 ON
set r1=on&r2=on&r3=on&r4=on
Turn four relays ON
set r1=off
Turn Relay 1 OFF
set r2=off
Turn Relay 2 OFF
set r3=off
Turn Relay 3 OFF
set r4=off
Turn Relay 4 OFF
set r1=off&r2=off&r3=off&r4=off
Turn four relays OFF
set r1=tg
Toggle Relay 1 state
set r2=tg
Toggle Relay 2 state
set r3=tg
Toggle Relay 3 state
set r4=tg
Toggle Relay 4 state
set r1=pl
Pulse Relay 1
set r2=pl
Pulse Relay 2
set r3=pl
Pulse Relay 3
set r4=pl
Pulse Relay 4
set pper=x
HTTP Post period in seconds
(x is between 60 and 14400)
set FIN
Terminate session
10.
Data Logger
The logger utilizes circular buffer in FLASH memory. When it is full, the new data overwrites the
oldest one. In this manner FLASH memory stores full log all the time. There isn’t a command to clear
the log. A copy of the full log is always available for download.
The number of records depends on how long descriptions and what kind of characters are used. In
the worst case (15 bytes description with characters from the highest part of UTF-8) a number of
records are about 37000. This number is enough for 25 days with records on every 1 minute.
In most of the cases, the data logger can keep 53000 records, which is enough for 36 days with
records on every 1 minute.
The new records can be periodically uploaded as a file to a dedicated HTTP server in time intervals –
1, 2, 3, 4, 6, 8, 12 and 24 hours. The file is in CSV format. A semicolon is used as a delimiter.
The first row of the log file is always header. All rows, including the header, start with record ID and
time stamp.
Summary of Contents for TCG140
Page 1: ......
Page 47: ...TCG140_R1 1 May 2018 Page 47 Appendix C Fig 1 Fig 2 ...