SHARE.MQTT_APIS
SHARE.OVERVIEW
MQTT_API.S_OVW_MQTT_1 SHARE.HERE MQTT_API.S_OVW_MQTT_2
MQTT_API.S_OVW_MQTT_3
MQTT_API.S_OVW_MQTT_4
MQTT_API.S_OVW_MQTT_5
MQTT_API.S_OVW_MQTT_6
RESPONSE_RESULT.T_THING_MESSAGE_FORMAT
RESPONSE_RESULT.S_THING_MESSAGE_FORMAT
RESPONSE_RESULT.T_KEY_VALUE_JSON_FORMAT
1. {
2. "KeyIsString":"VALUE1",
3. "KeyIsNumber":12,
4. "KeyIsBoolean":true,
5. "KeyIsDouble":34.5,
6. "KeyIsLocationString":"13.7834533,100.5459483",
7. "KeyIsNumberArray":"[1,2,3]",
8. "KeyIsImage":"data:image/png;base64,iVBOR...",
9. "KeyIsVideo":"data:video/mp4;base64,AAAAH...",
10. "KeyIsAudio":"data:audio/mpeg;base64,AAAAFG...",
11. "KeyIsFile":"data:text/plain;base64,SGVsbG8..."
12. }
MQTT_API.T_MQTT_CONNECT
MQTT_API.S_MQTT_CONNECT

HOST: device-entmagellan.ais.co.th
PORT: 1883 (MQTT), 8883 (MQTTS)
MQTT_API.T_MQTT_BROKER_CONNECT_REQ
MQTT_API.T_CLIENT_ID
MQTT_API.T_USER_NAME
MQTT_API.T_PASSWORD
MQTT_API.T_TO_ENABLE_SSL
mosquitto_pub -d -h $HOST -p 8883 -u $THING_IDENTIFIER -P $THING_SECRET -t "$TOPIC" -m ' ' --cafile ..\certs\caFile.cer --cert ..\certs\certFile.cer --key ..\certs\key.pem --insecure
MQTT_API.T_HOW_TO_QUALITY_OF_SERVICE
mosquitto_pub -d -h $HOST -p 8883 -u $THING_IDENTIFIER -P $THING_SECRET -t "$TOPIC" -m ' ' -q $1
MQTT_API.T_HOW_TO_KEEP_ALIVE
mosquitto_pub -d -h $HOST -p 8883 -u …
MQTT_API.T_RESPONSE_STATUS_CODE
MQTT_API.S_MQTT_PROVIDER_RESPONSE
RESPONSE_RESULT.S_STR_FORMAT_ARGS
RESPONSE_RESULT.T_API_NAME RESPONSE_RESULT.S_API_NAME
RESPONSE_RESULT.T_PROP_VALUE RESPONSE_RESULT.S_PROP_VALUE
RESPONSE_RESULT.T_NADE_NAME RESPONSE_RESULT.S_NODE_NAME
RESPONSE_RESULT.T_MQTT_STATUS
RESPONSE_RESULT.T_RES_RESULT
SHARE.AUTH
RESPONSE_RESULT.S_SUB_AUTH_1.1device-entmagellan.ais.co.thRESPONSE_RESULT.S_SUB_AUTH_1.2 $THING_TOKEN . RESPONSE_RESULT.S_SUB_AUTH_2 $THING_TOKEN RESPONSE_RESULT.S_SUB_AUTH_3 RESPONSE_RESULT.S_THING_TOKEN RESPONSE_RESULT.S_SUB_AUTH_4
RESPONSE_RESULT.S_SUB_AUTH_5 $THING_IDENTIFIER SHARE.AND $THING_SECRET. RESPONSE_RESULT.S_SUB_AUTH_6$THING_TOKEN. RESPONSE_RESULT.S_SUB_AUTH_7
SHARE.FORMAT_JSON
PUBLISH:
#Publish to server for request authentication thing in json or text/plain format.
TOPIC: api/v2/thing/$THING_IDENTIFIER/$THING_SECRET/auth/req
SUBSCRIBE:
#Subscribes to get the response of authentication thing in json format.
TOPIC: api/v2/thing/$THING_IDENTIFIER/$THING_SECRET/auth/resp
Format Plain Text
SUBSCRIBE:
#Subscribes to get the response of authentication thing in plain text format.
TOPIC: api/v2/thing/$THING_IDENTIFIER/$THING_SECRET/auth/resp/pta
***The publish request of plain text is same the json format.
RESPONSE_RESULT.T_EXAMPLE_CLI
Content-Format: application/json
Content-Format: text/plain
RESPONSE_RESULT.T_REPORT_THING_REAL_TIME
RESPONSE_RESULT.S_REPORT_THING_REAL_TIME_1 $THING_TOKEN RESPONSE_RESULT.S_REPORT_THING_REAL_TIME_2
RESPONSE_RESULT.S_REPORT_THING_REAL_TIME_3
SHARE.FORMAT_JSON
PUBLISH:
#Publish to server for report message with multi sensor in json format only.
TOPIC: api/v2/thing/$THING_TOKEN/report/persist
PAYLOAD: {"$SENSOR_NAME":"$SENSOR_VALUE"}
***This command not support plain text format.
PUBLISH:
#Publish to server for report message with a sensor in json or text/plain format.
TOPIC: api/v2/thing/$THING_TOKEN/report/persist/pta/?sensor=$SENSOR_NAME
PAYLOAD:$SENSOR_VALUE
SUBSCRIBE:
#Subscribes to get the response of report status in json format.
TOPIC: api/v2/thing/$THING_TOKEN/report/resp
Format Plain Text
SUBSCRIBE:
#Subscribes to get the response of report status in plain text format.
TOPIC: api/v2/thing/$THING_TOKEN/report/resp/pta/+
RESPONSE_RESULT.T_EXAMPLE_CLI
Content-Format: application/json
Content-Format: text/plain
RESPONSE_RESULT.T_REPORT_THING_REAL_TIME
RESPONSE_RESULT.S_REPORT_THING_WITH_TIME_STAMP_1$UNIXTS RESPONSE_RESULT.S_REPORT_THING_WITH_TIME_STAMP_2$SENSOR RESPONSE_RESULT.S_REPORT_THING_WITH_TIME_STAMP_3 $THING_TOKEN RESPONSE_RESULT.S_REPORT_THING_WITH_TIME_STAMP_4***This command does not support plain.
RESPONSE_RESULT.S_REPORT_THING_WITH_TIME_STAMP_5 RESPONSE_RESULT.S_UNIXTS RESPONSE_RESULT.S_REPORT_THING_WITH_TIME_STAMP_6 RESPONSE_RESULT.S_SENSOR RESPONSE_RESULT.S_REPORT_THING_WITH_TIME_STAMP_7
SHARE.FORMAT_JSON
PUBLISH:
#Publish to server for report message with timestamp in json or text/plain format.
TOPIC: api/v2/thing/$THING_TOKEN/report/timestamp/persist
PAYLOAD: [{"UNIXTS":$UNIXTS ,"Sensor":{"$SENSOR_NAME":"$SENSOR_VALUE"}}]
SUBSCRIBE:
#Subscribes to get the response of report status.
TOPIC: api/v2/thing/$THING_TOKEN/report/timestamp/resp
RESPONSE_RESULT.T_EXAMPLE_CLI
Content-Format: application/json
RESPONSE_RESULT.T_HEARTBEAT
RESPONSE_RESULT.S_HEARTBEAT_1 $THING_TOKEN RESPONSE_RESULT.S_HEARTBEAT_2
SHARE.FORMAT_JSON
PUBLISH:
#Publish to server for heartbeat in json or text/plain format.
TOPIC: api/v2/thing/$THING_TOKEN/heartbeat
***The publish request of plain text is same the json format.
SUBSCRIBE:
#Subscribes to get the response of heartbeat status in json format.
TOPIC: api/v2/thing/$THING_TOKEN/heartbeat/resp
Format Plain Text
SUBSCRIBE:
#Subscribes to get the response of heartbeat status in text/plain format..
TOPIC: api/v2/thing/$THING_TOKEN/heartbeat/resp/pta
RESPONSE_RESULT.T_EXAMPLE_CLI
Content-Format: application/json
Content-Format: text/plain
RESPONSE_RESULT.T_SERVER_CONFIG
RESPONSE_RESULT.S_SERVER_CONFIG_1$THING_TOKENRESPONSE_RESULT.S_SERVER_CONFIG_2 $CONFIG_KEY RESPONSE_RESULT.S_SERVER_CONFIG_3
RESPONSE_RESULT.S_SERVER_CONFIG_4
SHARE.FORMAT_JSON
PUBLISH:
#Publish to server for get all configurations in json only.
TOPIC: api/v2/thing/$THING_TOKEN/config/req
***The publish request support json format only.
#Publish to server for get a configuration in json or text/plain format.
TOPIC: api/v2/thing/$THING_TOKEN/config/req/?config=$CONFIG_KEY
SUBSCRIBE:
#Subscribes to get the response of server configurations in json format.
TOPIC: api/v2/thing/$THING_TOKEN/config/resp
Format Plain Text
SUBSCRIBE:
#Subscribes to getting the multi configuration of thing in text/plain format.
TOPIC: api/v2/thing/$THING_TOKEN/config/resp/pta/+
#Subscribes to getting the a configuration of thing in text/plain format.
TOPIC: api/v2/thing/$THING_TOKEN/config/resp/pta/?config=$CONFIG_KEY
RESPONSE_RESULT.T_EXAMPLE_CLI
Content-Format: application/json
Content-Format: text/plain
RESPONSE_RESULT.T_CLIENT_CONFIG
RESPONSE_RESULT.S_CLIENT_CONFIG_1 $THING_TOKEN RESPONSE_RESULT.S_CLIENT_CONFIG_2device, to the Server by sending a GET command to the following URL.
SHARE.FORMAT_JSON
PUBLISH:
#Publish to server for device configuration in json or text/plain format.
TOPIC: api/v2/thing/$THING_TOKEN/config/persist
PAYLOAD: {"$CONFIG_KEY":"$CONFIG_VALUE"}
RESPONSE_RESULT.T_EXAMPLE_CLI
Content-Format: application/json
RESPONSE_RESULT.T_DELTA
RESPONSE_RESULT.S_DELTA_1 $THING_TOKENRESPONSE_RESULT.S_DELTA_2 $SENSOR_KEYRESPONSE_RESULT.S_DELTA_3
SHARE.FORMAT_JSON
PUBLISH:
#Publish to server for get all sensor of thing shadow in json only.
TOPIC: api/v2/thing/$THING_TOKEN/delta/req
***The publish request support json format only.
#Publish to server for get a sensor of thing shadow in json or text/plain format.
TOPIC: api/v2/thing/$THING_TOKEN/delta/req/?sensor=$SENSOR_KEY
SUBSCRIBE:
#Subscribes to get the response of thing shadow in json format.
TOPIC: api/v2/thing/$THING_TOKEN/delta/resp
Format Plain Text
SUBSCRIBE:
#Subscribes to getting the multi sensor of thing shadow in text/plain format.
TOPIC: api/v2/thing/$THING_TOKEN/delta/resp/pta/+
***The publish request of plain text is same the json format.
#Subscribes to getting the a sensor of thing shadow in text/plain format.
TOPIC: api/v2/thing/$THING_TOKEN/delta/resp/pta/?sensor=$SENSOR_KEY