UTILITY - TELEGRAM SERVICE

Sending Data (HTTP Request)

Data is transmitted via the AT#HTTP command, using either POST (to publish a payload) or GET (to check/retrieve pending commands without a payload).

Request Format

AT#HTTP=GET,https://contriveiot.eu/t?w=$D13&v=$VH1&type=<type>&name=<name>

AT#HTTP=POST,https://contriveiot.eu/t?w=$D13&v=$VH1&type=<type>&name=<name>,<data>

w

The device identifier (webid)

Populated directly using the $D13 TAG

v

Authentication hash: HMAC-SHA256(device password, w)

Automatically processed by assigning the tag variable H (PREVIOUSLY SET varH=$D13ยง$D07)

Required on all requests, including GET

type

Payload type

Required for POST requests, unused for GET. Defines the target message stream:

  • status
    Updates the device status message with the newly received values.
  • location
    Transmits latitude and longitude to display device position (optionally includes an extended address string)
  • log
    Populates the message stream containing recent activity history.
  • log2
    Populates the message stream containing older activity history.
  • text
    Displays an informational message.
    Only the most recent text message is kept visible.
  • alert
    populates alert notification messages.
    All transmitted alert messages remain visible in the chat interface.

name

Device Name (Optional, text/alert only) 

Optional, valid only for text and alert payload types. 

A human-readable device name shown in place of the Web ID

data

Payload

Content to be published within the relevant status, location, or log messages


Get pending messages

A GET request to retrieve pending commands generates approximately 5 KB of data traffic:

AT#HTTP=GET,https://contriveiot.eu/t?w=$D13&v=$VH1

If any user-submitted messages are pending, they will be downloaded by the device. This triggers the corresponding event and logs the received text, the sender's phone number, and their assigned group (if defined).
If messages from multiple users are queued, all messages belonging to the first sender will be retrieved first. Messages from the remaining users will stay queued and will be retrieved during the device's next request.


Post a TEXT message

The following POST request to publish a text message generates approximately 5 KB of data traffic:

AT#HTTP=POST,https://contriveiot.eu/t?w=$D13&v=$VH1&type=text,"Text message"



If any user messages are pending, they will be downloaded.


Post an ALERT message

The following POST request to publish a text message generates approximately 5 KB of data traffic:

AT#HTTP=POST,https://contriveiot.eu/t?w=$D13&v=$VH1&type=alert,"Warning message"



If any user messages are pending, they will be downloaded.


Post a STATUS message update

The following POST request updates the status message containing all submitted information. The message is persistent and gets updated with the latest received data; the timestamp of the last update is displayed directly below the title:

AT#HTTP=POST,https://contriveiot.eu/2905/tgm/tun.php?w=$D13&v=$VH1&type=status,"I10=1%0AI11=door%0AI12=1%0AI13=14"

This message can generate up to 20 KB of data traffic when sending the complete file containing the device map:

AT#HTTP=POST,https://contriveiot.eu/t?w=$D13&v=$VH1&type=status,D:SYSTEM/device.map

If any user messages are pending, they will be downloaded.


Post a LOG message update

The following POST request updates the log message with the content of the history log file stored on the device. The second command performs the same action for the older history log file:

AT#HTTP=POST,https://contriveiot.eu/t?w=$D13&v=$VH1&type=log2&name=TEST.POD,D:SYSTEM/system.log

AT#HTTP=POST,https://contriveiot.eu/t?w=$D13&v=$VH1&type=log2&name=TEST.POD,D:SYSTEM/system.old"


The data traffic volume generated by this message depends on the size and content of the transmitted log files.

If any user messages are pending, they will be downloaded.


Post a LOCATION message update

The following POST request updates the venue location message with the transmitted coordinates. If included, the extended address is displayed below the coordinates. This message replaces any previous location message and generates approximately 5 KB of data traffic:

AT#HTTP=POST,https://contriveiot.eu/t?w=$D13&v=$VH1&type=location,"D01=$D01%0AG01=$G01%0AG02=$G02%0AG04=$G04"

If any user messages are pending, they will be downloaded.