MESSAGING
Commands that allow the sending of alerts or messages:
- SEND EMAIL
- SEND CHAT MESSAGE
- MAKE A CHAT PHONE CALL
- SEND TO COM PORT
- HTTP REQUEST
- CLOSE BLE CONNECTION
- SEND UDP MESSAGE
- PUBLISH MQTT MESSAGE
- MODBUS RTU READ REQUEST
- MODBUS RTU WRITE REQUEST
Send an email through SMM Server, which must be active and reachable.
The body field can contain free text within which the use of TAGs is allowed, or it may contain preformatted information composed by the SMM server specifying the following keywords:
Alternatively, you can specify the complete path of a file in the device memory to be sent as an attachment. The file must contain TEXT ONLY and will be sent with a name that represents the current date and time (e.g.: 220617_091821.txt). In this way, subsequent submissions of the same file (for example a log) will be sent with a unique name that shows the date on which it was sent. When the device map is sent, it is possible to specify the identifier of an icon to show, selected among the available ones, see EMAIL ICON NOTE: to prevent abuse and increase safety, email with attachments will be sent only to email addresses stored in Avior user list. WARNING: Avior prevents the sending of duplicate messages. A message identical to the previous one is discarded and reported in the log with the same progressive identifier. To differentiate the messages it is sufficient to insert a variable field, for example the time. Since email messages transit from different servers it is not guaranteed their delivery in the same order in which they were sent, so it is good practice to insert a timestamp. You can check if and when an email message has been viewed by a recipient using an API call. |
||||||
Sends a Telegram chat message through the SMM Server, which must be active and reachable. Messages can only be sent to users stored in the device.Calls can only be made to users stored in the device.
The recipient's number must be entered in international format. For the chat message format options, see TELEGRAM. |
||||||
MAKE A CHAT PHONE CALL Originates a telephone call to a Telegram user through the SMM Server, which must be active and reachable. Calls can only be made to users stored in the device. Users must have a Telegram username.
You can specify the language to use by simply indicating the ISO code (for example en for English), if omitted the language used in the user's chat will be used. You can also indicate the type of voice by choosing here only standard voices (not Wavenet) eg: en-GB-Standard-C. Calls are queued to be made sequentially, typically within 1 minute of being requested. Greater delays are possible if a large number of calls are in progress. |
||||||
Send a text to the com port.
%0A new line %0D carriage return |
||||||
Make an HTTP request to the specified address, a data connection must be available.
The response returned by the server is always ignored. It is possible to include a custom tag X-command within the header of the response, any command found in its value will be executed. It is possible to specify custom destination port at the end of URL using the canonical format: https://mysite.com:1234 NOTE: The use of TAGs that refer to variables within the URL can cause errors or crashes of the device due to improper or not yet available content (processing in progress). NOTE: It is possible to execute HTTPS (HTTP Secure) only via WiFi network (firmware version 02.28 or above) and via 4G modem (firmware version 01.21 or above). HTTPS may not be supported on some WiFi networks. 2G modem doesn't support HTTPS request: they will be made as HTTP request. A SWAP AREA is made available for each unit to upload/download free content. Available size is limited to 200k. For each unit a SWAP AREA is available to upload / download free content (up to 200 k) made available also as RSS Feed / Alexa. Example to append the text abc... to the gxl0 SWAP AREA: AT#HTTP=POST,https://www.mobikey.eu/swap/gxl0/pwd/0000,"abc..." |
||||||
Close the connection with the BLE device. The command has no effect if no BLE device is connected.
The connection to the BLE device is automatically closed, anyway, after 20 seconds of inactivity. |
||||||
Send a message using UDP protocol to specified IP address and port. Available for 4G units only.
Send message "Hello Avior" to IP address 123.130.140.150 port 1234: AT#UDP=123.130.140.150,1234,"Hello Avior" OK |
||||||
Publish an MQTT message to broker, specifying topic, payload and QoS.
If a message is successfully published an MQT event is triggered. Publish text "gate is open" to topic "mytopic/home/garage" with QoS=1: AT#MQTT=mytopic/home/garage,"gate is open",1 Publish text with tags ($D01 is the device identifier, $I12 is the status of digital input 1 and $O42 is the status of output 4) with QoS=0: AT#MQTT=mydevice/$D01,"in1=$I12 and out4=$O42",0 Publish file located in SDcard S:LOGS/data.log to topic "system/file: AT#MQTT=system/file,S:LOGS/data.log,1 1 To delete a retained message send a blank message with retain = 1 : |
||||||
Read Modbus RTU data from COM port.
<dest> indicates the position of the first read data, following data are saved in next positions. Thus, if 4 data are read and destination is E06, the data are saved in E06, E07, E08, E09. Returns ERROR if number of data to be read exceed E32 position. AT#RTUR=8,1,5,2,B,,E04 Read request with following parameters: - slave address: 8 - function code: 1 (lettura di coils) - starting modbus register: 5 - number of coils to read: 2 - data type: BIT - options: none - destination: E04 (stored in E04, E05, E06, E07, E08) AT#RTUR=9,3,6,1,W,S,E01 Read request with following parameters: - slave address: 9 - function code: 3 (lettura di holding register) - starting modbus register: 6 - number of register to read: 1 - data type: WORD (16bit) - options: S data to be treated as signed number - destination: E01 AT#RTUR=123,4,8,3,D,,E14 Read request with following parameters: - slave address: 123 - function code: 4 (lettura di input register) - starting modbus register: 8 - number of data to read: 3 - data type: DOUBLEWORD (32bit = 6 registri modbus da16bit) - options: none, data composed taking two registers - destination: E14 (saved in E14, E15, E16) |
||||||
Write Modbus RTU data to COM port.
AT#RTUW=3,5,2,1 Write request with following parameters: - slave address: 3 - function code: 5 (write single coil) - modbus register to be written: 2 - data to be written: 1 (set coil) AT#RTUW=77,6,3456,$V11 Write request with following parameters: - slave address: 77 - function code: 6 (write holding register) - modbus register to be written: 3456 - data to be written: value of variabile "var1" ($V11) AT#RTUW=207,16,521,$E30 Write request with following parameters: - slave address: 207 - function code: 16 (write 2 holding registers, 32 bit) - modbus register to be written: 521 - data to be written: content of E30 ($E30) |