LoRa Sensor Protocol
|
1 byte |
3 bytes |
N bytes |
||||||||
|
Protocol Header |
Device Identifier
|
Payload |
||||||||
|
VER |
FLAGS |
|||||||||
|
1 byte |
3 bytes |
2 bytes |
2 bytes |
2 bytes |
|
|
Protocol Header |
Device Identifier
|
Temperature
|
Pressure |
Humidity |
|
|
VER |
FLAGS |
||||
|
1 byte |
3 bytes |
1byte |
1 byte |
N bytes |
1 byte |
N bytes |
… |
1 byte |
N bytes |
|
|
Protocol Header |
Device Identifier
|
Payload Size |
Data Block |
Data Block |
… |
Data Block |
||||
|
VER |
FLAGS |
Data Type |
Data Payload |
Data Type |
Data Payload |
… |
Data Type |
Data Payload |
||
Protocol Version will be changed when fixes or new features will be implemented in the protocol.
Payload type: 01 - Simple Payload, 10 Extended payload, 11 Reserved
|
Protocol Version (VER) |
Flags |
||||||
|
7 |
6 |
5 |
4 |
3 |
2 |
1 |
0 |
|
|
0 |
0 |
Payload Type |
||||
UID is unique device ID and will contain latest 3 bytes of the MAC
|
Byte 1 |
Byte 2 |
Byte 3 |
|
UID |
||
The size of the data payload.
|
1 byte |
N bytes |
|
Data Type |
Data Payload |
|
Value |
Description |
Payload Length |
|
0x001 |
Temperature |
2 bytes |
|
0x002 |
Pressure |
2 bytes |
|
0x003 |
Humidity |
2 bytes |
|
0x004 |
Laser Ranging Sensor |
2 bytes |
|
0x005 |
Air Quality Sensor |
2 * 2 bytes |
|
0x006 |
Accelerometer |
3 * 2 bytes |
|
0x007 |
Battery Level |
2 bytes |
|
0x008 |
Thermal Sensor Raw |
1 byte + 32 bytes |
|
0x009 |
Historical Synchronisation |
1 byte |
In this type of data, payload contains 2-bytes temperature data. Current sensor operating range is -40 - +80C.
Example Data Payload 0x7E 0x18
|
Byte 1 |
Byte 1 |
Byte 2 |
|
0x001 |
0x7E |
0x18
|
Temperature: 0x187E -> (6270 – 4000)/100 = 22.70 degrees Celsius
In this type of data, payload contains 2-bytes pressure data. Current sensor operating range is 300 - 1100hPa.
|
Byte 1 |
Byte 1 |
Byte 2 |
|
0x002 |
Little-Endian pressure in hPa |
|
In this type of data, payload contains 2-bytes humidity data
|
Byte 1 |
Byte 1 |
Byte 2 |
|
0x003 |
Percentage: 64.20 % |
|
|
Byte 1 |
Byte 1 |
Byte 2 |
Byte 3 |
Byte 4 |
|
0x004 |
IAQ (0-500) |
CO2 ppm |
VOC ppm |
|
|
Byte 1 |
Byte 1 |
Byte 2 |
|
0x005 |
Little Endian Range in cm |
|
In this type of data, payload contains 6-bytes acceleration data. Each 2 bytes represents one axis.
|
Byte 1 |
Byte 1 |
Byte 2 |
Byte 3 |
Byte 4 |
Byte 5 |
Byte 6 |
|
0x006 |
Acceleration X |
Acceleration Y |
Acceleration Z |
|||
Battery voltage will be sent based on the available battery life
|
Byte 1 |
Byte 1 |
Byte 2 |
|
0x007 |
Percentage |
|
Melexis 32 x 24 image each payload sends 1 row.
|
Byte 1 |
1 byte |
32 bytes |
|
0x008 |
Row number |
Image Data |
Synchronization data implies sending random selected data from the latest 10 or more historical collected values for every data type listed above. These values will be updated on the server if for different reasons including collisions, some data is lost during LoRa transmission.
|
Byte 1 |
Byte 1 |
Byte 2 |
N bytes |
... |
Byte |
N Bytes |
|
0x009 |
Historic Offset |
Data Type |
Data Payload |
|
Data Type |
Data Payload |