Skip to content
Pd

Data Packet

Added on v1.0.0
TCP
HTTP

Defines the main packet of the Layrz Protocol, which is used to send data from the device to the server. This packet is the most flexible and can be used to send any type of data, such as sensor readings, device status, or any other information that the device needs to communicate with the server.

Example Usage

<Pd>UNIX;LATITUDE;LONGITUDE;ALTITUDE;SPEED;DIRECTION;HDOP;EXTRA+ARGS;CRC16</Pd>
ParameterTypeDescriptionExample
UNIXfloatUNIX timestamps defined in seconds of the message1753306994
LATITUDEfloatDefines the latitude of the message, send empty if is not available8.98293776
LONGITUDEfloatDefines the longitude of the message, send empty if is not available-79.51847453
ALTITUDEfloatDefines the altitude of the message, send empty if is not available10.0
SPEEDfloatDefines the speed of the message, send empty if is not available0.0
DIRECTIONfloatDefines the direction of the message, send empty if is not available25.0
HDOPfloatDefines the HDOP (Horizontal Dilution of Precision) of the message, send empty if is not available0.3
EXTRA+ARGSEXTRA+ARGSAdditional information that you need to send into the server N/A
CRC16integerCyclic Redundancy Check for error checking.1234

Extra Arguments EXTRA+ARGS

PARAMETER1:VALUE1,PARAMETER2:VALUE2,PARAMETER3:VALUE3,PARAMETER4:VALUE4,PARAMETER5:VALUE5,...
ParameterTypeDescription
PARAMETER1,PARAMETER2,PARAMETER3,PARAMETER4,PARAMETER5stringName of the parameter to send
VALUE1,VALUE2,VALUE3,VALUE4,VALUE5anyValue of the parameter to send

Example


ambient.temperature:25.0,luminosity:1000,battery.level:75,gps.is.fixed:true,event.name:motion_detected