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.
The following values of the querytype field are used for management:
loradeviceget - get a list of all LoRa sensors registered in the system and its parameters in a short form (up to 100 sensors):
k - user session ID.
Response example
<loradevices>
<loradevice type="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"/>
<loradevice type="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"/>
<loradevice type="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"/>
</loradevices>
Description of the xml nodes:
type - 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).
loradeviceget - get a full report for one only LoRa sensor:
deveui - unique LoRa sensor identifier;
k - user session ID.
Response example
<loradevice type="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" disabled="0" skipcntcheck="0" lastseen="Sun Jan 16 02:25:06 2025" lastseen_utc="1759332162"
status="work" config_confirmed="1" deveui="a85152435294187823b" appkey="5a36c0752f86cfeea85152435294187800b"
devaddr="00c8cc24" appskey="045d8b02f73e3354c05f1604de73bd96" netskey="72bdeaf9f4fbf1ac25817e45cdb70d7d"
upfcnt="29" downfcnt="5" joinnonce="7" />
Description of the xml nodes:
type - name of the sensor profile (supported sensors see below);
type_pcode - digital sensor type code independent of brand, optional;
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;
disabled - if 1 sensor is disabled, 0/1;
skipcntcheck - if 1 frame counters is not check, 0/1;
status - a brief string of sensor status;
config_confirmed - flag that the sensor configuration has been successfully confirmed, 0/1, read only, optional;
deveui - unique LoRa sensor identifier;
appkey - LoRa sensor application key;
devaddr - device address;
appskey - application session key;
netskey - n
etwork 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 the selected LoRa sensor and all its data:
deveui - unique LoRa sensor identifier;
k - user session ID.
loradeviceprofiles - get a list of supported LoRa sensor profiles:
k - user session ID.
Response example
<loradeviceprofiles>
<loradeviceprofile type="MHS25" desc="Dragon MHS25 Temperature & Humidity Sensor" lost_time="120" type_pcode="0" />
<loradeviceprofile type="MHS25 (v1.2)" desc="Dragon MHS25 Temperature & Humidity Sensor version 1.2" lost_time="120" type_pcode="530" />
<loradeviceprofile type="DEBUG" desc="For debug purposes only" lost_time="60" type_pcode="0" />
</loradeviceprofiles>
Description of the xml nodes:
type - name of the supported sensor profile;
desc - short description of the LoRa sensor functionality;
lost_time - default sensor loss time, 0 means automatic time detection, in minutes;
type_pcode - digital sensor type code independent of brand.
loradeviceadd - add a new LoRa sensor:
type - name of the sensor profile, selected from the list of supported profiles, 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;
k - user session ID.
There may also be additional parameters depending on the sensor type. These parameters are described separately.
loradevicemodify - modify an existing LoRa sensor:
deveui - unique LoRa sensor identifier, sensor with this parameter must exist, 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;
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;
lost_time - sensor loss time if there is no data from sensor, 0 means automatic time detection, in minutes;
disabled - if 1 sensor is disabled, 0/1, default is 0;
skipcntcheck - if 1 frame counters is not check, 0/1, default is 0;
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 loradevicemodify command.
The sensor type is specified via the type_pcode field.
Recommended time lines:
minutes - 1, 2, 5, 10, 15, 30;
hours - 1, 2, 3, 6, 12 (60, 120, 180, 360, 720 in minutes);
days - 1, 2, 3, 7, 30, 45 (1440, 2880, 4320, 10080, 43200, 64800 in minutes).
For sensor type "Vutlan LR530", type_pcode="530":
uplink_time - uplink time, in minutes, minimum value is 1, maximum is 1440, default is 60;
rejoin_time - rejoin procedure time, in minutes, minimum value is 10, maximum is 64800, default is 720;
alarm_1_enable - enable flag for case alarm, 0 or 1, default 0;
alarm_3_enable - enable flag for door alarm, 0 or 1, default 1 (enable);
confirm_1_enable - enable flag for confirm alarm packets, 0 or 1, default 0;
confirm_2_enable - enable flag for confirm other packets, 0 or 1, default 0.
For sensor type "Vutlan LR490", type_pcode="490":
uplink_time - uplink time, in minutes, minimum value is 1, maximum is 1440, default is 15;
rejoin_time - rejoin procedure time, in minutes, minimum value is 10, maximum is 64800, default is 720;
alarm_1_enable - enable flag for case alarm, 0 or 1, default 0;
alarm_2_enable - enable flag for shock alarm, 0 or 1, default 0;
confirm_1_enable - enable flag for confirm alarm packets, 0 or 1, default 0;
confirm_2_enable - enable flag for confirm other packets, 0 or 1, default 0.
For sensor type "Vutlan LR500", type_pcode="500":
uplink_time - uplink time, in minutes, minimum value is 1, maximum is 1440, default is 30;
rejoin_time - rejoin procedure time, in minutes, minimum value is 10, maximum is 64800, default is 720;
alarm_1_enable - enable flag for case alarm, 0 or 1, default 0;
alarm_2_enable - enable flag for shock alarm, 0 or 1, default 0;
alarm_4_enable - enable flag for temperature low alarm, 0 or 1, default 0;
alarm_5_enable - enable flag for temperature high alarm, 0 or 1, default 0;
confirm_1_enable - enable flag for confirm alarm packets, 0 or 1, default 0;
confirm_2_enable - enable flag for confirm other packets, 0 or 1, default 0;
temp_low_alarm - temperature low alarm threshold value, default 0, for internal use;
temp_high_alarm - temperature high alarm threshold value, default 55, for internal use.