LoRaWAN sensors
Support for LoRaWAN sensors is determined by the field lora=”true” in the <system> tag.
LoRaWAN control is possible if there is a full admin permission in the profile of the user performing the request.
These API calls use the JSON format. The session key is specified in the request header in the api-key field.
The GET requests is passed with the querytype parameter specifying the request type and additional optional parameters.
loradeviceget - GET request. Get a list of all LoRa sensors registered in the system and its parameters in a short form (up to 100 sensors). Or get a full report for one only LoRa sensor. Available parameters:
querytype - loradeviceget
deveui - unique LoRa sensor identifier, optional.
Response example for list
{
"loradevices": [
{
"pcode": 1,
"type_name": "DEBUG",
"name": "Enless",
"desc": "no data",
"deveui": "92b3d54fd791a55f",
"bat_v": "",
"bat_p": "77%",
"margin": "6 dB",
"lastseen": "Sat Jan 15 23:46:27 2000",
"lastseen_utc": 1759332262,
"status": "work"
},
{
"pcode": 200000007,
"type_name": "MHS25",
"name": "test01",
"desc": "",
"deveui": "a851524352978217",
"bat_v": "2.724 V",
"bat_p": "53%",
"margin": "",
"lastseen": "Sat Jan 15 17:25:06 2000",
"lastseen_utc": 1759333162,
"status": "lost"
},
{
"pcode": 100000001,
"type_name": "MHS25",
"name": "sensor_3",
"desc": "some text",
"deveui": "a85152435297823b",
"bat_v": "2.706 V",
"bat_p": "51%",
"margin": "",
"lastseen": "Thu Mar 6 20:33:55 2025",
"lastseen_utc": 1759332400,
"status": "work"
}
]
}Description of the objects:
pcode - digital profile type code independent of brand;
type_name - name of the sensor profile (supported sensors see below);
name - user defined name of the LoRa sensor;
desc - user defined description of the LoRa sensor;
deveui - unique LoRa sensor identifier;
bat_v - battery voltage string (if available);
bat_p - battery charge string (if available);
margin - signal quality string (if available);
lastseen - string of last time when the LoRa sensor went on air to exchange data;
lastseen_utc - last time in the UTC time format;
status - a brief string of sensor status (unknown, not activated, activated, work, broken, lost, disabled).
Response example for single
{
"loradevice": {
"pcode": 530,
"type_name": "MHS25",
"name": "sensor_3",
"desc": "some text",
"bat_v": "2.724 V",
"bat_p": "53%",
"margin": "5 dB",
"info": "Vutlan LR530, firmware 0.34, board 1.02",
"lost_time": 240,
"lastseen": "Sun Jan 16 02:25:06 2025",
"lastseen_utc": 1759332162,
"status": "work",
"config_confirmed": true,
"deveui": "a85152435294187823b",
"appkey": "5a36c0752f86cfeea85152435294187800b",
"devaddr": "00c8cc24",
"appskey": "045d8b02f73e3354c05f1604de73bd96",
"netskey": "72bdeaf9f4fbf1ac25817e45cdb70d7d",
"upfcnt": 29,
"downfcnt": 5,
"joinnonce": 7
}
}Description of the objects:
pcode - digital sensor type code independent of brand;
type_name - name of the sensor profile (supported sensors see below);
name - user defined name of the LoRa sensor;
desc - user defined description of the LoRa sensor;
bat_v - battery voltage string (if available);
bat_p - battery charge string (if available);
margin - signal quality string (if available);
info - string of the additional information about sensor hardware (if available);
lastseen - string of last time when the LoRa sensor went on air to exchange data;
lastseen_utc - last time in the UTC time format;
lost_time - sensor loss time if there is no data from sensor, in minutes;
status - a brief string of sensor status;
config_confirmed - flag that the sensor configuration has been successfully confirmed, read only, optional;
deveui - unique LoRa sensor identifier;
appkey - LoRa sensor application key;
devaddr - device address;
appskey - application session key;
netskey - network session key;
upfcnt - uplink frame-counter;
downfcnt - downlink frame-counter;
joinnonce - counter of Join procedure.
There may also be additional parameters depending on the sensor type. These parameters are described separately.
loradevicedel - DELETE request, delete the selected LoRa sensor and all its data.
Request example
{
"loradevicedel":{
"deveui": "a85152435294187823b"
}
}Description of the objects:
deveui - unique LoRa sensor identifier.
loradeviceprofiles - GET request. Get a list of supported LoRa sensor profiles. Available parameters:
querytype - loradeviceprofiles
Response example
{
"loradeviceprofiles": [
{
"pcode": 100000930,
"type_name": "MHS25",
"desc": "Dragon MHS25 Temperature Humidity Sensor",
"lost_time": 120,
"uplink_time": 60,
"rejoin_time": 720,
"alarm_1_enable": true,
"confirm_2_enable": false
},
{
"pcode": 530,
"type_name": "MHS25 (v1.2)",
"desc": "Dragon MHS25 Temperature Humidity Sensor version 1.2",
"lost_time": 120
},
{
"pcode": 1,
"type_name": "DEBUG",
"desc": "For debug purposes only",
"lost_time": 60
}
]
}Description of the objects:
pcode - digital sensor type code independent of brand;
type_name - name of the sensor profile;
desc - short description of the LoRa sensor functionality;
lost_time - default sensor loss time, 0 means automatic time detection, in minutes;
additional parameters - additional optional parameters with their default values for a given sensor type.
loradeviceadd - POST request, add a new LoRa sensor.
Request example
{
"loradeviceadd": {
"pcode": 530,
"name": "sensor 530",
"desc": "some text 530",
"deveui": "ff334455667788aa",
"appkey": "ff334455667788aa1122334455667788",
"lost_time": 120,
"uplink_time": 10,
"rejoin_time": 180,
"alarm_1_enable": false,
"alarm_3_enable": true,
"confirm_1_enable": true,
"confirm_2_enable": true
}
}pcode - digital sensor type code independent of brand, cannot be empty;
name - user defined name of the LoRa sensor, up to 64 characters long, cannot be empty;
desc - user defined description of the LoRa sensor, up to 256 characters long;
deveui - unique LoRa sensor identifier, hexadecimal string (0-9 a b c d e f), long is 16 characters only, cannot be empty;
appkey - LoRa sensor application key, hexadecimal string (0-9 a b c d e f), long is 32 characters only, cannot be empty;
lost_time - sensor loss time if there is no data from sensor, 0 means automatic time detection, in minutes.
There may also be additional parameters depending on the sensor type. These parameters are described separately.
loradevicemod - POST request, modify an existing LoRa sensor.
Request example
{
"loradevicemod": {
"deveui": "ff334455667788aa",
"name": "sensor 7",
"desc": "some text",
"lost_time": 120,
"newdeveui": "aabbccddeeff0000",
"newappkey": "00000000000000001122334455667788",
"upfcnt": 1234,
"downfcnt": 951,
"joinnonce": 111,
"uplink_time": 10,
"rejoin_time": 180,
"alarm_1_enable": true,
"alarm_3_enable": false,
"confirm_1_enable": false,
"confirm_2_enable": false
}
}deveui - unique LoRa sensor identifier, sensor with this parameter must exist, cannot be empty;
name - user defined name of the LoRa sensor, up to 63 characters long;
desc - user defined description of the LoRa sensor, up to 255 characters long;
lost_time - sensor loss time if there is no data from sensor, 0 means automatic time detection, in minutes;
newdeveui - new unique LoRa sensor identifier, hexadecimal string (0-9 a b c d e f), long is 16 characters only, optional;
newappkey - new LoRa sensor application key, hexadecimal string (0-9 a b c d e f), long is 32 characters only, optional;
upfcnt - uplink frame-counter, 32-bit unsigned integer (0 - 4294967295);
downfcnt - downlink frame-counter, 32-bit unsigned integer (0 - 4294967295);
joinnonce - counter of Join procedure (0 - 65535);
k - user session ID.
There may also be additional parameters depending on the sensor type. These parameters are described separately.
Additional parameters
Additional parameters for some sensor types. May be readable and writable. Available for the loradeviceget command in full report. And for the loradevicemod command.
The sensor type is specified via the pcode field.
Recommended time lines:
minutes - 1, 2, 5, 10, 15, 20, 30, 45, 60;
hours - 1, 2, 3, 6, 12, 24 (60, 120, 180, 360, 720, 1440 in minutes);
days - 1, 2, 3, 7, 30, 45 (1440, 2880, 4320, 10080, 43200, 64800 in minutes).
lost_time - available minutes, hours and days, 0 means automatic time detection.
uplink_time - available minutes and hours, minimum value is 1, maximum is 1440 (24 hour).
rejoin_time - available hours and days, minimum value is 60 (1 hour), maximum is 64800 (45 days).
Typical purposes of alarm and confirm flags (true/false):
alarm_1_enable - case alarm;
alarm_2_enable - shock alarm;
alarm_3_enable - door alarm;
alarm_4_enable - temperature low alarm;
alarm_5_enable - temperature high alarm;
alarm_6_enable - humidity 1 low alarm;
alarm_7_enable - humidity 1 high alarm;
alarm_8_enable - humidity 2 low alarm;
alarm_9_enable - humidity 2 high alarm;
alarm_10_enable - water leak alarm;
alarm_11_enable - motion alarm;
alarm_12_enable - smoke alarm;
confirm_1_enable - confirm alarm packets;
confirm_2_enable - confirm other packets.