cayenne.lpp.decode
action
cayenne.decode trigger action accepts a binary input and converts it into a cayenne.lpp encoded string. The Cayenne LPP (Low Power Payload) provides a convenient way to send data over LPWAN (Low-power, wide-area networks). The LPP protocol (https://github.com/myDevicesIoT/cayenne-docs/blob/master/docs/LORA.md) allows for clear compact binary packets to be sent and decoded without deep knowledge about the data structure.
The Cayenne LPP enables the devices to send different sensor data in different frames. Each sensor data is prefixed with two bytes that contain the Data Channel and Data Type information. The format of the data is as follows:
Data1 Channel Data1 Type Data Data2 Channel Data2 Type Data ..... 1 Byte 1 Byte N Bytes 1 Byte 1 Byte N Bytes .....Data Channel: Uniquely identifies each sensor in the device across frames. For example, Temperature sensor
Data Type: Identifies the data type in the frame. For example, Temperature
Each data type uses one or more bytes to send the data according to the following table:
Type | IPSO | LPP | Hex | Data Size | Data Resolution per bit |
---|---|---|---|---|---|
Digital Input | 3200 | 0 | 0 | 1 | 1 |
Digital Output | 3201 | 1 | 1 | 1 | 1 |
Analog Input | 3202 | 2 | 2 | 2 | 0.01 Signed |
Analog Output | 3203 | 3 | 3 | 2 | 0.01 Signed |
Illuminance Sensor | 3301 | 101 | 65 | 2 | 1 Lux Unsigned MSB |
Presence Sensor | 3302 | 102 | 66 | 1 | 1 |
Temperature Sensor | 3303 | 103 | 67 | 2 | 0.1 °C Signed MSB |
Humidity Sensor | 3304 | 104 | 68 | 1 | 0.5 % Unsigned |
Accelerometer | 3313 | 113 | 71 | 6 | 0.001 G Signed MSB per axis |
Barometer | 3315 | 115 | 73 | 2 | 0.1 hPa Unsigned MSB |
Gyrometer | 3334 | 134 | 86 | 6 | 0.01 °/s Signed MSB per axis |
GPS Location | 3336 | 136 | 88 | 9 | Latitude : 0.0001 ° Signed MSB Longitude : 0.0001 ° Signed MSB Altitude : 0.01 meter Signed MSB |
Examples
Device with 2 temperature sensors

Device with temperature and acceleration sensors
Frame N
Frame N+1
Device with GPS
Payload (Hex) 01 88 06 76 5f f2 96 0a 00 03 e8Data Channel TypeValue 01 ⇒ 1 88 ⇒ GPS Latitude: 06765f ⇒ 42.3519 Longitude: F2960a ⇒ -87.9094Altitude: 0003E8 ⇒ 10 metersAction
To access the cayenne.decode trigger action:
- In the Adding trigger screen, under Binary click and drag the cayenne.decode to the canvas.
Canvas
When dragged onto the canvas, the appearance of the action is a rectangle with two routing points.
The left routing point (red) is the failure route. This route will be taken if there is an error during execution.
The right routing point (green) is the success route. This route will be taken if action executes successfully.
Form
Parameters
Name | Type | Required | Description |
---|---|---|---|
Input | String | Yes | The cayenne.lpp string to be converted. |
Action variable
This action returns multiple values for each channel sent in the packet. In the examples below, Y is the channel number that is received.
Name | Type | Description |
---|---|---|
$(action.X.channels.Y.name) | String | The name of the sensor type, this will be a human-readable name such as Analog Input or Temperature Sensor. |
$(action.X.channels.Y.key) | String | The string key for the sensor type, this will be ideal as a programmatic key such as analogIn or temperature. |
$(action.X.channels.Y.value) | Varies | For numerical sensor types, this value will be a floating point value. For accelerometer and gyrometer, the result will be an object with x, y, and z values. For GPS, the result will be an object with lat, lng, and alt fields. |