Status API
Retrieving status of the transmitter.
CoAP Options
Option | Description | Value | Required |
---|---|---|---|
URI-Path | Resource segment #1 | v1 | Yes |
URI-Path | Resource segment #2 | status | Yes |
Status Properties
Property | Description | Type |
---|---|---|
deviceName | Product name. | String |
firmwareVersion | Firmware version | String |
serialNo | Serial number (Unique to each transmitter) | String |
lrscUploadCount | Number of sessions uploaded to LRS Connect if enabled. This count is volatile and will restart from zero if transmitter is restarted. | Number |
activated | Whether or not the transmitter is activated against LRSConnect for session reporting. | Boolean |
GET /v1/status
Retrieves information about the transmitter.
Response Example
{
"responseTypes":[
"status"
],
"globalSessionSequence":120,
"activeSessionCount":0,
"timestamp":"2018-03-15T14:33:21",
"status":{
"deviceName":"T7470",
"firmwareVersion":"8.4.100.43",
"serialNo":"21473",
"lrscUploadCount":48,
"activated":true
}
}
Example Code Request
// Using node-coap (yarn add coap, npm install coap): https://github.com/mcollina/node-coap
const coap = require('coap');
let req = coap.request({
host: '10.0.1.32',
port: 5683,
pathname: '/v1/status',
method: 'GET'
});
req.on('response', res => {
let json = JSON.parse(res.payload.toString('utf-8'));
if (res.code[0] === '2') { // Success
// Status object
console.log(json.status);
} else {
console.error(json);
}
});
// Send request
req.end();
Updated over 6 years ago