Telemetry2U Technical Bulletin

Custom Payload Decoder Examples for LoRaWAN and NB-IoT Devices

Use these worked examples to understand how raw hexadecimal payloads are mapped to readable values in Telemetry2U, then add reusable downlink commands for supported device configuration and control.

Admin > Custom Devices Payload decoding Downlink commands

Before You Create a Custom Decoder

A reliable decoder begins with the manufacturer’s payload specification, a known sample uplink and the correct byte order. The examples below show the Telemetry2U workflow, but the installed firmware and current device manual remain the source of truth for field positions, ports and command syntax.

Telemetry2U account

Use an active trial or paid account with access to the required company and nodes.

Administrative permission

Your role must allow access to Custom Devices and Node Maintenance.

Payload documentation

Obtain the current byte map, byte order, scaling, FPort and report-type details.

Known test payload

Use a captured uplink with independently known values before approving the decoder.

Important: These are worked examples rather than universal device profiles. Manufacturers can change payloads between firmware versions. Confirm every field and downlink command against the exact hardware and firmware being deployed.

Custom Device Workflow in Telemetry2U

Create the decoder first, validate it with known uplinks, then add only the downlink commands needed by authorised users.

  1. Open Admin > Custom Devices and select Create New.
  2. Enter the device name, FPort, byte order and expected field count.
  3. Add each payload field using its start byte, length, data type, scaling, offset and precision.
  4. Use Match Offset fields where fixed bytes identify a device, report type or operating mode.
  5. Save the decoder and assign it as the Device Configuration in Admin > Node Maintenance.
  6. Confirm the displayed values against a known payload before enabling alerts, reports or automation.
  7. Add required commands under Downlink Commands, then send them from Admin > Send Node Commands or an authorised dashboard button.

Worked Examples

Dragino LT22222L

MSB payload with analogue inputs, digital states, relay states and an operating-mode byte.

View Dragino example

Netvox RB11E

MSB payload with fixed report identifiers, battery voltage, temperature, light and occupancy.

View Netvox example

Milesight WS523

Little-endian channel-and-type payload containing socket state and electrical measurements.

View Milesight example

Dragino LT22222L I/O Controller

This example decodes the 11-byte AT+MOD=1 uplink. The Dragino manual specifies FPort 2 and a payload containing two voltage inputs, two current inputs, one combined digital/relay status byte, one reserved byte and one mode byte.

Example payload: 04AB04AC13101300AAFF01

Table 1 – Dragino LT22222L MOD1 uplink payload
Channel Start byte Length HEX Data type Raw value Scaling Result
Voltage 1 (AVI1) 0 2 04 AB Unsigned integer 1195 ÷ 1000 1.195 V
Voltage 2 (AVI2) 2 2 04 AC Unsigned integer 1196 ÷ 1000 1.196 V
Current 1 (ACI1) 4 2 13 10 Unsigned integer 4880 ÷ 1000 4.880 mA
Current 2 (ACI2) 6 2 13 00 Unsigned integer 4864 ÷ 1000 4.864 mA
Digital and relay status 8 1 AA Bit field 170 Binary 10101010
Reserved 9 1 FF Reserved Skipped
Operating mode 10 1 01 Match Offset 1 1 MOD1

Bytes 0–7 are interpreted as unsigned MSB values and divided by 1000. Byte 8 is decoded bit by bit. Byte 9 is skipped, while Byte 10 is configured as a Match Offset so that a MOD1 payload is not processed by a decoder intended for another operating mode.

Table 2 – Dragino LT22222L Byte 8 bit mapping
Channel Bit State Meaning
Relay 171Closed
Relay 260Open
DI3 / unused on LT22222L51Ignore for LT22222L
Digital input 240Low
Digital input 131High or floating
DO3 / unused on LT22222L20Ignore for LT22222L
Digital output 211Low / on
Digital output 100High or floating / off

Create a separate decoder for each supported operating mode and use the final mode byte as a Match Offset. Configure the next decoder in the chain so a payload that fails the mode match can continue to the correct profile.

Decoder configuration

Telemetry2U Packet Designer showing the Dragino LT22222L MOD1 field configuration
Select the screenshot to inspect the complete field configuration.

Select Save, assign the decoder to a test node and compare every result with the known payload.

Downlink commands

Telemetry2U downlink command list for controlling Dragino LT22222L relays and requesting an uplink
Example relay-control and poll commands for the LT22222L.

Use the current Dragino command specification for the installed firmware before reusing any hexadecimal command.

Open the current Dragino LT22222L manual

Netvox RB11E Occupancy Sensor

The RB11E combines temperature, illuminance, passive infrared occupancy and a tamper input. This example uses an 11-byte MSB uplink received on FPort 6.

Example payload: 010301240B1C007B010000

Table 3 – Netvox RB11E uplink payload
Channel Start byte Length HEX Data type Raw value Scaling Result
Version0101Match Offset111
Device type1103Match Offset31RB11E
Report type2101Match Offset11Sensor report
Battery3124Unsigned integer36÷ 103.6 V
Temperature420B 1CInteger per device profile2844÷ 10028.44 °C
Illuminance6200 7BUnsigned integer1231123 lux
Occupancy8101Unsigned integer11Occupied
Tamper9100Unsigned integer01Assembled
Reserved10100ReservedSkipped

Configure the first three bytes as Match Offset fields. This prevents a different Netvox report type from being decoded with the sensor-report layout. Battery, temperature and illuminance then use their documented scaling, while occupancy and tamper are binary state fields.

Netvox documents configuration requests on FPort 7, while the example sensor uplink is received on FPort 6. Confirm both ports and the signed-temperature behaviour against the installed firmware before creating a production command profile.

RB11E Downlink Examples

A configuration command can combine the minimum reporting interval, maximum reporting interval, battery-change threshold, temperature-change threshold and illuminance-change threshold. Separate commands can set the PIR disable and detection periods.

Decoder configuration

Telemetry2U Packet Designer showing the Netvox RB11E payload fields and scaling
The version, device and report bytes are used to identify the payload.

Validate occupied, unoccupied and tamper states, as well as a known temperature and light reading.

Downlink commands

Telemetry2U downlink command list for Netvox RB11E reporting and PIR timing settings
Existing command examples; verify the required FPort before reuse.

Keep the minimum interval practical for battery life and ensure the PIR detection period is not shorter than the disable period.

Open the Netvox RB11E user manual

Milesight WS523 Smart Socket

The WS523 reports a sequence of channel, type and data fields on FPort 85. Data values use little-endian byte order. The first 08 70 channel/type pair can be used as a Match Offset to identify the periodic electrical report.

Example payload: 08700105816307C99D0D03743A090683D4360000048038030000

Table 4 – Milesight WS523 periodic electrical report
Channel Start byte Length HEX Data type Raw value Scaling Result
Channel / type0208 70Match Offset286801Socket status field
Socket status2101Unsigned integer11Open / on
Channel / type3205 81ReservedSkippedPower factor follows
Power factor5163Unsigned integer99199%
Channel / type6207 C9ReservedSkippedCurrent follows
Current829D 0DUnsigned integer3485÷ 10003.485 A
Channel / type10203 74ReservedSkippedVoltage follows
Voltage1223A 09Unsigned integer2362÷ 10236.2 V
Channel / type14206 83ReservedSkippedConsumption follows
Consumption164D4 36 00 00Unsigned integer14036÷ 100014.036 kWh
Channel / type20204 80ReservedSkippedActive power follows
Active power22438 03 00 00Unsigned integer8241824 W

The first pair is interpreted in little-endian order, so 08 70 becomes 0x7008, or 28680 decimal. The remaining channel/type pairs are skipped as reserved fields and each following data value uses its documented length and scaling.

In periodic reports, socket status 00 means closed/off and 01 means open/on. Socket-change reports can also use 10 for closed by the local button and 11 for opened by the local button.

WS523 Downlink Examples

Useful commands can include socket on, socket off, button-lock control and a delayed switching task. Multi-byte values must be entered in the byte order required by the Milesight protocol. For example, 3600 seconds is hexadecimal 0x0E10 and is transmitted as little-endian bytes 10 0E within the task payload.

Decoder configuration

Telemetry2U Packet Designer showing the Milesight WS523 little-endian electrical payload fields
Channel/type identifiers are skipped after the initial Match Offset.

Test the decoder with the socket both on and off, then compare voltage, current, power and consumption with known values.

Downlink commands

Telemetry2U downlink command list for Milesight WS523 socket control, button lock and delayed switching
Example command library for authorised smart-socket control.

Confirm electrical ratings, device state and local safety requirements before enabling remote control.

Open the Milesight WS523 user guide