Skip to content

LoraSens devices

The sensor receives the new radio settings during its next session and then enters normal operation.

POST /api/lorasens/offer/bind/

Request Parameters:

FieldTypeDescription
didstringOffered device identifier
uplinkFrequencyKhzintegerDevice to МС261 transmit frequency (from 864025 to 869175)
downlinkFrequencyKhzintegerМС261 to device transmit frequency (from 864025 to 869175)
bandwidthDividerintegerBandwidth divider, 1000kHz / x (2, 4, 8, 16, 24, 32, 48, 64, 96 or 128).
spreadingFactorintegerSpreading factor (from 6 to 12).
codingRateDividerintegerCoding rate divider, 4 / x (from 5 to 8).

Example Request:

{
"did": "1667755443399",
"uplinkFrequencyKhz": 868175,
"downlinkFrequencyKhz": 868100,
"bandwidthDivider": 16,
"spreadingFactor": 7,
"codingRateDivider": 5
}

The controller minimizes resources and time used for the ignored sensor.

Restart MC261 to clear the ignore list.

POST /api/lorasens/offer/ignore/

Request Parameters:

FieldTypeDescription
didstringOffered device identifier

Example Request:

{
"did": "1667755443399"
}

Change the bound LoraSens device secondary settings.

These values are stored and applied immediately.

POST /api/lorasens/device/configure/

Request Parameters:

FieldTypeDescription
didstringUnique device identifier (acquired at bind procedure).
titlestringUser device name, up to 16 characters
txPowerLimitPercentintegerMinimal required transmission signal power, 17dBm * x (from 0 to 100).
linkPeriodSecintegerLink sessions period (from 0 to 2147483647 seconds)

Example Request:

{
"did": "139572548502",
"title": "Freezer",
"txPowerLimitPercent": 75,
"linkPeriodSec": 600
}

The device is removed from the bound sensors list.

Restart MC261 after removing all the unnecessary sensors to reuse the space cleared in the list.

POST /api/lorasens/device/remove/

Request Parameters:

FieldTypeDescription
didstringUnique device identifier (acquired at bind procedure).

Example Request:

{
"did": "1667755443399"
}

MC261 schedules the registers read for the next sensor session.

The previously cached results are returned if available.

POST /api/lorasens/device/settings/read/

Request Parameters:

FieldTypeDescription
didstringUnique device identifier (acquired at bind procedure).
registersarrayList of register addresses, up to 45 registers. Address is an integer from 0 to 65535.

Example Request:

{
"did": "79172548534",
"registers": [0, 1, 50, 52, 54, 56]
}

Response Fields:

FieldTypeDescription
registersarrayList of device register objects.

Device Register Object Fields:

FieldTypeDescription
addressintegerThe address used in the request.
valueinteger / nullThe value stored in the register, from 0 to 65535, or null if not acquired.
errorstring / nullIf the device has responded with an error instead of a value, or null if no error returned.
lastUpdatedOnstringLast value, or error, registration time (ISO 8601, UTC0).

Example Response:

{
"registers": [
{ "address": 0, "value": 43, "lastUpdatedOn": "2026-05-15T11:47:33Z" },
{ "address": 50, "value": null, "error": "ERR_NO_MEM", "lastUpdatedOn": "2026-05-15T11:47:33Z" }
]
}

MC261 schedules the registers write for the next sensor session.

The previously cached results are returned if available.

POST /api/lorasens/device/settings/write/

Request Parameters:

FieldTypeDescription
didstringUnique device identifier (acquired at bind procedure).
registersarrayList of register objects, up to 45 registers.

Device Register Object Fields:

FieldTypeDescription
addressintegerThe address is an integer from 0 to 65535
valueintegerThe value to be written into the register, from 0 to 65535.

Example Request:

{
"did": "79172548534",
"registers": [
{ "address": 50, "value": 15 },
{ "address": 51, "value": 300 }
]
}

Returns raw LoraSens records ordered by reception time.

Omit after for the first page. For subsequent pages, pass the till value from the previous response.

GET /api/lorasens/journal/read/?after=...

Request Parameters:

ParameterTypeDescription
afterstring / nullSkip records on or before the specified time (ISO 8601, UTC0), or start from the oldest record, if omitted or null.

Response Fields:

ParameterTypeDescription
fromstring / nullThe first read record reception time (ISO 8601, UTC0), or null if no records found.
recordsarray / nullAn array of journal record objects, usually about 5 records per request.
tillstring / nullThe last read record reception time (ISO 8601, UTC0), or null if no records found.

Journal Record Object Fields:

ParameterTypeDescription
idstringBound device unique identifier.
datastringHexadecimal bytes string specific for this device model and firmware.
registeredOnstringThe record registration time at the bound device (ISO 8601, UTC0).
receivedOnstringThe record reception time at MC261 (ISO 8601, UTC0).

Example Response:

{
"from": "2026-07-21T08:22:38Z",
"records": [
{
"id": "162066874755323",
"data": "070000110000B1",
"registeredOn": "2026-07-21T08:22:34Z",
"receivedOn": "2026-07-21T08:22:38Z"
}
],
"till": "2026-07-21T08:22:38Z"
}

Clears the journal part.

The till parameter is usually taken from the previous journal read response.

POST /api/lorasens/journal/clear/

Request Parameters:

FieldTypeDescription
tillstringRecords should be removed at or before this time (ISO 8601, UTC0).

Example Request:

{
"till": "2026-07-23T10:05:00Z"
}

Returns the list of LTH temperature and humidity sensors.

GET /api/lth/sources/

Response Fields:

FieldTypeDescription
idstringBound LTH sensor identifier.
titlestringUser device name.
batteryChargePercentintegerDevice reported battery charge. 100 - battery full, or external power supply. 0 - measurement accuracy and link schedule are no longer guaranteed.
nextScheduledOnstring / nullTime of the next expected link with the device (ISO 8601, UTC0), or null if the device has not been online yet.
advLastOnstring / nullLast device state reception time (ISO 8601, UTC0), or null if the data has not been acquired yet.
advLastValuesobject / nullnull, if the data has not been acquired yet.
temperaturestringMeasured temperature, in Celsius degrees.
humiditystringMeasured humidity, in percents.

Example Response:

{
"lth": [
{
"id": "3957428472540",
"title": "Source 1",
"batteryChargePercent": 17,
"nextScheduledOn": "2025-08-12T13:18:08Z",
"advLastOn": "2025-08-12T13:18:07Z",
"advLastValues": {
"temperature": "15.03",
"humidity": "73.7"
}
},
{
"id": "93746638264",
"title": "Source 2",
"batteryChargePercent": 97,
"nextScheduledOn": "2025-08-12T13:23:50Z",
"advLastOn": "2025-08-12T13:18:50Z",
"advLastValues": {
"temperature": "-15.31",
"humidity": "42.0"
}
},
{
"id": "8667755443323",
"title": "Source 3",
"batteryChargePercent": 75,
"nextScheduledOn": "2025-08-12T12:34:31Z",
"advLastOn": "2025-08-12T13:18:31Z",
"advLastValues": {
"temperature": "5.44",
"humidity": "51.1"
}
}
]
}

Continuous link with the temperature sensor

Section titled “Continuous link with the temperature sensor”

Temporarily requests extra device sessions.

After the next session, the device performs the sessions with the new specified period. The data would also be re-measured with that period.

POST /api/lth/source/connect/

Request Parameters:

FieldTypeDescription
idstringBound LTH sensor identifier.
tillstringTime to end the extra link sessions (ISO 8601, UTC0).
advIntervalSecintegerShortened link period for the extra link sessions, in seconds (from 0 to 2147483647).

Example Request:

{
"id": "8667755443323",
"till": "2025-08-12T12:34:56Z",
"advIntervalSec": 1
}

Returns the list of LWG weight sensors.

GET /api/lwg/sources/

Response Fields:

FieldTypeDescription
idstringBound LWG sensor identifier.
titlestringUser device name.
batteryChargePercentintegerDevice reported battery charge. 100 - battery full, or external power supply. 0 - measurement accuracy and link schedule are no longer guaranteed.
nextScheduledOnstring / nullTime of the next expected link with the device (ISO 8601, UTC0), or null if the device has not been online yet.
rxLastOnstring / nullLast device link time (ISO 8601, UTC0), or null if the device has not been online yet.
advLastOnstring / nullLast device state reception time (ISO 8601, UTC0), or null if the data has not been acquired yet.
advLastValuesarray / nullAn array of 8 integers (proportional to the measured weight), or the error strings for several of them, or null’s for the disabled or unread yet shelves.

Example Response:

{
"lwg": [
{
"id": "19387628402",
"title": "Source 1",
"rxLastOn": "2025-08-12T12:34:52Z",
"nextScheduledOn": "2025-08-12T12:35:52Z",
"batteryChargePercent": 17,
"advLastOn": "2025-08-12T12:34:52Z",
"advLastValues": [10000, 12000, 15000, null, 12500, 10000, 12000, null]
},
{
"id": "3957428472540",
"title": "Source 2",
"rxLastOn": "2025-08-12T12:34:56Z",
"nextScheduledOn": "2025-08-12T12:34:57Z",
"batteryChargePercent": 97,
"advLastOn": "2025-08-12T12:34:56Z",
"advLastValues": [null, null, null, null, null, null, null, null]
},
{
"id": "93746638264",
"title": "Source 3",
"rxLastOn": "2025-08-12T12:34:33Z",
"nextScheduledOn": "2025-08-12T12:35:34Z",
"batteryChargePercent": 75,
"advLastOn": "2025-08-12T12:34:33Z",
"advLastValues": [94856, null, 97864, 95836, 97846, 93658, null, null]
},
{
"id": "8667755443323",
"title": "Source 4",
"rxLastOn": "2025-08-12T12:34:39Z",
"nextScheduledOn": "2025-08-12T12:35:39Z",
"batteryChargePercent": 80,
"advLastOn": "2025-08-12T12:34:30Z",
"advLastValues": [
"SENSOR_ERR_DISABLED",
"SENSOR_ERR_DISABLED",
"SENSOR_ERR_DISABLED",
"SENSOR_ERR_DISABLED",
"SENSOR_ERR_DISABLED",
"SENSOR_ERR_DISABLED",
"SENSOR_ERR_DISABLED",
"SENSOR_ERR_DISABLED"
]
}
]
}

Temporarily requests extra device sessions.

After the next session, the device performs the sessions with the new specified period. If the shelves are specified in the request, their data would also be re-measured with this period.

POST /api/lwg/source/connect/

Request Parameters:

FieldTypeDescription
idstringBound LWG sensor identifier.
tillstringTime to end the extra link sessions (ISO 8601, UTC0).
advIntervalSecintegerShortened link period for the extra link sessions, in seconds (from 0 to 2147483647).
shelvesIdxsarrayAn array of up to 8 shelves indices, which should be updated with each extra session.

Example Request:

{
"id": "8667755443323",
"till": "2025-08-12T12:34:56Z",
"advIntervalSec": 1,
"shelvesIdxs": [1, 2, 4]
}