System Commands¶
Ping¶
This topic is used to send a ping request to a device over the Command and Control cc channel.
When the device receives this message, it echoes a response back on the corresponding Command Response cr topic.
This serves as a simple mechanism to verify communication and ensure the device is online and responsive.
Topic Structure: <baseTopic>/cc/<deviceID>/ping
Properties
"data":{string} Echo Message"tranID":(optional)
Example Command
Subscribe cs/v2/cc/ABCD-EFGH-1234/ping
{
"data": "Up up down down left right ping pong",
"tranID": "c3p0"
}
Response
Publish cs/v2/cr/ABCD-EFGH-1234/c3p0
{
"data": "Up up down down left right ping pong"
}
Error Response
Data null or missing
{"error": "Ping expected data"}
Reboot¶
Instruct the data logger to reboot. This will also trigger:
The last will topic to publish its message
The State topic will publish an offline message
Topic Structure: <baseTopic>/cc/<deviceID>/reboot
Properties
"action": "reboot"Reboot data logger.
"action": "reconnect"Close the MQTT connection and reconnect without rebooting.
Example Command
Subscribe cs/v2/cc/ABCD-EFGH-1234/reboot
{
"action": "reboot"
}
Response
Publish cs/v2/cr/ABCD-EFGH-1234/reboot
{
"success": "Reboot complete"
}
Terminal¶
Aspen Devices Only Output Aspen terminal responses in an MQTT payload.
Subscribe <base topic>/cc/<UID>/terminal
Properties
"cmd": "terminal""data":{string} Aspen Terminal command [“SHOW MEMORY” or “M”]"rawResponse":{Boolean}trueoutput raw terminal response no formatfalseformat terminal response in JSON
Example Command
Subscribe cs/v2/cc/ABCD-EFGH-1234/terminal
{
"cmd": "terminal",
"data": "SHOW MEMORY",
"rawResponse": true
}
The response will output on the Command Response topic
Publish <base topic>/cr/<UID>/terminal
Serial TalkThru¶
Serial TalkThru allows remote interaction with sensors connected to data logger serial ports.
It works similar to the terminal mode serial talk through.
The data logger will transmit to the serial sensor and receive one response.
One transmission is required for each response from the sensor. This feature is not designed to sniff serial sensor output.
The desired communication port must be configured prior to using serial talk thru.
This command causes the data logger to enter a “talk thru session”. The session will stay active,
meaning that the sensor port will remain in a state of not transferring data through to the instructions using the port until it is aborted or times out.
The timeout associated with a talkThru session is 1 minute. If no further talkThru commands are received within a minute, the session will end, and normal port operation will resume.
The session can also be aborted by publishing to the talkThru topic with the JSON key-value pair "abort" (the value does not matter).
Topic Structure: <baseTopic>/cc/<deviceID>/talkThru
Properties
"comPort":(string) COM port value."outString":(string) ASCII string to be sent to sensor."numberTries":(string,Optional) ASCII number string indicating number of transmissions of outString."respDelay":(string,Optional) ASCII number string indicating time (milliseconds) to wait for the complete response from a sensor."abort":(string,Optional) Abort serial TalkThru session (can be any value).
Allowable Com Port Values
The acceptable com port values listed below must follow the case format shown.
- CR1000X & CR6
ComRS232
ComC1
ComC3
- CR1000X Only
ComC5
ComC7
- CR6 Only
ComU1
ComU3
ComU5
ComU7
ComU9
ComU11
- CR350 Only
COM1
COM2
COM3
- SDM
ComXX of SDM com port selected by SDM-SIO module
Example Command
Subscribe cs/v2/cc/ABCD-EFGH-1234/talkThru
{
"comPort": "ComC1",
"outString": "1R\r\n",
"numberTries": "1",
"respDelay": "500",
"abort": ""
}
Note
The presence of the abort parameter means that the data logger will resume reading from the port on the next scan after the outString command executes.
Carriage return terminators must be escaped, as per JSON specifications.
An incomplete response may require a longer respDelay value.
Response
Publish <baseTopic>/cr/<deviceID>/talkThru
{
"response": "27.6662\r\n"
}
If an error occurred, the response will be one of the following error messages:
{
"response": "Illegal ComPort"
}
{
"response": "No response received"
}
{
"response": "ComPort must be open to use MQTT TalkThru"
}
MQTT Config¶
Deprecated
The Recipe download method replace the configuration file with additional functionality in a simpler JSON format.
This command is to “onboard” or set up the device. The file received from this command must follow the proprietary binary format expected by the parsing routine. Once this file is received it will be parsed as a binary settings file and if valid, the settings applied and the device restarted.
Subscribe
<baseTopic>/cc/<deviceID>/mqttConfig
{
"url" : "<URL returning mqttConfig.bin file from HTTP(s) GET request>",
"tranID": "<transaction id>"
}
Example command:
Subscribe
cs/v2/cc/ABCD-EFGH-1234/mqttConfig
{
"url" : "https://example.123.xyz",
}
Response
(After reboot)
Publish
cs/v2/cr/ABCD-EFGH-1234/mqttConfig
{
"success": "MQTT configuration file loaded"
}
Example error:
Publish
cs/v2/cr/ABCD-EFGH-1234/mqttConfig
{
"error": "MQTT Configuration transfer error"
}