/
LoRaWAN sensors

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%" lastseen="Sat Jan 15 23:46:27 2000" status="work"/>
<loradevice type="MHS25" name="test01" desc="" deveui="a851524352978217" bat_v="2.724 V" bat_p="53%" lastseen="Sat Jan 15 17:25:06 2000" status="lost"/>
<loradevice type="MHS25" name="sensor_3" desc="some text" deveui="a85152435297823b" bat_v="2.706 V" bat_p="51%" lastseen="Thu Mar 6 20:33:55 2025" 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);
  • lastseen - string of last time when the LoRa sensor went on air to exchange data;
  • status - a brief string of sensor status.


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%" lastseen="Sun Jan 16 02:25:06 2025" 
status="work" deveui="a85152435294187823b" appkey="5a36c0752f86cfeea85152435294187800b" 
devaddr="00c8cc24" appskey="045d8b02f73e3354c05f1604de73bd96" netskey="72bdeaf9f4fbf1ac25817e45cdb70d7d" 
upfcnt="29" downfcnt="5"/>

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;
  • bat_v - battery voltage string (if available);
  • bat_p - battery charge string (if available);
  • lastseen - string of last time when the LoRa sensor went on air to exchange data;
  • status - a brief string of sensor status;
  • deveui - unique LoRa sensor identifier;
  • appkey - LoRa sensor application key;
  • devaddr - device address;
  • appskey - application session key;
  • netskey - n;
  • upfcnt - uplink frame-counter;
  • downfcnt - downlink frame-counter.


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"/>
<loradeviceprofile type="MHS25 (v1.2)" desc="Dragon MHS25 Temperature & Humidity Sensor version 1.2"/>
<loradeviceprofile type="DEBUG" desc="For debug purposes only"/>
</loradeviceprofiles>

Description of the xml nodes:

  • type - name of the supported sensor profile;
  • desc - short description of the LoRa sensor functionality.


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;
  • k - user session ID.


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;
  • upfcnt - uplink frame-counter, 32-bit unsigned integer (0 - 4294967295);
  • downfcnt - downlink frame-counter, 32-bit unsigned integer (0 - 4294967295);
  • k - user session ID.

Related content