LoraSens devices
Цей контент ще не доступний вашою мовою.
Bind an offered sensor
Section titled “Bind an offered sensor”The sensor receives the new radio settings during its next session and then enters normal operation.
POST /api/lorasens/offer/bind/
Request Parameters:
| Field | Type | Description |
|---|---|---|
did | string | Offered device identifier |
uplinkFrequencyKhz | integer | Device to МС261 transmit frequency (from 864025 to 869175) |
downlinkFrequencyKhz | integer | МС261 to device transmit frequency (from 864025 to 869175) |
bandwidthDivider | integer | Bandwidth divider, 1000kHz / x (2, 4, 8, 16, 24, 32, 48, 64, 96 or 128). |
spreadingFactor | integer | Spreading factor (from 6 to 12). |
codingRateDivider | integer | Coding rate divider, 4 / x (from 5 to 8). |
Example Request:
{ "did": "1667755443399", "uplinkFrequencyKhz": 868175, "downlinkFrequencyKhz": 868100, "bandwidthDivider": 16, "spreadingFactor": 7, "codingRateDivider": 5}Ignore an offered sensor
Section titled “Ignore an offered sensor”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:
| Field | Type | Description |
|---|---|---|
did | string | Offered device identifier |
Example Request:
{ "did": "1667755443399"}Configure the bound sensor
Section titled “Configure the bound sensor”Change the bound LoraSens device secondary settings.
These values are stored and applied immediately.
POST /api/lorasens/device/configure/
Request Parameters:
| Field | Type | Description |
|---|---|---|
did | string | Unique device identifier (acquired at bind procedure). |
title | string | User device name, up to 16 characters |
txPowerLimitPercent | integer | Minimal required transmission signal power, 17dBm * x (from 0 to 100). |
linkPeriodSec | integer | Link sessions period (from 0 to 2147483647 seconds) |
Example Request:
{ "did": "139572548502", "title": "Freezer", "txPowerLimitPercent": 75, "linkPeriodSec": 600}Unbind the sensor
Section titled “Unbind the sensor”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:
| Field | Type | Description |
|---|---|---|
did | string | Unique device identifier (acquired at bind procedure). |
Example Request:
{ "did": "1667755443399"}Read sensor registers
Section titled “Read sensor registers”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:
| Field | Type | Description |
|---|---|---|
did | string | Unique device identifier (acquired at bind procedure). |
registers | array | List 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:
| Field | Type | Description |
|---|---|---|
registers | array | List of device register objects. |
Device Register Object Fields:
| Field | Type | Description |
|---|---|---|
address | integer | The address used in the request. |
value | integer / null | The value stored in the register, from 0 to 65535, or null if not acquired. |
error | string / null | If the device has responded with an error instead of a value, or null if no error returned. |
lastUpdatedOn | string | Last 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" } ]}Write sensor registers
Section titled “Write sensor registers”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:
| Field | Type | Description |
|---|---|---|
did | string | Unique device identifier (acquired at bind procedure). |
registers | array | List of register objects, up to 45 registers. |
Device Register Object Fields:
| Field | Type | Description |
|---|---|---|
address | integer | The address is an integer from 0 to 65535 |
value | integer | The value to be written into the register, from 0 to 65535. |
Example Request:
{ "did": "79172548534", "registers": [ { "address": 50, "value": 15 }, { "address": 51, "value": 300 } ]}Read bound devices journal part
Section titled “Read bound devices journal part”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:
| Parameter | Type | Description |
|---|---|---|
after | string / null | Skip records on or before the specified time (ISO 8601, UTC0), or start from the oldest record, if omitted or null. |
Response Fields:
| Parameter | Type | Description |
|---|---|---|
from | string / null | The first read record reception time (ISO 8601, UTC0), or null if no records found. |
records | array / null | An array of journal record objects, usually about 5 records per request. |
till | string / null | The last read record reception time (ISO 8601, UTC0), or null if no records found. |
Journal Record Object Fields:
| Parameter | Type | Description |
|---|---|---|
id | string | Bound device unique identifier. |
data | string | Hexadecimal bytes string specific for this device model and firmware. |
registeredOn | string | The record registration time at the bound device (ISO 8601, UTC0). |
receivedOn | string | The 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"}Clear bound devices journal part
Section titled “Clear bound devices journal part”Clears the journal part.
The till parameter is usually taken from the previous journal read response.
POST /api/lorasens/journal/clear/
Request Parameters:
| Field | Type | Description |
|---|---|---|
till | string | Records should be removed at or before this time (ISO 8601, UTC0). |
Example Request:
{ "till": "2026-07-23T10:05:00Z"}Temperature sensors list
Section titled “Temperature sensors list”Returns the list of LTH temperature and humidity sensors.
GET /api/lth/sources/
Response Fields:
| Field | Type | Description |
|---|---|---|
id | string | Bound LTH sensor identifier. |
title | string | User device name. |
batteryChargePercent | integer | Device reported battery charge. 100 - battery full, or external power supply. 0 - measurement accuracy and link schedule are no longer guaranteed. |
nextScheduledOn | string / null | Time of the next expected link with the device (ISO 8601, UTC0), or null if the device has not been online yet. |
advLastOn | string / null | Last device state reception time (ISO 8601, UTC0), or null if the data has not been acquired yet. |
advLastValues | object / null | null, if the data has not been acquired yet. |
temperature | string | Measured temperature, in Celsius degrees. |
humidity | string | Measured 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:
| Field | Type | Description |
|---|---|---|
id | string | Bound LTH sensor identifier. |
till | string | Time to end the extra link sessions (ISO 8601, UTC0). |
advIntervalSec | integer | Shortened 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}Weight sensors list
Section titled “Weight sensors list”Returns the list of LWG weight sensors.
GET /api/lwg/sources/
Response Fields:
| Field | Type | Description |
|---|---|---|
id | string | Bound LWG sensor identifier. |
title | string | User device name. |
batteryChargePercent | integer | Device reported battery charge. 100 - battery full, or external power supply. 0 - measurement accuracy and link schedule are no longer guaranteed. |
nextScheduledOn | string / null | Time of the next expected link with the device (ISO 8601, UTC0), or null if the device has not been online yet. |
rxLastOn | string / null | Last device link time (ISO 8601, UTC0), or null if the device has not been online yet. |
advLastOn | string / null | Last device state reception time (ISO 8601, UTC0), or null if the data has not been acquired yet. |
advLastValues | array / null | An 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" ] } ]}Continuous link with the weight sensor
Section titled “Continuous link with the weight sensor”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:
| Field | Type | Description |
|---|---|---|
id | string | Bound LWG sensor identifier. |
till | string | Time to end the extra link sessions (ISO 8601, UTC0). |
advIntervalSec | integer | Shortened link period for the extra link sessions, in seconds (from 0 to 2147483647). |
shelvesIdxs | array | An 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]}