APPLICATION 
TARGETING VIA HTTP HEADERS (X-command)


When performing HTTP requests using the AT#HTTP command, the device can receive custom payload text embedded directly within the server response header using X-command.

Payload Format

The payload in the X-command header must strictly follow this syntax:

X-command: <1234567890>text


  • <1234567890>
    The sender Application ID enclosed in angle brackets.
    It must strictly consist of 10 alphanumeric characters.
  • text
    The generic text payload that follows immediately after the closing angle bracket.

Parameter Mapping & Processing

Upon receiving the response, Avior extracts the payload and stores the information into dedicated parameters for use within logic rules:

  • S11 Sender Application ID (if present in memory)
  • S12 Group to which the user belongs (if defined)
  • S13 Received payload text

The target application is identified by an AppId enclosed in angle brackets (<AppId>) at the beginning of the text payload.

AppId Matching Rules


40000000A1

Full AppId

A SINGLE APP IS RECOGNIZED

4000*

Partial AppId

MORE APPS ARE RECOGNIZED

ANY CHARACTER ACCEPTED AFTER 4000



INDIRECT CONTROL

Typically, the received text is evaluated within a logic rule to trigger one or more actions.


APE APP MESSAGE FROM USER

S13(FIRE LAST APP TEXT ( FIRE 





out1=1,10





trigger EVENT is the receipt of an APP message from an active user.

The first condition to check is that the received text contains (also) the text FIRE.

The first action contains the command to activate output 1 for 10 seconds.


DIRECT CONTROL

It is also possible to execute the received text directly as a command by referencing the variable $S13. If the received text matches a valid command syntax, it will be executed by the device. Automatic execution of direct commands can be restricted by defining specific conditions within the logic rules


APE APP MESSAGE FROM USER

$I12=1 INPUT 1 STATUS = 1





$S13





trigger EVENT is the receipt of an APP message from an active user.

The first condition to check is that the digital input 1 is in the logical state 1, it means closed.

The first action contains the tag that represents the text of the last message received from APP, if this is an AT command it will be executed.